:root {
    --brand-primary: #155b4e;
    --brand-primary-dark: #0e3d34;
    --brand-primary-light: #1d7968;
    --brand-primary-subtle: #e8f3f0;
    --brand-accent: #fe3c00;
    --brand-accent-dark: #d63300;
    --brand-accent-subtle: #fff1ed;
    --bg-light: #f8fafc;
    --card-border: #e2e8f0;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --sidebar-width: 260px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* Sidebar & Navigation */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--card-border);
    text-decoration: none;
    background: #ffffff;
}

.sidebar-brand-img {
    height: 62px;
    width: auto;
    max-width: 235px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.sidebar-brand:hover .sidebar-brand-img {
    transform: scale(1.03);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(21, 91, 78, 0.15);
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-primary);
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--brand-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.nav-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 1.25rem;
    text-align: center;
    color: #64748b;
}

.sidebar-link:hover {
    background-color: var(--brand-primary-subtle);
    color: var(--brand-primary);
}

.sidebar-link:hover i {
    color: var(--brand-primary);
}

.sidebar-link.active {
    background-color: var(--brand-primary);
    color: #ffffff;
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Header Navbar */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1010;
}

/* Gudsoft Custom Buttons */
.btn-gudsoft {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(21, 91, 78, 0.2);
    transition: all 0.2s;
}

.btn-gudsoft:hover, .btn-gudsoft:focus {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #ffffff;
}

.btn-gudsoft-accent {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(254, 60, 0, 0.25);
    transition: all 0.2s;
}

.btn-gudsoft-accent:hover, .btn-gudsoft-accent:focus {
    background-color: var(--brand-accent-dark);
    border-color: var(--brand-accent-dark);
    color: #ffffff;
}

.btn-outline-gudsoft {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 600;
}

.btn-outline-gudsoft:hover {
    background-color: var(--brand-primary);
    color: #ffffff;
}

/* Card Styling */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: var(--brand-primary-subtle);
    color: var(--brand-primary);
}

.stat-icon.accent {
    background: var(--brand-accent-subtle);
    color: var(--brand-accent);
}

.stat-icon.amber {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.slate {
    background: #f1f5f9;
    color: #475569;
}

/* Timer Display Card */
.timer-hero-card {
    background: linear-gradient(135deg, #155b4e 0%, #0c3830 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(21, 91, 78, 0.2);
    position: relative;
    overflow: hidden;
}

.timer-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(254, 60, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.timer-digital {
    font-family: 'Courier New', Courier, monospace, monospace;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (max-width: 575.98px) {
    .timer-digital {
        font-size: 2.2rem;
    }
}

.status-badge-live {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-active {
    background-color: #22c55e;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
    animation: pulse 1.5s infinite;
}

.pulse-idle {
    background-color: #f59e0b;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
    animation: pulse 1.5s infinite;
}

.pulse-off {
    background-color: #94a3b8;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Badges for Attendance */
.badge-present {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-absent {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-weekly-off {
    background-color: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-worked-weekly-off {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-upcoming {
    background-color: #f1f5f9;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
}

.badge-not-started {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* Weekly Off Highlights */
.row-weekly-off {
    background-color: #fafbfc;
}

.row-worked-weekly-off {
    background-color: #fffdf5;
}

/* Print Layout */
@media print {
    .sidebar, .top-navbar, .no-print, .btn, .card-header .btn {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    body {
        background: #ffffff !important;
        font-size: 11pt;
    }
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
