:root {
    --bg-main: #1e1e24;
    --bg-header: #2a2a35;
    --bg-input-1: #fcef9f; /* Vàng */
    --bg-input-2: #bdf69a; /* Xanh lá */
    --bg-input-3: #8be1fa; /* Xanh lam */
    --bg-input-4: #e1bdf9; /* Tím */
    --bg-input-5: #f9a4a4; /* Đỏ */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --weekend-red: #ff4d4d;
    --border-color: #444;
    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    font-family: var(--font-main);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px; 
    height: 100vh;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* HEADER */
.app-header {
    background-color: var(--bg-main);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hd-badge {
    background-color: #000;
    color: #fff;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    letter-spacing: 1px;
}

.status-bar {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #fff;
}

.user-selector {
    display: flex;
    justify-content: center;
}

.selector-btn {
    background-color: #333;
    color: #dedede;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    width: 160px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    outline: none;
    font-family: inherit;
}
.selector-btn:focus {
    border-color: #00ff00;
}

/* TABLE */
.table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.timesheet {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.timesheet th, .timesheet td {
    border: 1px solid #555;
    text-align: center;
    vertical-align: middle;
}

/* Headers */
.header-row th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 14px;
    padding: 8px 0;
}

.header-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    outline: none;
}
.header-input:focus {
    color: var(--text-main);
}

.current-month-display {
    color: #00ff00 !important;
    font-weight: bold !important;
}

.total-row th {
    background-color: #ffffff;
    color: #000;
    font-size: 14px;
    padding: 5px 0;
    height: 35px;
}

.text-center { text-align: center; }
.font-bold { font-weight: 700; }

/* Body Rows */
.day-row {
    height: 35px;
    background-color: #f5f5f5; /* Mặc định các ô nhập màu sáng */
}

/* Cột thông tin ngày */
.col-date {
    background-color: #999;
    color: #000;
    font-weight: bold;
    width: 35px;
    font-size: 14px;
}
.col-day {
    background-color: #fff;
    color: #000;
    font-weight: 600;
    width: 35px;
    font-size: 14px;
}

/* Các ngày cuối tuần */
.weekend .col-day {
    color: var(--weekend-red);
}

/* Highlight ngày hiện tại */
.current-day .col-date {
    background-color: #00ff00;
    color: #000;
}

/* Input cells */
.input-cell {
    padding: 0;
}
.input-cell input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    outline: none;
    /* Loại bỏ mũi tên spin của số */
    -moz-appearance: textfield;
}
.input-cell input::-webkit-outer-spin-button,
.input-cell input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Màu các cột */
.col-1 { background-color: var(--bg-input-1); }
.col-2 { background-color: var(--bg-input-2); }
.col-3 { background-color: var(--bg-input-3); }
.col-4 { background-color: var(--bg-input-4); }
.col-5 { background-color: var(--bg-input-5); }

/* FOOTER */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    padding: 10px 15px;
    border-top: 1px solid #444;
}

.month-nav {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex: 1;
}
.month-nav::-webkit-scrollbar {
    display: none;
}

.month-item {
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.month-item.active {
    color: #00ff00;
    border-color: #00ff00;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
}
