@import url('https://fonts.maateen.me/nikosh/font.css');

:root {
    /* Fonts */
    --font-primary: 'Nikosh', 'Hind Siliguri', 'Outfit', sans-serif;
    
    /* Layout Constants */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --transition-speed: 0.25s;
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Theme Variables */
.dark-theme {
    --bg-primary: #0a0f18;
    --bg-secondary: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-hover-bg: rgba(30, 41, 59, 0.95);
    --border-color: rgba(51, 65, 85, 0.6);
    --border-focus: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-green-glow: rgba(16, 185, 129, 0.25);
    --accent-orange: #f59e0b;
    --accent-orange-hover: #d97706;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --danger-color: #ef4444;
    --danger-color-hover: #dc2626;
    --sidebar-bg: rgba(15, 23, 42, 0.85);
    --header-bg: rgba(10, 15, 24, 0.8);
    --scrollbar-track: #0a0f18;
    --scrollbar-thumb: #1e293b;
    --glass-blur: blur(12px);
    --v2-badge-bg: rgba(245, 158, 11, 0.15);
    --v2-badge-text: #f59e0b;
}

/* Light Theme Variables */
.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 0.98);
    --border-color: rgba(226, 232, 240, 0.8);
    --border-focus: #059669;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-green: #059669;
    --accent-green-hover: #047857;
    --accent-green-glow: rgba(5, 150, 105, 0.15);
    --accent-orange: #d97706;
    --accent-orange-hover: #b45309;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --danger-color: #dc2626;
    --danger-color-hover: #b91c1c;
    --sidebar-bg: rgba(255, 255, 255, 0.9);
    --header-bg: rgba(241, 245, 249, 0.8);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --glass-blur: blur(12px);
    --v2-badge-bg: rgba(217, 119, 6, 0.1);
    --v2-badge-text: #d97706;
}

/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 var(--accent-green-glow); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bangla { font-family: 'Nikosh', 'Hind Siliguri', sans-serif; }
.font-english { font-family: 'Outfit', sans-serif; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    user-select: none;
}
.btn svg, .btn i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn span {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}
.btn-primary {
    background-color: var(--accent-green, #059669);
    border: 1px solid #047857;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--accent-green-hover, #047857);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}
.btn-secondary {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}
.btn-orange {
    background-color: #d97706;
    border: 1px solid #b45309;
    color: #ffffff;
}
.btn-orange:hover {
    background-color: #b45309;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}
.btn-purple {
    background-color: var(--accent-purple, #7c3aed);
    border: 1px solid #6d28d9;
    color: #ffffff;
}
.btn-purple:hover {
    opacity: 0.92;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.35);
}
.btn-danger {
    background-color: #dc2626;
    border: 1px solid #b91c1c;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #b91c1c;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}
.btn-icon {
    padding: 8px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-icon:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}
.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 5px 12px;
    font-size: 0.83rem;
    font-weight: 600;
    height: 32px;
    gap: 5px;
    line-height: 1;
    box-sizing: border-box;
}
.btn-sm svg, .btn-sm i {
    width: 13px;
    height: 13px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-v2 {
    background-color: var(--v2-badge-bg);
    color: var(--v2-badge-text);
    font-size: 0.65rem;
    padding: 2px 6px;
    margin-left: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-permanent {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-deputation {
    background-color: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-masterroll {
    background-color: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-contractual {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-temporary {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-active {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.badge-retired {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}
.form-group label svg {
    width: 16px;
    height: 16px;
}
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-green-glow);
}

/* Auth Layout (Login Page) */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(10, 15, 24, 0.95) 0%, rgba(15, 23, 42, 0.95) 90%);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}
.scc-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scc-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.2));
}
.scc-logo-img.mini {
    filter: drop-shadow(0 1px 4px rgba(16, 185, 129, 0.15));
}
.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.auth-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.error-msg {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-bottom: 16px;
    font-weight: 500;
}
.auth-footer {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.credentials-tip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
}

/* Main Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-speed) ease;
    z-index: 100;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.scc-logo-mini {
    width: 36px;
    height: 36px;
}
.sidebar-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}
.sidebar-title span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.sidebar-nav {
    flex-grow: 1;
    padding: 20px 12px;
}
.sidebar-nav ul {
    list-style: none;
}
.nav-item {
    margin-bottom: 4px;
}
.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.nav-item a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.nav-item:hover a {
    background-color: var(--card-bg);
    color: var(--text-primary);
}
.nav-item.active a {
    background-color: var(--accent-green-glow);
    color: var(--accent-green);
    border-left: 3px solid var(--accent-green);
}
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.user-info {
    overflow: hidden;
}
.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.user-info span {
    font-size: 0.7rem;
    background: var(--border-color);
    color: var(--text-secondary);
    padding: 1px 6px;
    border-radius: 4px;
}
.btn-logout {
    color: var(--text-muted);
}
.btn-logout:hover {
    color: var(--danger-color) !important;
}

/* Main Content Area */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex children from breaking grid boundaries */
}

/* Header Styling */
.app-header {
    height: 70px;
    background-color: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
    flex-shrink: 0;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-left h2 {
    font-size: 1.35rem;
    font-weight: 600;
}
.sidebar-toggle {
    display: none;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}
.date-time-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.date-time-widget svg {
    width: 16px;
    height: 16px;
    color: var(--accent-orange);
}

.theme-switcher button {
    width: 38px;
    height: 38px;
}
.dark-theme .sun-icon { display: none; }
.light-theme .moon-icon { display: none; }

.header-user-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Smart User Profile Pill in Header */
.smart-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px 0 6px;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    text-align: left;
    font-family: inherit;
    position: relative;
    user-select: none;
}

.smart-user-pill:hover {
    border-color: var(--accent-purple);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

.smart-user-pill:active {
    transform: scale(0.98);
}

.user-pill-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-purple), #ec4899);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.user-pill-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.user-pill-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-pill-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-pill-chevron {
    transition: transform 0.25s ease, color 0.2s ease;
}

.smart-user-pill.active .user-pill-chevron {
    transform: rotate(180deg);
    color: var(--accent-purple);
}

/* User Settings Unified Dropdown Menu */
.user-dropdown-wrapper {
    position: relative;
}

.user-settings-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    padding: 8px 0;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
    backdrop-filter: blur(10px);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-purple), #ec4899);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-info {
    overflow: hidden;
    line-height: 1.25;
}

.dropdown-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-role {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.dropdown-email {
    font-size: 0.74rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
    opacity: 0.7;
}

.dropdown-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-item i, .dropdown-item svg {
    width: 17px;
    height: 17px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-purple);
}

.dropdown-item:hover i, .dropdown-item:hover svg {
    color: var(--accent-purple);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger i, .dropdown-item.danger svg {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.dropdown-footer {
    padding-top: 2px;
}


/* Sidebar user profile clickable styling */
.sidebar-footer .user-profile {
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    padding: 8px;
    margin: -8px;
    transition: all 0.2s ease;
}

.sidebar-footer .user-profile:hover {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: var(--shadow-sm);
}

/* Content Body */
.content-body {
    flex-grow: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background-color: var(--card-hover-bg);
}
.stat-info h5 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.stat-info h2 {
    font-size: 2rem;
    font-weight: 700;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon.green { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon.orange { background-color: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.stat-icon.blue { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.purple { background-color: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}
.chart-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.chart-container h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-left: 4px solid var(--accent-green);
    padding-left: 10px;
}
.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Directory / List Views */
.directory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.search-wrapper {
    position: relative;
    max-width: 400px;
    width: 100%;
}
.search-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    outline: none;
}
.search-wrapper input:focus {
    border-color: var(--border-focus);
}
.search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}
.filters-wrapper {
    display: flex;
    gap: 12px;
}
.filters-wrapper select {
    padding: 8px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.9rem;
}

.table-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.employee-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.employee-table th {
    background-color: rgba(0,0,0,0.05);
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.employee-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
}
.employee-table tr:last-child td {
    border-bottom: none;
}
.employee-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.employee-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
.dark-theme .employee-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.emp-cell-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.emp-cell-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--border-color);
    flex-shrink: 0;
}
.emp-name-bn {
    font-weight: 600;
    font-size: 0.95rem;
}
.emp-name-en {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.actions-cell {
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}
.actions-btn-group, .actions-button-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    vertical-align: middle;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}
.pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* Add/Edit Employee Form Layout */
.form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
.form-section-title {
    grid-column: span 2;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-green);
}
@media (max-width: 768px) {
    .form-section-title {
        grid-column: span 1;
    }
}
.form-photo-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    grid-column: span 2;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .form-photo-upload {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
    }
}
.photo-preview-box {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius-sm);
    border: 2px dashed var(--border-color);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    overflow: hidden;
}
.photo-upload-controls p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Document Upload Items */
.document-upload-list {
    grid-column: span 2;
}
@media (max-width: 768px) {
    .document-upload-list {
        grid-column: span 1;
    }
}
.uploaded-docs-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.doc-upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-primary);
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}
.doc-name-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.doc-name-info svg {
    color: var(--danger-color);
    width: 18px;
    height: 18px;
}

.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
}
@media (max-width: 768px) {
    .form-actions {
        grid-column: span 1;
    }
}

/* Detailed Employee Profile View */
.profile-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
}
.profile-sidebar-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: var(--border-radius-md);
    margin: 0 auto 20px auto;
    border: 3px solid var(--border-color);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
}
.profile-sidebar-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.profile-sidebar-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.profile-meta-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
}
.profile-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-info-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.profile-section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 600px) {
    .profile-details-grid {
        grid-template-columns: 1fr;
    }
}
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-field span.field-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.profile-field span.field-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Document Grid inside Profile */
.profile-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.profile-doc-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.profile-doc-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-green);
}
.doc-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.doc-info svg {
    color: var(--danger-color);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.doc-info span {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-speed) ease;
}
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1010;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
}
.modal-content.small {
    width: 90%;
    max-width: 440px;
    padding: 24px;
}
.modal-content.large {
    width: 90%;
    max-width: 800px;
    padding: 32px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.modal-body img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: var(--border-radius-sm);
}
.modal-body iframe {
    width: 100%;
    height: 60vh;
    border: none;
    border-radius: var(--border-radius-sm);
}

/* V2 Attendance & Salary layouts */
.v2-disclaimer {
    background-color: var(--v2-badge-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--v2-badge-text);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.v2-disclaimer svg {
    flex-shrink: 0;
}
.attendance-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .attendance-grid {
        grid-template-columns: 1fr;
    }
}

.calendar-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    margin-top: 16px;
}
.calendar-day-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.calendar-day-num {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background-color: rgba(0,0,0,0.05);
}
.dark-theme .calendar-day-num {
    background-color: rgba(255,255,255,0.03);
}
.calendar-day-num:hover {
    background-color: var(--border-color);
}
.calendar-day-num.present {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.calendar-day-num.late {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.calendar-day-num.absent {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.report-preview-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    margin-top: 24px;
    overflow: auto !important;
    max-height: 90vh !important;
}
.report-paper {
    background-color: #ffffff;
    color: #000000;
    padding: 40px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Nikosh', 'Hind Siliguri', 'Outfit', sans-serif;
}
.report-header {
    text-align: center;
    border-bottom: 2px double #000;
    padding-bottom: 6px;
    margin-bottom: 12px;
}
.report-header h2 {
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 2px;
    font-size: 1.25rem;
}
.report-header p {
    font-size: 0.8rem;
    color: #555;
    margin: 2px 0;
}

.report-paper.landscape-mode {
    width: 100% !important;
    min-width: 1420px !important;
    padding: 30px 24px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 auto !important;
    position: relative !important;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md) !important;
    font-family: 'Nikosh', 'Hind Siliguri', 'Kalpurush', 'Outfit', sans-serif !important;
}
.report-details-table.grid-mode {
    font-size: 0.78rem !important;
    width: 100% !important;
    min-width: 1400px !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1.5px solid #0f172a !important;
}
.report-details-table.grid-mode th,
.report-details-table.grid-mode td {
    padding: 5px 3px !important;
    text-align: center !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
    font-size: 0.72rem !important; /* Attendance cells P, A, W, H stay compact */
}
.report-details-table.grid-mode th {
    font-weight: 700 !important;
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 0.76rem !important;
    border-bottom: 2px solid #94a3b8 !important;
}
.report-details-table.grid-mode th.text-left,
.report-details-table.grid-mode td.text-left {
    text-align: left !important;
    padding-left: 8px !important;
    padding-right: 6px !important;
}
.report-details-table.grid-mode td.font-english {
    font-family: 'Nikosh', 'Hind Siliguri', 'Outfit', sans-serif !important;
}

/* Total Salary Amount Column - Bigger than attendance P, A, W and easy to read */
.report-details-table.grid-mode td.net-salary-cell {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #15803d !important;
    background-color: #f0fdf4 !important;
    letter-spacing: 0.5px !important;
}
.report-details-table.grid-mode th.net-salary-header {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #166534 !important;
    background-color: #dcfce7 !important;
}
.report-details-table.grid-mode td.daily-rate-cell input,
.report-details-table.grid-mode td.present-days-cell input {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
}
.report-details-table.grid-mode .grand-total-cell {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #15803d !important;
    background-color: #dcfce7 !important;
}

/* Attendance Modal Customization to fix button cut-off in picture */
#attendance-modal .modal-content {
    max-width: 450px !important;
    padding: 24px 24px 28px 24px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    border-radius: var(--border-radius-lg) !important;
}
#attendance-modal .modal-body {
    margin-bottom: 8px !important;
    overflow: visible !important;
}
#attendance-modal .modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    padding-top: 16px !important;
    margin-top: 10px !important;
    border-top: 1px solid var(--border-color) !important;
}

.report-details-table.grid-mode tfoot tr.signature-tr td {
    border: none !important;
    padding-top: 50px !important;
    padding-bottom: 10px !important;
    background: transparent !important;
}

.report-footer-signatures {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    width: 100% !important;
    margin-top: 65px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}
.signature-line {
    width: 22% !important;
    border-top: 1.5px solid #000000 !important;
    text-align: center !important;
    padding-top: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

/* Print Enhancements — Full Page Legal / A4 Landscape */
@media print {
    @page {
        size: 14in 8.5in landscape !important;
        margin: 6mm 6mm 6mm 6mm !important; /* Full page edge-to-edge layout */
    }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-font-smoothing: antialiased !important;
        text-rendering: optimizeLegibility !important;
        box-sizing: border-box !important;
    }
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Nikosh', 'Hind Siliguri', 'Kalpurush', sans-serif !important;
        font-size: 8pt !important;
        line-height: 1.25 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Hide all non-printable UI elements */
    .app-sidebar, .app-header, .directory-controls, .v2-disclaimer,
    .pagination, .btn, .no-print, #sal-billing-mode, #sal-month, #sal-section,
    .smart-logout-btn, .smart-user-pill, .sidebar-toggle, .theme-switcher, .header-user-controls,
    #salary-sheet-controls-bar, #salary-edit-rule-alert {
        display: none !important;
    }
    .app-main, .content-body, .app-layout {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        overflow: visible !important;
        width: 100% !important;
    }
    .report-preview-box {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        max-height: none !important;
        width: 100% !important;
    }
    .report-paper.landscape-mode {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    /* Report Header */
    .report-header {
        text-align: center !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 6px !important;
        margin-bottom: 8px !important;
        width: 100% !important;
    }
    .report-header h2 {
        font-size: 14pt !important;
        font-weight: 800 !important;
        color: #000000 !important;
        margin-bottom: 2px !important;
        text-align: center !important;
    }
    .report-header p {
        font-size: 8.5pt !important;
        font-weight: 600 !important;
        color: #000000 !important;
        margin: 1px 0 !important;
        text-align: center !important;
    }
    .report-header h4 {
        font-size: 11pt !important;
        font-weight: 700 !important;
        color: #000000 !important;
        margin: 4px 0 2px 0 !important;
        text-align: center !important;
    }
    /* Repeat header and footer on every page */
    thead {
        display: table-header-group !important;
    }
    tfoot {
        display: table-footer-group !important;
    }
    tfoot tr.signature-tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    /* ===== MAIN TABLE — 100% Full Width Distribution ===== */
    .report-details-table.grid-mode {
        border-collapse: collapse !important;
        width: 100% !important;
        table-layout: fixed !important;
        border: 1.5px solid #000000 !important;
        color: #000000 !important;
        margin: 6px auto !important;
    }
    /* Percentage-based columns filling exactly 100% of printable paper width */
    .report-details-table.grid-mode th:nth-child(1),
    .report-details-table.grid-mode td:nth-child(1) { width: 3% !important; text-align: center !important; } /* ক্রমিক */
    .report-details-table.grid-mode th:nth-child(2),
    .report-details-table.grid-mode td:nth-child(2) { width: 5.5% !important; text-align: center !important; } /* আইডি */
    .report-details-table.grid-mode th:nth-child(3),
    .report-details-table.grid-mode td:nth-child(3) { width: 12% !important; text-align: left !important; padding-left: 5px !important; }  /* নাম */
    .report-details-table.grid-mode th:nth-child(4),
    .report-details-table.grid-mode td:nth-child(4) { width: 9.5% !important; text-align: left !important; padding-left: 5px !important; }  /* পদবী */
    
    /* Last 3 columns */
    .report-details-table.grid-mode th:nth-last-child(3),
    .report-details-table.grid-mode td:nth-last-child(3) { width: 5% !important; text-align: center !important; } /* দৈনিক হার */
    .report-details-table.grid-mode th:nth-last-child(2),
    .report-details-table.grid-mode td:nth-last-child(2) { width: 4% !important; text-align: center !important; }  /* হাজিরা দিন */
    .report-details-table.grid-mode th:nth-last-child(1),
    .report-details-table.grid-mode td:nth-last-child(1),
    .report-details-table.grid-mode td.net-salary-cell { 
        width: 6% !important; 
        text-align: center !important; 
        font-weight: 800 !important; 
        font-size: 9pt !important; 
    } /* মোট প্রদেয় */

    /* All th/td — clean borders, compact height, crisp fonts */
    .report-details-table.grid-mode th,
    .report-details-table.grid-mode td {
        border: 1px solid #000000 !important;
        color: #000000 !important;
        padding: 3px 1px !important;
        font-size: 6.8pt !important;
        font-weight: 600 !important;
        text-align: center !important;
        vertical-align: middle !important;
        line-height: 1.15 !important;
        word-break: break-word !important;
        overflow: hidden !important;
    }
    .report-details-table.grid-mode th {
        background-color: #e2e8f0 !important;
        font-size: 6.8pt !important;
        font-weight: 700 !important;
        padding: 3px 1px !important;
    }
    .report-details-table.grid-mode th.text-left,
    .report-details-table.grid-mode td.text-left {
        text-align: left !important;
        padding-left: 4px !important;
    }
    /* Zebra stripe */
    .report-details-table.grid-mode tbody tr:nth-child(even) td {
        background-color: #f8fafc !important;
    }
    /* Salary input box in print */
    .daily-rate-input, .present-days-input {
        border: none !important;
        background: transparent !important;
        text-align: center !important;
        font-weight: 700 !important;
        width: 100% !important;
        color: #000000 !important;
        font-size: 7pt !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Signature row reset */
    .report-details-table.grid-mode tfoot tr.signature-tr td {
        border: none !important;
        background: transparent !important;
        padding-top: 40px !important;
        padding-bottom: 10px !important;
    }
    /* Signature block — spans 100% width evenly */
    .report-footer-signatures {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        width: 100% !important;
        margin-top: 65px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .signature-line {
        width: 22% !important;
        border-top: 1.5px solid #000000 !important;
        text-align: center !important;
        padding-top: 6px !important;
        font-size: 8pt !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }
}

.present-days-input {
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: bold;
    width: 60px;
    font-family: inherit;
    font-size: inherit;
    color: var(--text-primary);
    transition: border-color var(--transition-speed), background var(--transition-speed);
}
.present-days-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--card-bg);
}
/* Hide spin arrows for cleaner display */
.present-days-input::-webkit-outer-spin-button,
.present-days-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.present-days-input {
    -moz-appearance: textfield;
}

/* ==================================================== */
/* Comprehensive Mobile Responsiveness Controls (<768px) */
/* ==================================================== */
@media (max-width: 768px) {
    /* Mobile Navigation Drawer */
    .app-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000 !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: var(--shadow-lg);
        width: 270px !important;
    }
    .app-sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* Header Elements */
    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-sm);
        color: var(--text-primary);
    }
    .app-header {
        padding: 0 16px !important;
        height: 60px !important;
    }
    .header-left {
        gap: 10px !important;
    }
    .header-left h2 {
        font-size: 1.05rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }
    
    /* Main Content Body */
    .content-body {
        padding: 16px !important;
    }
    
    /* Dashboard Grid & Stat Cards */
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }
    .stat-card {
        padding: 16px !important;
    }
    .stat-info h5 {
        font-size: 0.75rem !important;
    }
    .stat-info h2 {
        font-size: 1.5rem !important;
    }
    .stat-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Directory & Controls */
    .directory-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .search-wrapper {
        max-width: 100% !important;
    }
    .filters-wrapper {
        flex-direction: column !important;
        width: 100% !important;
    }
    .filters-wrapper select {
        width: 100% !important;
    }
    
    /* Responsive Table Container */
    .table-container, .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .employee-table th, .employee-table td {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
    }
    
    /* Form & Profile Cards */
    .form-card, .profile-info-card, .profile-sidebar-card {
        padding: 20px 16px !important;
    }
    
    /* Modals */
    .modal-content.small, .modal-content.large {
        width: 95% !important;
        padding: 20px 16px !important;
    }
}

@media (max-width: 600px) {
    .user-pill-info {
        display: none !important;
    }
    .smart-user-pill {
        padding: 0 6px !important;
        gap: 4px !important;
        height: 38px !important;
    }
    .smart-logout-btn .logout-text {
        display: none !important;
    }
    .smart-logout-btn {
        padding: 0 !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
    }
    .logout-icon-wrapper {
        background: transparent !important;
    }
}

@media (max-width: 480px) {
    .date-time-widget {
        display: none !important;
    }
    .header-left h2 {
        max-width: 140px;
        font-size: 0.95rem !important;
    }
}

/* Spin animation for loader icons */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* 3-Step Wizard Styles */
.wizard-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}
.wizard-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.wizard-step-item.active {
    opacity: 1;
}
.wizard-step-item.completed {
    opacity: 0.9;
}
.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.wizard-step-item.active .wizard-step-circle {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}
.wizard-step-item.completed .wizard-step-circle {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #ffffff;
}
.wizard-step-text {
    display: flex;
    flex-direction: column;
}
.wizard-step-num {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.wizard-step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Summary Review Card */
.summary-review-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.summary-header-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.summary-group {
    background: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    border: 1px solid var(--border-color);
}
.summary-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-purple);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.88rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
.summary-label {
    color: var(--text-secondary);
}
.summary-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* Correction Notice Card */
.correction-feedback-card {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--danger-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Modal Overlay & Modal Card (Center fixed viewport modal) */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}
.modal-overlay.hidden {
    display: none !important;
}
.modal-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-lg), 0 20px 50px rgba(0,0,0,0.5) !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 24px !important;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Lightbox Document Modal High Z-Index */
#doc-modal {
    z-index: 10050 !important;
}
#doc-modal .modal-backdrop {
    z-index: 10051 !important;
}
#doc-modal .modal-content {
    z-index: 10052 !important;
}

