/* ===================================================================
   Zariya Construction - site.css
   Modern, Executive UI Design System & Left Sidebar Layout
   Optimized for Desktop, Tablet & Mobile PWA
   =================================================================== */

/* ─── Google Font: Inter ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── CSS Custom Properties (Design Tokens) ─────────────────────── */
:root {
    /* Brand & Core Hues */
    --zariya-primary:         #2563eb;   /* Modern Royal Blue / Indigo */
    --zariya-primary-hover:   #1d4ed8;
    --zariya-primary-light:   #eff6ff;
    --zariya-accent:          #f59e0b;   /* Amber */
    --zariya-success:         #10b981;   /* Emerald */
    --zariya-success-light:   #ecfdf5;
    --zariya-danger:          #ef4444;   /* Rose / Red */
    --zariya-danger-light:    #fef2f2;
    --zariya-warning:         #f59e0b;
    --zariya-warning-light:   #fffbeb;

    /* Neutrals & Surfaces */
    --zariya-bg:              #f8fafc;   /* Slate 50 background */
    --zariya-surface:         #ffffff;   /* Pure white card surface */
    --zariya-border:          #e2e8f0;   /* Slate 200 hairline border */
    --zariya-border-subtle:   #f1f5f9;
    --zariya-text:            #0f172a;   /* Slate 900 primary heading/text */
    --zariya-text-body:       #334155;   /* Slate 700 body text */
    --zariya-muted:           #64748b;   /* Slate 500 secondary text */
    --zariya-muted-light:     #94a3b8;

    /* Sidebar - Slate 900 Dark Elegance */
    --sidebar-width:          260px;
    --sidebar-bg:             #0f172a;   /* Deep Slate */
    --sidebar-border:         #1e293b;
    --sidebar-text:           #94a3b8;
    --sidebar-text-hover:     #f8fafc;
    --sidebar-item-active-bg: rgba(37, 99, 235, 0.14);
    --sidebar-item-active-color: #60a5fa;

    /* Dimensions */
    --top-header-height:      64px;
    --bottom-nav-height:      66px;
    --border-radius-sm:       8px;
    --border-radius:          14px;
    --border-radius-lg:       18px;

    /* Elevation & Shadows */
    --shadow-xs:              0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow-sm:              0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --shadow-md:              0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg:              0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-hover:           0 12px 20px -3px rgb(0 0 0 / 0.1), 0 6px 8px -4px rgb(0 0 0 / 0.06);

    --transition:             all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Global Reset & Typography ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;    /* 15px */
    line-height: 1.5;
    background-color: var(--zariya-bg);
    color: var(--zariya-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--zariya-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--zariya-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--zariya-primary-hover);
}

/* ─── Layout Structure (Left Sidebar + Main Content) ────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ─── Left Sidebar (Desktop Fixed) ──────────────────────────────── */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar::-webkit-scrollbar {
    width: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* Brand Section */
.sidebar-brand {
    height: var(--top-header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.brand-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.35rem;
    margin-top: 0.5rem;
}
.sidebar-heading:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    color: #64748b;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--sidebar-text-hover);
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-link:hover i {
    color: #93c5fd;
}

.sidebar-link.active {
    color: var(--sidebar-item-active-color);
    background: var(--sidebar-item-active-bg);
    font-weight: 600;
}

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

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 4px;
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.sidebar-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
}

/* User Profile Footer inside Sidebar */
.sidebar-user-footer {
    padding: 1rem 0.85rem;
    border-top: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, 0.2);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-role {
    font-size: 0.725rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Main Content Canvas ────────────────────────────────────────── */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--zariya-bg);
}

@media (min-width: 992px) {
    .app-main {
        margin-left: var(--sidebar-width);
    }
}

/* ─── Topbar / Header (Matching Left Sidebar Dark Theme) ───────── */
.app-topbar {
    height: var(--top-header-height);
    background-color: var(--sidebar-bg); /* Matches left sidebar #0f172a */
    border-bottom: 1px solid var(--sidebar-border); /* Matches #1e293b */
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

@media (max-width: 991.98px) {
    .app-topbar {
        padding: 0 1rem;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.topbar-date-pill {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-date-pill i {
    color: #60a5fa;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* User profile button in dark topbar */
.btn-topbar-user {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 10px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-topbar-user:hover, .btn-topbar-user:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
}

/* Mobile Sidebar Toggle Button */
.btn-sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 1.25rem;
    padding: 0;
    transition: var(--transition);
}
.btn-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* ─── Modern Attractive Back Button ─────────────────────────────── */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--zariya-border);
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

.btn-back i {
    font-size: 1rem;
    color: var(--zariya-primary);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back:hover {
    color: var(--zariya-primary-hover);
    background: #f8fafc;
    border-color: #bfdbfe;
    transform: translateX(-3px);
    box-shadow: var(--shadow-sm);
}

.btn-back:hover i {
    transform: translateX(-3px);
}

/* ─── Standalone Action Icon Buttons with Spacing ─────────────────── */
.action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px; /* Distinct gap between action icons */
}

.btn-action-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 0.875rem;
    border: 1px solid var(--zariya-border);
    background: #ffffff;
    color: #475569;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.btn-action-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-action-icon.view {
    color: #2563eb;
    background: #ffffff;
    border-color: #dbeafe;
}
.btn-action-icon.view:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn-action-icon.edit {
    color: #475569;
    background: #ffffff;
    border-color: var(--zariya-border);
}
.btn-action-icon.edit:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.btn-action-icon.danger {
    color: #dc2626;
    background: #ffffff;
    border-color: #fee2e2;
}
.btn-action-icon.danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.btn-action-icon.success {
    color: #059669;
    background: #ffffff;
    border-color: #d1fae5;
}
.btn-action-icon.success:hover {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

/* ─── Main Viewport Area ─────────────────────────────────────────── */
.app-content {
    flex: 1;
    padding: 1.5rem;
}

@media (max-width: 991.98px) {
    .app-content {
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }
}

/* ─── Bottom Navigation Bar (Mobile Native App Look) ─────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--zariya-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--zariya-muted);
    gap: 3px;
    padding: 6px 4px;
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.35rem;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item span {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.bottom-nav-item.active {
    color: var(--zariya-primary);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--zariya-primary);
    filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.35));
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 14px;
    height: 3px;
    background: var(--zariya-primary);
    border-radius: 9999px;
}

/* ─── Cards & Surfaces ───────────────────────────────────────────── */
.card {
    border: 1px solid var(--zariya-border);
    border-radius: var(--border-radius);
    background-color: var(--zariya-surface);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--zariya-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-top-left-radius: var(--border-radius) !important;
    border-top-right-radius: var(--border-radius) !important;
}

.card-body {
    padding: 1.25rem;
}

/* ─── Modern KPI Stat Cards ──────────────────────────────────────── */
.stat-card-modern {
    background: #ffffff;
    border: 1px solid var(--zariya-border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zariya-muted);
    margin: 0;
}

.stat-icon-chip {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon-chip.primary {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}
.stat-icon-chip.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.stat-icon-chip.amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}
.stat-icon-chip.danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stat-card-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--zariya-text);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.stat-card-subtext {
    font-size: 0.775rem;
    color: var(--zariya-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Buttons & Controls ─────────────────────────────────────────── */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.55rem 1.1rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--zariya-primary);
    border-color: var(--zariya-primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--zariya-primary-hover);
    border-color: var(--zariya-primary-hover);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
    color: var(--zariya-primary);
    border-color: #bfdbfe;
    background: #ffffff;
}
.btn-outline-primary:hover {
    background: var(--zariya-primary);
    border-color: var(--zariya-primary);
    color: #ffffff;
}

/* Attendance Marking Pill Buttons */
.attendance-btn-group {
    display: inline-flex;
    border-radius: 10px;
    padding: 3px;
    background: #f1f5f9;
    border: 1px solid var(--zariya-border);
}

.btn-att {
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.825rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    color: var(--zariya-muted);
    transition: var(--transition);
    min-height: 38px;
}

.btn-att-present:hover { color: #059669; background: #ecfdf5; }
.btn-att-present.active {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.btn-att-half:hover { color: #d97706; background: #fffbeb; }
.btn-att-half.active {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.btn-att-absent:hover { color: #dc2626; background: #fef2f2; }
.btn-att-absent.active {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* ─── Form Inputs ────────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--zariya-border);
    padding: 0.6rem 0.85rem;
    font-size: 0.925rem;
    color: var(--zariya-text);
    background-color: #ffffff;
    min-height: 44px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--zariya-text);
    margin-bottom: 0.35rem;
}

.input-group-text {
    background-color: #f8fafc;
    border: 1px solid var(--zariya-border);
    color: var(--zariya-muted);
    border-radius: 10px;
}

/* ─── Modern Tables ──────────────────────────────────────────────── */
.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table > thead {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--zariya-border);
}

.table > thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zariya-muted);
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}

.table > tbody > tr {
    transition: background-color var(--transition);
    border-bottom: 1px solid var(--zariya-border-subtle);
}

.table > tbody > tr:hover {
    background-color: #f8fafc;
}

.table > tbody td {
    padding: 0.9rem 1rem;
    color: var(--zariya-text-body);
    font-size: 0.875rem;
    border: none;
}

/* ─── Badges & Status Pills ──────────────────────────────────────── */
.badge {
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 6px;
    letter-spacing: 0.01em;
}

.badge-present {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-half {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

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

.badge-half-ot {
    background-color: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.badge-full-ot {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

/* Overtime button styling for daily attendance */
.btn-outline-indigo {
    color: #4f46e5;
    border-color: #a5b4fc;
    background-color: #ffffff;
}
.btn-outline-indigo:hover {
    color: #ffffff;
    background-color: #6366f1;
    border-color: #6366f1;
}
.btn-check:checked + .btn-outline-indigo {
    color: #ffffff !important;
    background-color: #6366f1 !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 0.15rem rgba(99, 102, 241, 0.25);
}

.btn-outline-cyan {
    color: #0284c7;
    border-color: #7dd3fc;
    background-color: #ffffff;
}
.btn-outline-cyan:hover {
    color: #ffffff;
    background-color: #0284c7;
    border-color: #0284c7;
}
.btn-check:checked + .btn-outline-cyan {
    color: #ffffff !important;
    background-color: #0284c7 !important;
    border-color: #0369a1 !important;
    box-shadow: 0 0 0 0.15rem rgba(2, 132, 199, 0.25);
}

.badge-own {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-contractual {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ─── Amount Badges & Colors ─────────────────────────────────────── */
.amount-positive { color: #059669; font-weight: 700; }
.amount-negative { color: #dc2626; font-weight: 700; }
.amount-neutral  { color: #64748b; font-weight: 600; }

/* ─── Mobile App Optimization System (< 768px) ──────────────────── */
@media (max-width: 767.98px) {
    :root {
        --top-header-height: 54px;
        --bottom-nav-height: 60px;
        --border-radius: 12px;
    }

    body {
        font-size: 0.875rem; /* 14px */
    }

    .app-topbar {
        height: 54px;
        padding: 0 0.85rem;
    }

    .topbar-page-title {
        font-size: 1.05rem;
        font-weight: 700;
    }

    .btn-sidebar-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
    }

    .app-content {
        padding: 0.75rem 0.75rem calc(var(--bottom-nav-height) + 20px) 0.75rem;
    }

    /* Compact Micro KPI Stat Cards */
    .stat-card-modern {
        padding: 0.65rem 0.75rem !important;
        border-radius: 12px !important;
        min-height: 68px;
    }

    .stat-card-header {
        margin-bottom: 0.35rem !important;
    }

    .stat-card-title {
        font-size: 0.6875rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.03em !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-icon-chip {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }

    .stat-card-value {
        font-size: 1.2rem !important;
        font-weight: 800 !important;
        margin-bottom: 0 !important;
        line-height: 1.15 !important;
    }

    .stat-card-subtext {
        display: none !important; /* Hide subtext on mobile to save vertical space */
    }

    /* Page Titles & Headers */
    .page-header-title {
        font-size: 1.15rem !important;
        margin-bottom: 0.15rem !important;
    }

    .page-header-desc {
        display: none !important; /* Hide verbose descriptive text on phone screens */
    }

    /* Cards */
    .card {
        border-radius: 12px;
    }
    .card-header {
        padding: 0.75rem 0.85rem;
    }
    .card-body {
        padding: 0.75rem;
    }

    /* Mobile Form Controls */
    .form-control, .form-select {
        min-height: 40px;
        font-size: 0.875rem;
        padding: 0.45rem 0.75rem;
    }
    .btn {
        min-height: 38px;
        font-size: 0.85rem;
        padding: 0.45rem 0.85rem;
    }

    /* Attendance Specific */
    .attendance-card {
        border-radius: 12px !important;
        margin-bottom: 0.5rem !important;
    }
    .attendance-card .card-body {
        padding: 0.65rem 0.75rem !important;
    }
    .attendance-sticky-save {
        position: sticky;
        bottom: calc(var(--bottom-nav-height) + 8px) !important;
        margin-bottom: 0 !important;
        padding: 0.65rem 0.85rem !important;
        border-radius: 12px !important;
        z-index: 1025 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    }
}

/* ─── Compact Native Mobile List Component ──────────────────────── */
.mobile-list-group {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--zariya-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.mobile-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--zariya-border-subtle);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    gap: 10px;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-item:active {
    background-color: #f1f5f9;
}

.mobile-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mobile-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.mobile-item-info {
    min-width: 0;
    flex: 1;
}

.mobile-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--zariya-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.mobile-item-subtitle {
    font-size: 0.75rem;
    color: var(--zariya-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    margin-top: 2px;
}

.mobile-item-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.mobile-item-amount {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.mobile-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.btn-action-icon-xs {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 0.775rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zariya-border);
    background: #ffffff;
    color: #475569;
    padding: 0;
    text-decoration: none;
    transition: var(--transition);
}

.btn-action-icon-xs:hover, .btn-action-icon-xs:active {
    background: #f1f5f9;
    color: #0f172a;
}

.btn-action-icon-xs.edit {
    color: #475569;
    border-color: var(--zariya-border);
}
.btn-action-icon-xs.danger {
    color: #dc2626;
    border-color: #fee2e2;
}
.btn-action-icon-xs.view {
    color: #2563eb;
    border-color: #dbeafe;
}

/* ─── Mobile Table Fallback to Clean Cards ───────────────────────── */
@media (max-width: 767.98px) {
    .table-card-mobile thead { display: none; }
    .table-card-mobile tr {
        display: block;
        background: #ffffff;
        border: 1px solid var(--zariya-border);
        border-radius: 12px;
        margin-bottom: 0.5rem;
        padding: 0.6rem 0.75rem;
        box-shadow: var(--shadow-xs);
    }
    .table-card-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        font-size: 0.8125rem;
        border: none !important;
    }
    .table-card-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--zariya-muted);
        font-size: 0.725rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
}

/* ─── Login Screen (Ultra Sleek) ─────────────────────────────────── */
.login-canvas {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #1e293b 0%, #0f172a 90%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-canvas::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    pointer-events: none;
}

.login-canvas::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-card-modern {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.75rem 2.25rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
}

.login-brand-badge {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.85rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

/* ─── Offline Banner ─────────────────────────────────────────────── */
#offline-banner {
    display: none;
    background: #b45309;
    color: #ffffff;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── SweetAlert2 Modern Skin Overrides ─────────────────────────── */
.swal2-popup {
    border-radius: 18px !important;
    font-family: 'Inter', sans-serif !important;
    padding: 1.75rem !important;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
}
.swal2-title {
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
}
.swal2-html-container {
    color: #475569 !important;
    font-size: 0.925rem !important;
}
.swal2-actions {
    gap: 10px !important;
}
.swal2-styled {
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.4rem !important;
}