@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700&display=swap');

:root {
    --bg-primary: #090a0f;
    --bg-secondary: #131722;
    --bg-card: rgba(22, 27, 39, 0.7);
    --bg-card-hover: rgba(30, 37, 54, 0.9);
    --accent-gold: #c5a880;
    --accent-gold-bright: #d4af37;
    --accent-gold-dark: #8c7355;
    --accent-gold-rgb: 197, 168, 128;
    --text-primary: #f1f2f6;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --border-gold: rgba(197, 168, 128, 0.2);
    --border-gold-hover: rgba(197, 168, 128, 0.4);
    --border-dark: rgba(255, 255, 255, 0.05);
    
    --success: #2ec4b6;
    --success-rgb: 46, 196, 182;
    --warning: #ff9f1c;
    --warning-rgb: 255, 159, 28;
    --danger: #e71d36;
    --danger-rgb: 231, 29, 54;
    --info: #011627;
    --info-light: #4361ee;
    
    --font-family: 'Prompt', 'Sarabun', sans-serif;
    --transition-speed: 0.3s;
    --sidebar-width: 260px;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(197, 168, 128, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(67, 97, 238, 0.02) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(197, 168, 128, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 168, 128, 0.4);
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(10px);
}

.logo-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-gold);
    text-align: center;
}

.logo-img-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-gold);
    margin-bottom: 12px;
    box-shadow: 0 0 15px rgba(197, 168, 128, 0.3);
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-gold-bright);
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.restaurant-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.nav-links {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background: rgba(197, 168, 128, 0.08);
    color: var(--text-primary);
    border-color: rgba(197, 168, 128, 0.2);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(197, 168, 128, 0.05));
    border-color: var(--accent-gold);
    color: var(--accent-gold-bright);
    font-weight: 500;
    box-shadow: inset 0 0 10px rgba(197, 168, 128, 0.05);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: all var(--transition-speed) ease;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 20px;
}

.page-title-group h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.page-title-group p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #121212;
    border: none;
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e5c158, var(--accent-gold));
    box-shadow: 0 4px 20px rgba(197, 168, 128, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-success {
    background: rgba(46, 196, 182, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 196, 182, 0.3);
}

.btn-success:hover {
    background: rgba(46, 196, 182, 0.25);
}

.btn-danger {
    background: rgba(231, 29, 54, 0.1);
    color: var(--danger);
    border: 1px solid rgba(231, 29, 54, 0.2);
}

.btn-danger:hover {
    background: rgba(231, 29, 54, 0.2);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--border-radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: var(--border-gold-hover);
}

/* Dashboard Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 168, 128, 0.02));
    pointer-events: none;
}

.metric-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(197, 168, 128, 0.1);
    color: var(--accent-gold-bright);
    border: 1px solid var(--border-gold);
}

.metric-icon.blue {
    background: rgba(67, 97, 238, 0.1);
    color: #4361ee;
    border-color: rgba(67, 97, 238, 0.2);
}

.metric-icon.green {
    background: rgba(46, 196, 182, 0.1);
    color: var(--success);
    border-color: rgba(46, 196, 182, 0.2);
}

.metric-icon.orange {
    background: rgba(255, 159, 28, 0.1);
    color: var(--warning);
    border-color: rgba(255, 159, 28, 0.2);
}

.metric-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tabs & Pages */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page-section.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Employee Cards Grid */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.employee-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
}

.emp-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emp-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold-dark), rgba(197, 168, 128, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
    border: 1px solid var(--accent-gold);
}

.emp-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.emp-role {
    font-size: 0.8rem;
    color: var(--accent-gold-bright);
    margin-top: 2px;
}

.emp-body {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-secondary);
}

.emp-info-row {
    display: flex;
    justify-content: space-between;
}

.emp-info-label {
    color: var(--text-muted);
}

.emp-info-val {
    color: var(--text-primary);
}

.emp-footer {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-dark);
    padding-top: 15px;
    margin-top: auto;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(46, 196, 182, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 29, 54, 0.15);
    color: var(--danger);
}

.badge-warning {
    background: rgba(255, 159, 28, 0.15);
    color: var(--warning);
}

.badge-role {
    background: rgba(197, 168, 128, 0.15);
    color: var(--accent-gold-bright);
    border: 1px solid var(--border-gold);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    width: 90%;
    max-width: 550px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--accent-gold-bright);
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 168, 128, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* Attendance Log Section */
.attendance-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.date-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.date-btn:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--accent-gold);
}

input[type="date"] {
    max-width: 180px;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-gold);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-dark);
}

th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--accent-gold-bright);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: background-color 0.2s ease;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Attendance specific table selectors */
.att-status-select {
    width: auto;
    min-width: 110px;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.att-present {
    border-color: rgba(46, 196, 182, 0.3);
    color: var(--success);
    background: rgba(46, 196, 182, 0.05);
}

.att-late {
    border-color: rgba(255, 159, 28, 0.3);
    color: var(--warning);
    background: rgba(255, 159, 28, 0.05);
}

.att-leave {
    border-color: rgba(231, 29, 54, 0.3);
    color: var(--danger);
    background: rgba(231, 29, 54, 0.05);
}

.att-holiday {
    border-color: rgba(67, 97, 238, 0.3);
    color: #4361ee;
    background: rgba(67, 97, 238, 0.05);
}

/* Report View Filter */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item select, .filter-item input {
    min-width: 150px;
}

/* Performance Rating styling */
.rating-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.rating-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.rating-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.rating-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(197, 168, 128, 0.6);
    transition: transform 0.1s ease;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.rating-value-display {
    width: 30px;
    text-align: right;
    font-weight: 600;
    color: var(--accent-gold-bright);
}

.rating-stars {
    color: var(--warning);
    font-size: 0.8rem;
}

/* Payroll Setup & Payslip Preview */
.payroll-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .payroll-container {
        grid-template-columns: 1fr;
    }
}

/* Payslip Design */
.payslip-preview-card {
    background: #11141b;
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 30px;
    color: #f1f2f6;
    font-family: 'Prompt', sans-serif;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.payslip-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-gold-dark), var(--accent-gold), var(--accent-gold-dark));
}

.payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.payslip-logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.payslip-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    object-fit: cover;
    background: #000;
}

.payslip-shop-info h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-gold-bright);
    margin-bottom: 2px;
}

.payslip-shop-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.payslip-title-block {
    text-align: right;
}

.payslip-title-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
    letter-spacing: 1px;
}

.payslip-title-block p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.payslip-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 20px;
}

.payslip-meta-item {
    display: flex;
    justify-content: space-between;
}

.payslip-meta-label {
    color: var(--text-secondary);
}

.payslip-meta-value {
    font-weight: 500;
    color: var(--text-primary);
}

.payslip-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold-bright);
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.payslip-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.payslip-row.total {
    border-top: 1px dashed var(--accent-gold);
    border-bottom: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding-top: 10px;
    color: var(--text-primary);
}

.payslip-val-pos {
    text-align: right;
    color: var(--success);
}

.payslip-val-neg {
    text-align: right;
    color: var(--danger);
}

.payslip-val-neutral {
    text-align: right;
    color: var(--text-primary);
}

.payslip-net-box {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.1), rgba(197, 168, 128, 0.02));
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payslip-net-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-gold-bright);
}

.payslip-net-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
    text-shadow: 0 0 10px rgba(197, 168, 128, 0.2);
}

.payslip-signatures {
    margin-top: 35px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.signature-line {
    border-top: 1px dashed var(--text-muted);
    padding-top: 8px;
    margin-top: 35px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-gold);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s forwards, toastOut 0.3s 2.7s forwards;
    border: 1px solid var(--border-dark);
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

.toast.success {
    border-left-color: var(--success);
}
.toast.danger {
    border-left-color: var(--danger);
}
.toast.info {
    border-left-color: var(--info-light);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-gold);
    }
    
    .logo-container {
        padding: 15px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 15px;
    }
    
    .logo-img-wrapper {
        width: 45px;
        height: 45px;
        margin-bottom: 0;
    }
    
    .restaurant-subtitle {
        display: none;
    }
    
    .nav-links {
        flex-direction: row;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        gap: 5px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .nav-item i {
        margin-right: 6px;
        font-size: 0.95rem;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        gap: 15px;
    }
    
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item select, .filter-item input {
        min-width: 100%;
    }
}

/* print styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printArea, #printArea * {
        visibility: visible;
    }
    #printArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #111 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 1px solid #c5a880 !important;
        padding: 20px !important;
    }
    
    .payslip-preview-card {
        background-color: #ffffff !important;
        background-image: none !important;
        color: #111111 !important;
        border: 1px solid #c5a880 !important;
    }
    .payslip-preview-card::before {
        background: #c5a880 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .payslip-shop-info h2, .payslip-title-block h3, .payslip-table-header, .payslip-net-label, .payslip-net-val {
        color: #8c7355 !important;
    }
    .payslip-logo {
        border-color: #8c7355 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .payslip-shop-info p, .payslip-meta-label, .payslip-title-block p {
        color: #555555 !important;
    }
    .payslip-meta-value, .payslip-row {
        color: #111111 !important;
    }
    .payslip-meta {
        background: #fdfdfd !important;
        border: 1px solid #e5c158 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .payslip-row {
        border-bottom: 1px solid #eee !important;
    }
    .payslip-row.total {
        border-top: 1px dashed #8c7355 !important;
    }
    .payslip-net-box {
        background: #fdf9f2 !important;
        border: 1px solid #c5a880 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .payslip-val-pos {
        color: #1e7e34 !important;
    }
    .payslip-val-neg {
        color: #bd2130 !important;
    }
    .payslip-val-neutral {
        color: #111 !important;
    }
    .signature-line {
        border-top-color: #555 !important;
    }
}

/* Contenteditable Premium Helper Styles */
[contenteditable="true"]:hover {
    outline: 1px dashed var(--accent-gold);
    cursor: edit;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}
[contenteditable="true"]:focus {
    outline: 2px solid var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Mobile Bottom Nav & Overlay Styles */
.mobile-nav {
    display: none;
}
.mobile-more-overlay {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important; /* Hide traditional sidebar completely on mobile */
    }
    
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(19, 23, 34, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-gold);
        justify-content: space-around;
        align-items: center;
        z-index: 999;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.72rem;
        cursor: pointer;
        flex-grow: 1;
        height: 100%;
        transition: color 0.2s ease;
    }
    
    .mobile-nav-item i {
        font-size: 1.25rem;
    }
    
    .mobile-nav-item.active {
        color: var(--accent-gold-bright);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px 15px 85px 15px !important; /* Add padding to prevent nav overlap */
    }

    .mobile-more-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 1001;
        display: none;
        align-items: flex-end;
        animation: fadeIn 0.2s ease forwards;
    }
    
    .mobile-more-overlay.active {
        display: flex;
    }
    
    .mobile-more-container {
        width: 100%;
        background: var(--bg-secondary);
        border-top: 2px solid var(--accent-gold);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        padding: 24px;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
        transform: translateY(100%);
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    @keyframes slideUp {
        to {
            transform: translateY(0);
        }
    }
    
    .mobile-more-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-dark);
        padding-bottom: 12px;
        margin-bottom: 15px;
    }
    
    .mobile-more-header h3 {
        font-size: 1.1rem;
        color: var(--accent-gold-bright);
    }
    
    .close-more {
        font-size: 1.6rem;
        cursor: pointer;
        color: var(--text-secondary);
    }
    
    .mobile-more-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-more-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 14px 18px;
        background: rgba(255,255,255,0.02);
        border-radius: 12px;
        border: 1px solid var(--border-dark);
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.95rem;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .mobile-more-item:hover, .mobile-more-item.active {
        background: rgba(197, 168, 128, 0.08);
        border-color: var(--accent-gold);
        color: var(--accent-gold-bright);
    }
    
    .mobile-more-item i {
        color: var(--accent-gold-bright);
        font-size: 1.15rem;
        width: 20px;
        text-align: center;
    }
}


