/* ==========================================================================
   URBAN sync — Comprehensive Design System & Brand Theme
   Warm Sunset Saffron / Modern Terracotta & Obsidian.
   Vibrant, community-centric, high-trust UI for modern societies.
   ========================================================================== */

:root {
    --sidebar-width: 264px;

    /* --- Primary Brand Colors (Warm Saffron / Sunset Orange) --- */
    --co-primary: #EA580C;            /* Primary Vibrant Orange (Orange 600) */
    --co-primary-hover: #C2410C;      /* Deep Orange 700 */
    --co-primary-active: #9A3412;     /* Orange 800 */
    --co-primary-rgb: 234, 88, 12;
    --co-primary-light: #FFF8F3;      /* Saffron Cream / Warm Tint */
    --co-primary-soft: #FFEDD5;       /* Soft Orange 100 */

    /* --- Secondary & Dark Neutrals --- */
    --co-secondary: #0B0B0B;
    --co-text-dark: #1F2937;          /* High contrast charcoal */
    --co-text-muted: #6B7280;         /* Gray 500 */
    --co-body-bg: #F8F9FA;            /* Soft off-white canvas */
    --co-border-light: #ECECEC;       /* Delicate card border */
    --co-card-bg: #FFFFFF;

    /* --- Functional & Status Accents --- */
    --co-success: #15803D;
    --co-success-bg: #F0FDF4;
    --co-success-border: #BBF7D0;

    --co-warning: #D97706;
    --co-warning-bg: #FFFBEB;
    --co-warning-border: #FDE68A;

    --co-danger: #DC2626;
    --co-danger-bg: #FEF2F2;
    --co-danger-border: #FECACA;

    --co-info: #0284C7;
    --co-info-bg: #F0F9FF;
    --co-info-border: #BAE6FD;

    --co-purple: #7C3AED;
    --co-purple-bg: #FAF5FF;
    --co-purple-border: #E9D5FF;

    /* --- Sidebar Theming (Dark Luxury Obsidian / Slate) --- */
    --co-sidebar-bg: #0F172A;
    --co-sidebar-bg2: #1E293B;
    --co-sidebar-muted: #94A3B8;
    --co-sidebar-hover: rgba(255, 255, 255, 0.08);

    /* --- Shadows & Glow --- */
    --co-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 25px -5px rgba(0, 0, 0, 0.03);
    --co-card-hover-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
    --co-orange-glow: 0 10px 30px -10px rgba(234, 88, 12, 0.35);
}

/* Re-point Bootstrap's "primary" to the brand sunset orange */
:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bs-primary: #EA580C;
    --bs-primary-rgb: 234, 88, 12;
    --bs-link-color: #EA580C;
    --bs-link-color-rgb: 234, 88, 12;
    --bs-link-hover-color: #C2410C;
}

body {
    background: var(--co-body-bg);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--co-text-dark);
    font-size: .925rem;
    letter-spacing: -0.01em;
}

/* Form Controls & Focus Ring */
.form-control, .form-select {
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    font-size: 0.92rem;
    padding: 0.65rem 0.9rem;
    transition: all 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #FB923C;
    box-shadow: 0 0 0 .22rem rgba(234, 88, 12, 0.2);
}
.form-check-input:checked {
    background-color: var(--co-primary);
    border-color: var(--co-primary);
}

/* Pagination & Links */
.pagination {
    --bs-pagination-color: var(--co-primary);
    --bs-pagination-hover-color: var(--co-primary-hover);
    --bs-pagination-active-bg: var(--co-primary);
    --bs-pagination-active-border-color: var(--co-primary);
    --bs-pagination-focus-color: var(--co-primary-hover);
}
.btn-link {
    --bs-btn-color: var(--co-primary);
    --bs-btn-hover-color: var(--co-primary-hover);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--co-primary) !important;
    border-color: var(--co-primary) !important;
    color: #fff !important;
    border-radius: 0.5rem;
}
.text-primary {
    color: var(--co-primary) !important;
}

/* ---- Layout ------------------------------------------------------------- */
.app-wrapper { display: flex; min-height: 100vh; }
.app-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.app-content { flex: 1 1 auto; }

/* ---- Sidebar ----------------------------------------------------------- */
.app-sidebar {
    width: var(--sidebar-width); flex: 0 0 var(--sidebar-width);
    background: linear-gradient(180deg, var(--co-sidebar-bg) 0%, var(--co-sidebar-bg2) 100%);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.08);
    z-index: 1030;
}
.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }

.sidebar-brand {
    color: #fff;
    padding: 1.15rem 1.25rem;
}
.sidebar-society {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav { padding-bottom: 2.5rem; }
.sidebar-nav .nav-link {
    color: #cbd5e1;
    border-radius: 0.75rem;
    margin: 0.15rem 0.65rem;
    padding: 0.65rem 0.95rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 1.5rem; }
.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, #EA580C 0%, #F97316 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.45);
    font-weight: 600;
}
.nav-section {
    letter-spacing: 0.09em;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 1.2rem !important;
    color: var(--co-sidebar-muted) !important;
}

/* ---- Navbar ------------------------------------------------------------ */
.app-navbar {
    position: sticky; top: 0; z-index: 1020; height: 64px;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    border-bottom: 1px solid var(--co-border-light);
}
.app-navbar .dropdown-toggle::after { display: none; }

/* ---- Cards System ------------------------------------------------------ */
.card {
    border: 1px solid var(--co-border-light);
    border-radius: 1rem;
    box-shadow: var(--co-card-shadow);
    background: var(--co-card-bg);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
    box-shadow: var(--co-card-hover-shadow);
}
.card .card-body { padding: 1.25rem 1.35rem; }
.shadow-sm { box-shadow: var(--co-card-shadow) !important; }

/* ---- Dual-Tone Icon Pill Containers ------------------------------------ */
.icon-pill {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.icon-pill-orange { background: #FFF8F3; color: #EA580C; border: 1px solid #FFEDD5; }
.icon-pill-blue   { background: #EFF6FF; color: #2563EB; border: 1px solid #DBEAFE; }
.icon-pill-green  { background: #F0FDF4; color: #16A34A; border: 1px solid #DCFCE7; }
.icon-pill-purple { background: #FAF5FF; color: #9333EA; border: 1px solid #F3E8FF; }
.icon-pill-amber  { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.icon-pill-red    { background: #FEF2F2; color: #DC2626; border: 1px solid #FEE2E2; }
.icon-pill-sky    { background: #F0F9FF; color: #0284C7; border: 1px solid #E0F2FE; }

/* Stat tiles */
.stat-card {
    border-radius: 1rem;
    border: 1px solid var(--co-border-light);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--co-card-hover-shadow);
}
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 14px; flex: 0 0 48px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.stat-card .card-body { padding: 1.1rem 1.25rem; }
.stat-card .stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: #111827;
}
.stat-card .stat-label {
    color: var(--co-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Tinted icon backgrounds */
.bg-soft-primary { background: #FFF8F3; color: #EA580C; border: 1px solid #FFEDD5; }
.bg-soft-success { background: #F0FDF4; color: #16A34A; border: 1px solid #DCFCE7; }
.bg-soft-info    { background: #F0F9FF; color: #0284C7; border: 1px solid #E0F2FE; }
.bg-soft-warning { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.bg-soft-danger  { background: #FEF2F2; color: #DC2626; border: 1px solid #FEE2E2; }
.bg-soft-purple  { background: #FAF5FF; color: #7C3AED; border: 1px solid #E9D5FF; }
.bg-soft-dark    { background: #F3F4F6; color: #374151; border: 1px solid #E5E7EB; }
.bg-soft-secondary { background: #F8FAFC; color: #64748B; border: 1px solid #E2E8F0; }

/* ---- Charts (fixed-height wrappers prevent infinite grow) -------------- */
.chart-box { position: relative; width: 100%; }
.chart-box.h-sm { height: 230px; }
.chart-box.h-md { height: 300px; }
.chart-box.h-lg { height: 340px; }
.chart-box canvas { max-height: 100%; }
.chart-box:not(.chart-ready)::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px;
    margin: -14px 0 0 -14px; border: 3px solid var(--co-primary); border-right-color: transparent;
    border-radius: 50%; animation: co-spin .7s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

.min-w-0 { min-width: 0; }

/* ---- Settings sub-navigation -------------------------------------------- */
.settings-nav-link {
    display: flex; align-items: flex-start; gap: .65rem; padding: .65rem .85rem;
    border-radius: .7rem; color: inherit; margin-bottom: .2rem; transition: background .15s ease;
}
.settings-nav-link i { font-size: 1.05rem; margin-top: .15rem; color: var(--co-primary); }
.settings-nav-link:hover { background: rgba(var(--co-primary-rgb), .08); color: inherit; }
.settings-nav-link.active { background: rgba(var(--co-primary-rgb), .12); }
.settings-nav-link.active i, .settings-nav-link.active .fw-semibold { color: var(--co-primary); }
[data-bs-theme="dark"] .settings-nav-link.active .fw-semibold { color: #FB923C; }
.settings-nav-group:not(:first-child) { margin-top: .5rem; }

/* Option grid */
.option-grid { display: grid; gap: .6rem; }
.option-tile input { position: absolute; opacity: 0; }
.option-tile label {
    display: block; cursor: pointer; padding: .75rem .9rem; border: 1.5px solid var(--bs-border-color);
    border-radius: .75rem; font-weight: 500; transition: all .12s ease;
}
.option-tile input:checked + label {
    border-color: var(--co-primary); background: rgba(var(--co-primary-rgb), .08); color: var(--co-primary);
}
[data-bs-theme="dark"] .option-tile input:checked + label { color: #FB923C; }
.option-tile label .opt-sub { font-weight: 400; font-size: .78rem; }

/* ---- Tables ------------------------------------------------------------ */
.table { --bs-table-color: #334155; }
.table thead th {
    white-space: nowrap; text-transform: uppercase; font-size: .72rem;
    letter-spacing: .05em; color: #64748B; font-weight: 700; border-bottom-width: 1px;
}
.table > :not(caption) > * > * { padding: .75rem .85rem; }
.table-hover > tbody > tr:hover > * { background: #FFF8F3; }

/* ---- Status badges ----------------------------------------------------- */
.badge { font-weight: 600; padding: .4em .7em; border-radius: .55rem; font-size: 0.75rem; }
.badge.status-open, .badge.status-pending, .badge.status-trial { background: #FEF3C7; color: #92400E; }
.badge.status-in_progress, .badge.status-assigned, .badge.status-approved { background: #DBEAFE; color: #1E40AF; }
.badge.status-resolved, .badge.status-paid, .badge.status-active, .badge.status-completed, .badge.status-in { background: #DCFCE7; color: #166534; }
.badge.status-closed, .badge.status-cancelled, .badge.status-suspended, .badge.status-inactive, .badge.status-out { background: #E2E8F0; color: #475569; }
.badge.status-overdue, .badge.status-failed, .badge.status-rejected, .badge.status-expired { background: #FEE2E2; color: #991B1B; }

/* ---- Buttons / misc ---------------------------------------------------- */
.btn { border-radius: .65rem; font-weight: 600; padding: 0.55rem 1.15rem; transition: all 0.15s ease; }
.btn-primary { background: var(--co-primary); border-color: var(--co-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--co-primary-hover); border-color: var(--co-primary-hover); color: #fff; box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35); }
.btn-outline-primary { color: var(--co-primary); border-color: var(--co-primary); }
.btn-outline-primary:hover { background: var(--co-primary); border-color: var(--co-primary); color: #fff; }
a { color: var(--co-primary); text-decoration: none; }
a:hover { color: var(--co-primary-hover); }
.page-title { font-weight: 800; letter-spacing: -.03em; color: #111827; }
.app-footer { background: transparent; }

/* Nav tabs */
.nav-tabs { border-bottom-color: #E2E8F0; }
.nav-tabs .nav-link { color: #64748B; border: 0; border-bottom: 2px solid transparent; font-weight: 600; padding: 0.65rem 1rem; }
.nav-tabs .nav-link.active { color: var(--co-primary); background: transparent; border-bottom-color: var(--co-primary); }

/* Quick Action Circle Buttons */
.quick-action-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #FED7AA;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: var(--co-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08);
}
.quick-action-circle:hover, .quick-action-circle:active {
    transform: scale(1.06);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.18);
    border-color: var(--co-primary);
}

/* ---- Mobile Data Cards ------------------------------------------------- */
.mobile-data-card {
    background: var(--bs-card-bg, #ffffff);
    border: 1px solid var(--co-border-light, #ECECEC);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--co-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    word-break: break-word;
    overflow-wrap: break-word;
}
.mobile-data-card:active { transform: scale(0.995); }
.mobile-data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.mobile-data-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: #1F2937;
}
.mobile-data-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12.5px;
    color: var(--co-text-muted);
    line-height: 1.45;
}
.mobile-data-card-meta span { display: inline-flex; align-items: center; }
.mobile-data-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .app-sidebar.show { transform: translateX(0); }
}

@media (max-width: 767.98px) {
    body { overflow-x: hidden; }
    .app-main { overflow-x: hidden; }
    .app-content { padding: 12px 14px 32px 14px !important; overflow-x: hidden; }
    .page-title { font-size: 1.3rem !important; }
    .stat-card .stat-value { font-size: clamp(0.92rem, 3.8vw, 1.3rem) !important; }
}

/* ==========================================================================
   Dark theme — activated by <html data-bs-theme="dark">
   ========================================================================== */
[data-bs-theme="dark"] {
    --co-body-bg: #0B1220;
    --co-card-bg: #172336;
    --co-border-light: #23334A;
    --co-text-dark: #F1F5F9;
    --co-text-muted: #94A3B8;
    --co-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --co-card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
[data-bs-theme="dark"] body { color: #cbd5e1; }
[data-bs-theme="dark"] .app-navbar { background: #0f172a !important; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); border-bottom-color: #1e293b; }
[data-bs-theme="dark"] .card { background-color: var(--co-card-bg); border-color: var(--co-border-light); }
[data-bs-theme="dark"] .page-title { color: #f1f5f9; }
[data-bs-theme="dark"] .stat-card .stat-value { color: #f8fafc; }
[data-bs-theme="dark"] .stat-card .stat-label,
[data-bs-theme="dark"] .table thead th { color: #94a3b8; }
[data-bs-theme="dark"] .table { --bs-table-color: #cbd5e1; --bs-table-bg: transparent; --bs-table-border-color: #23334A; }
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * { background: rgba(234, 88, 12, 0.08); }
[data-bs-theme="dark"] a { color: #FB923C; }
[data-bs-theme="dark"] a:hover { color: #FDBA74; }
[data-bs-theme="dark"] .text-dark { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .btn-outline-secondary { color: #cbd5e1; border-color: #475569; }
[data-bs-theme="dark"] .modal-content { background-color: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .dropdown-menu { background-color: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .nav-tabs { border-bottom-color: #334155; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: #0f1b2d; border-color: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .form-control::placeholder { color: #64748b; }
[data-bs-theme="dark"] .input-group-text { background-color: #1e293b; border-color: #334155; color: #cbd5e1; }
[data-bs-theme="dark"] .border, [data-bs-theme="dark"] .border-bottom, [data-bs-theme="dark"] .border-top { border-color: #334155 !important; }

/* Dark icon pills */
[data-bs-theme="dark"] .bg-soft-primary, [data-bs-theme="dark"] .icon-pill-orange { background: rgba(234, 88, 12, 0.20); color: #FB923C; border-color: rgba(234, 88, 12, 0.35); }
[data-bs-theme="dark"] .bg-soft-success, [data-bs-theme="dark"] .icon-pill-green  { background: rgba(22, 163, 74, 0.18); color: #4ade80; border-color: rgba(22, 163, 74, 0.3); }
[data-bs-theme="dark"] .bg-soft-info,    [data-bs-theme="dark"] .icon-pill-sky    { background: rgba(2, 132, 199, 0.18); color: #38bdf8; border-color: rgba(2, 132, 199, 0.3); }
[data-bs-theme="dark"] .bg-soft-warning, [data-bs-theme="dark"] .icon-pill-amber  { background: rgba(202, 138, 4, 0.20); color: #fcd34d; border-color: rgba(202, 138, 4, 0.35); }
[data-bs-theme="dark"] .bg-soft-danger,  [data-bs-theme="dark"] .icon-pill-red    { background: rgba(220, 38, 38, 0.18); color: #f87171; border-color: rgba(220, 38, 38, 0.3); }
[data-bs-theme="dark"] .bg-soft-purple,  [data-bs-theme="dark"] .icon-pill-purple { background: rgba(124, 58, 237, 0.20); color: #c084fc; border-color: rgba(124, 58, 237, 0.35); }
[data-bs-theme="dark"] .bg-soft-dark     { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
[data-bs-theme="dark"] .bg-soft-secondary{ background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }

[data-bs-theme="dark"] .mobile-data-card { background: #172336; border-color: #23334A; }
[data-bs-theme="dark"] .mobile-data-card-title { color: #F1F5F9; }
[data-bs-theme="dark"] .mobile-data-card-footer { border-top-color: rgba(255, 255, 255, 0.08); }
[data-bs-theme="dark"] .quick-action-circle { background: #1E293B; border-color: #EA580C; }

/* ==========================================================================
   URBAN sync Dashboard Design System Tokens
   ========================================================================== */
.kutumb-hero {
    background: linear-gradient(135deg, #FFF8F3 0%, #FFFFFF 100%);
    border: 1px solid #FFEDD5;
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(234, 88, 12, 0.07);
    transition: background 0.2s ease, border-color 0.2s ease;
}
[data-bs-theme="dark"] .kutumb-hero {
    background: linear-gradient(135deg, #162235 0%, #0F172A 100%) !important;
    border: 1px solid rgba(234, 88, 12, 0.3) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 15px -2px rgba(234, 88, 12, 0.15) !important;
}

.kutumb-weather-pill {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #1F2937;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}
[data-bs-theme="dark"] .kutumb-weather-pill {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #F1F5F9 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.kutumb-divider {
    border-top: 1px solid rgba(234, 88, 12, 0.12);
}
[data-bs-theme="dark"] .kutumb-divider {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Quick Action Circle & Text */
.kutumb-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    transition: transform 0.18s ease;
}
.kutumb-action-btn:hover {
    transform: translateY(-2px);
}
.kutumb-action-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    background: #FFFFFF;
}
.kutumb-action-btn:hover .kutumb-action-circle {
    transform: scale(1.08);
}
.kutumb-action-circle.circle-orange { border: 2px solid #FED7AA; color: #EA580C; box-shadow: 0 4px 12px rgba(234, 88, 12, 0.10); }
.kutumb-action-circle.circle-red    { border: 2px solid #FECACA; color: #DC2626; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.10); }
.kutumb-action-circle.circle-blue   { border: 2px solid #BAE6FD; color: #0284C7; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.10); }
.kutumb-action-circle.circle-amber  { border: 2px solid #FDE68A; color: #D97706; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.10); }
.kutumb-action-circle.circle-purple { border: 2px solid #E9D5FF; color: #7C3AED; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.10); }
.kutumb-action-circle.circle-green  { border: 2px solid #BBF7D0; color: #16A34A; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.10); }

[data-bs-theme="dark"] .kutumb-action-circle {
    background: #1E293B !important;
}
[data-bs-theme="dark"] .kutumb-action-circle.circle-orange { border-color: rgba(234, 88, 12, 0.5) !important; color: #FB923C !important; box-shadow: 0 4px 14px rgba(234, 88, 12, 0.22) !important; }
[data-bs-theme="dark"] .kutumb-action-circle.circle-red    { border-color: rgba(220, 38, 38, 0.5) !important; color: #F87171 !important; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22) !important; }
[data-bs-theme="dark"] .kutumb-action-circle.circle-blue   { border-color: rgba(2, 132, 199, 0.5) !important; color: #38BDF8 !important; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22) !important; }
[data-bs-theme="dark"] .kutumb-action-circle.circle-amber  { border-color: rgba(217, 119, 6, 0.5) !important; color: #FCD34D !important; box-shadow: 0 4px 14px rgba(217, 119, 6, 0.22) !important; }
[data-bs-theme="dark"] .kutumb-action-circle.circle-purple { border-color: rgba(124, 58, 237, 0.5) !important; color: #C084FC !important; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.22) !important; }
[data-bs-theme="dark"] .kutumb-action-circle.circle-green  { border-color: rgba(22, 163, 74, 0.5) !important; color: #4ADE80 !important; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.22) !important; }

.kutumb-action-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--co-text-dark);
    margin-top: 6px;
    text-align: center;
    line-height: 1.25;
}
[data-bs-theme="dark"] .kutumb-action-label {
    color: #F1F5F9 !important;
}

/* Kutumb StatCard */
.kutumb-stat-card {
    background: var(--co-card-bg);
    border: 1px solid var(--co-border-light);
    border-radius: 1rem;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--co-card-shadow);
    text-decoration: none !important;
    color: inherit !important;
    height: 100%;
}
.kutumb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--co-card-hover-shadow);
    border-color: rgba(234, 88, 12, 0.3);
}
.kutumb-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.kutumb-stat-card:hover .kutumb-icon-box {
    transform: scale(1.06);
}
.kutumb-icon-box.box-orange { background: #FFF8F3; color: #EA580C; border: 1px solid #FFEDD5; }
.kutumb-icon-box.box-blue   { background: #EFF6FF; color: #2563EB; border: 1px solid #DBEAFE; }
.kutumb-icon-box.box-green  { background: #F0FDF4; color: #16A34A; border: 1px solid #DCFCE7; }
.kutumb-icon-box.box-red    { background: #FEF2F2; color: #DC2626; border: 1px solid #FEE2E2; }
.kutumb-icon-box.box-amber  { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.kutumb-icon-box.box-purple { background: #FAF5FF; color: #7C3AED; border: 1px solid #F3E8FF; }

[data-bs-theme="dark"] .kutumb-stat-card {
    background: #172336 !important;
    border-color: #23334A !important;
}
[data-bs-theme="dark"] .kutumb-stat-card:hover {
    border-color: rgba(234, 88, 12, 0.4) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
}
[data-bs-theme="dark"] .kutumb-icon-box.box-orange { background: rgba(234, 88, 12, 0.20) !important; color: #FB923C !important; border-color: rgba(234, 88, 12, 0.35) !important; }
[data-bs-theme="dark"] .kutumb-icon-box.box-blue   { background: rgba(37, 99, 235, 0.20) !important; color: #60A5FA !important; border-color: rgba(37, 99, 235, 0.35) !important; }
[data-bs-theme="dark"] .kutumb-icon-box.box-green  { background: rgba(22, 163, 74, 0.20) !important; color: #4ADE80 !important; border-color: rgba(22, 163, 74, 0.35) !important; }
[data-bs-theme="dark"] .kutumb-icon-box.box-red    { background: rgba(220, 38, 38, 0.20) !important; color: #F87171 !important; border-color: rgba(220, 38, 38, 0.35) !important; }
[data-bs-theme="dark"] .kutumb-icon-box.box-amber  { background: rgba(217, 119, 6, 0.20) !important; color: #FCD34D !important; border-color: rgba(217, 119, 6, 0.35) !important; }
[data-bs-theme="dark"] .kutumb-icon-box.box-purple { background: rgba(124, 58, 237, 0.20) !important; color: #C084FC !important; border-color: rgba(124, 58, 237, 0.35) !important; }

.kutumb-stat-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--co-text-dark);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
[data-bs-theme="dark"] .kutumb-stat-val {
    color: #F8FAFC !important;
}

.kutumb-stat-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--co-text-dark);
}
[data-bs-theme="dark"] .kutumb-stat-title {
    color: #E2E8F0 !important;
}

.kutumb-stat-sub {
    font-size: 0.74rem;
    color: var(--co-text-muted);
}
[data-bs-theme="dark"] .kutumb-stat-sub {
    color: #94A3B8 !important;
}

/* Kutumb PriorityCard & Operations */
.kutumb-priority-card {
    background: var(--co-card-bg);
    border: 1px solid var(--co-border-light);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--co-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}
.kutumb-priority-card:hover {
    box-shadow: var(--co-card-hover-shadow);
}
[data-bs-theme="dark"] .kutumb-priority-card {
    background: #172336 !important;
    border-color: #23334A !important;
}

.kutumb-priority-btn {
    border-radius: 0.75rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #334155;
}
.kutumb-priority-btn:hover {
    background: #F1F5F9;
    color: var(--co-primary);
    border-color: #CBD5E1;
}
[data-bs-theme="dark"] .kutumb-priority-btn {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #CBD5E1 !important;
}
[data-bs-theme="dark"] .kutumb-priority-btn:hover {
    background: #253349 !important;
    color: #FB923C !important;
    border-color: rgba(234, 88, 12, 0.4) !important;
}

/* ==========================================================================
   Mobile Bottom App Bar (Native App UX for Viewports < 768px)
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.25rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .mobile-bottom-nav {
    background: #0F172A;
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748B;
    text-decoration: none !important;
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 12px;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 72px;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 3px;
    transition: transform 0.15s ease;
}

.mobile-nav-item:hover {
    color: var(--co-primary, #EA580C);
}

.mobile-nav-item.active {
    color: var(--co-primary, #EA580C) !important;
}

.mobile-nav-item.active i {
    transform: scale(1.12);
}

[data-bs-theme="dark"] .mobile-nav-item {
    color: #94A3B8;
}

[data-bs-theme="dark"] .mobile-nav-item.active {
    color: #FB923C !important;
}

@media (max-width: 767.98px) {
    .app-main {
        padding-bottom: 74px !important;
    }
}


