:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary-color: #0f172a;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --radius: 12px;
}

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

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar .container {
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius);
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.hero {
    padding: 120px 0 80px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.03), transparent 30%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

.services {
    padding: 80px 0;
    background-color: white;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.section-header h2 {
    font-size: 2.25rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    background-color: var(--bg-main);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    padding-right: 20px;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-method-icon {
    width: 45px;
    height: 45px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    padding: 20px;
}

.auth-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.8);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-main);
    border-radius: var(--radius);
    transition: var(--transition);
    color: var(--text-main);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--secondary-color);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar .logo {
    color: white;
    margin-bottom: 40px;
}

.sidebar .logo-text {
    color: white;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: #94a3b8;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sidebar-user {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user-info {
    max-width: 170px;
}

.sidebar-username {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: #94a3b8;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 3px;
    text-transform: uppercase;
}

.btn-logout {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
}

.main-panel {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    background-color: var(--bg-main);
    min-height: 100vh;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h1 {
    font-size: 1.75rem;
    color: var(--secondary-color);
}

.current-date-badge {
    background-color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.stat-icon.primary { background-color: var(--primary-light); color: var(--primary-color); }
.stat-icon.success { background-color: var(--success-light); color: var(--success); }
.stat-icon.warning { background-color: var(--warning-light); color: var(--warning); }
.stat-icon.danger { background-color: var(--danger-light); color: var(--danger); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.dashboard-grid.equal {
    grid-template-columns: 1fr 1fr;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    overflow: hidden;
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.card-body {
    padding: 25px;
}

.clock-widget {
    text-align: center;
    padding: 30px 10px;
}

.clock-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-family: monospace;
}

.date-display {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.clock-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.today-time-grid {
    margin-top: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.today-time-box {
    background-color: var(--bg-main);
    padding: 12px 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.today-time-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 4px;
    white-space: nowrap;
}

.today-time-val {
    font-size: 1.15rem;
    font-weight: 700;
    display: block;
}

.today-time-val.success {
    color: var(--success);
}

.today-time-val.primary {
    color: var(--primary-color);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 14px 20px;
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-approved {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-rejected {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-admin {
    background-color: #ede9fe;
    color: #6d28d9;
}

.badge-member {
    background-color: #e0f2fe;
    color: #0369a1;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-item {
    border-left: 4px solid var(--primary-color);
    background-color: var(--bg-main);
    padding: 15px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.announcement-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.announcement-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.announcement-content {
    color: var(--text-main);
    font-size: 0.9rem;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: white;
    color: var(--text-main);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards, fadeOut 0.3s 2.7s forwards;
    pointer-events: auto;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    to { transform: translateX(0); }
}

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

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: var(--transition);
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: var(--secondary-color);
}

.footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    font-size: 0.85rem;
}

.mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.mobile-navbar .mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
}

.mobile-navbar .mobile-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.mobile-navbar .mobile-toggle-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

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

.sidebar-header .logo {
    margin-bottom: 0;
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 992px) {
    .mobile-navbar {
        display: flex;
    }
    
    .sidebar-close-btn {
        display: flex;
    }

    .sidebar {
        width: 280px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px 16px;
        box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar .logo-text, .sidebar-username, .sidebar-user-role {
        display: block !important;
    }

    .sidebar-link span:last-child {
        display: inline !important;
    }

    .sidebar-link {
        justify-content: flex-start !important;
    }

    .sidebar-user {
        justify-content: space-between !important;
    }

    .main-panel {
        margin-left: 0 !important;
        padding: 80px 20px 30px 20px !important;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        display: flex;
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-panel {
        padding: 75px 15px 25px 15px !important;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .panel-header h1 {
        font-size: 1.35rem;
    }

    .panel-header p {
        font-size: 0.85rem;
    }

    .current-date-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
        width: 100%;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .dashboard-grid, .dashboard-grid.equal {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        margin-bottom: 20px;
    }

    .card-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-header > div:last-child {
        width: 100%;
    }

    .card-header input, .card-header select {
        max-width: 100% !important;
        flex: 1;
    }

    .card-body {
        padding: 15px;
    }

    .clock-widget {
        padding: 15px 5px;
    }

    .clock-display {
        font-size: 2.1rem;
    }

    .table th, .table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 10px;
    }

    .table-responsive .table {
        min-width: 560px;
    }

    .modal-content {
        width: 94%;
        margin: 15px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        padding: 15px;
        overflow-y: auto;
    }

    .modal-header, .modal-footer {
        padding: 15px;
    }

    .nav-links {
        display: none;
    }

    .navbar .container {
        height: 62px;
    }

    .navbar .logo {
        font-size: 1.25rem;
        gap: 8px;
    }

    .navbar .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
        border-radius: 8px;
    }

    .nav-buttons {
        gap: 8px;
    }

    .nav-buttons .btn {
        padding: 7px 14px;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        height: 56px;
    }

    .navbar .logo {
        font-size: 1.05rem;
        gap: 6px;
    }

    .navbar .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
        border-radius: 7px;
    }

    .nav-buttons {
        gap: 6px;
    }

    .nav-buttons .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .clock-actions {
        grid-template-columns: 1fr;
    }

    .clock-actions .btn {
        width: 100%;
    }

    .clock-display {
        font-size: 1.85rem;
    }

    .today-time-grid {
        gap: 8px;
        padding-top: 15px;
    }

    .today-time-box {
        padding: 10px 5px;
    }

    .today-time-label {
        font-size: 0.76rem;
    }

    .today-time-val {
        font-size: 1.05rem;
    }

    .card-title {
        font-size: 1rem;
    }
}

/* ============================================================
   DATA ANALYTICS & CHARTS DASHBOARD STYLES
   ============================================================ */
.analytics-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.analytics-filter-group {
    display: inline-flex;
    background-color: var(--bg-main);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    gap: 4px;
}

.analytics-filter-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.analytics-filter-btn:hover {
    color: var(--text-main);
}

.analytics-filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.analytics-kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.analytics-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.analytics-kpi-card.kpi-success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.analytics-kpi-card.kpi-warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.analytics-kpi-card.kpi-info::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.analytics-kpi-card.kpi-danger::before { background: linear-gradient(90deg, #ef4444, #f87171); }

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

.kpi-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.kpi-icon.success { background-color: var(--success-light); color: var(--success); }
.kpi-icon.warning { background-color: var(--warning-light); color: var(--warning); }
.kpi-icon.info { background-color: var(--primary-light); color: var(--primary-color); }
.kpi-icon.danger { background-color: var(--danger-light); color: var(--danger); }

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.kpi-big-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.kpi-sub-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--bg-main);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.success { background: linear-gradient(90deg, #10b981, #059669); }
.progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.primary { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.progress-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

.charts-grid-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.charts-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 280px;
    padding: 10px;
}

.chart-wrapper.donut-wrapper {
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-legend-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

@media (max-width: 992px) {
    .charts-grid-2col,
    .charts-grid-equal {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LEAVE ATTACHMENT & MEDICAL CERTIFICATE STYLES
   ============================================================ */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    background-color: var(--bg-main);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload-zone:hover, .file-upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-upload-zone .upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.file-preview-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}

.file-preview-thumbnail {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    flex-shrink: 0;
}

.file-preview-info {
    flex-grow: 1;
    overflow: hidden;
}

.file-preview-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--secondary-color);
}

.file-preview-size {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-remove-file {
    background-color: var(--danger-light);
    color: var(--danger);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-remove-file:hover {
    background-color: var(--danger);
    color: white;
}

.btn-attachment-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-attachment-view:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.attachment-modal-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.attachment-image-viewer {
    max-width: 100%;
    max-height: 480px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 0 auto;
    object-fit: contain;
    background: #000;
}

.attachment-info-card {
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 0.9rem;
}