:root {
    --primary: #1a5f3f;
    --primary-light: #228b5e;
    --primary-soft: #e8f5ef;
    --accent: #c9973a;
    --accent-soft: #fdf5e6;
    --bg: #f4f6f5;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8e5;
    --text-primary: #1a2922;
    --text-secondary: #5a6e66;
    --text-muted: #8fa49b;
    --input-bg: #ffffff;
    --input-border: #d0dbd6;
    --hover-bg: #f0f7f4;
    --table-stripe: #f8fbf9;
    --shadow: 0 2px 12px rgba(26, 95, 63, 0.08);
    --shadow-md: 0 4px 20px rgba(26, 95, 63, 0.12);
    --sidebar-width: 260px;
    --topbar-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.25s ease;
}
[data-theme="dark"] {
    --bg: #0f1a14;
    --sidebar-bg: #141f17;
    --card-bg: #1a2620;
    --card-border: #253028;
    --text-primary: #e8f2ed;
    --text-secondary: #8fb89e;
    --text-muted: #4d7060;
    --input-bg: #1f2e24;
    --input-border: #2e4038;
    --hover-bg: #1e2f24;
    --table-stripe: #1c2920;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --primary-soft: #1e3028;
    --accent-soft: #2a2010;
}

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

body {
    font-family: "DM Sans", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    transition:
        background var(--transition),
        color var(--transition);
    min-height: 100vh;
}
h1,
h2,
h3,
h4,
h5 {
    /*font-family: "Playfair Display", serif;*/
    font-family: "DM Sans", sans-serif;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.brand-icon {
    width: 38px;
    height: 38px;
    /* background: linear-gradient(135deg, var(--primary), var(--primary-light)); */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}
.brand-text {
    line-height: 1.2;
}
.brand-name {
    /*font-family: "Playfair Display", serif;*/
    font-family: "DM Sans", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}
.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}
.nav-section {
    padding: 0 12px 4px;
}
.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 8px 4px;
}
.nav-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 400;
    transition: all var(--transition);
    cursor: pointer;
    margin-bottom: 1px;
    position: relative;
}
.nav-item-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    justify-content: space-between;
}
.nav-item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.nav-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform var(--transition);
}
.nav-item-toggle[aria-expanded="true"] .nav-arrow {
    transform: rotate(180deg);
}
.nav-item-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.nav-item-link .badge-count {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 600;
}
.nav-item-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.nav-item-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.15);
}

.nav-item-link.active::before {
    width: 4px;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}
.nav-sub {
    padding-left: 30px;
    overflow: hidden;
}
.nav-sub .nav-item-link {
    font-size: 13px;
    padding: 7px 10px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}
.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--hover-bg);
}
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 37px 24px;
    z-index: 1030;
    transition:
        left var(--transition),
        background var(--transition);
}
.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 4px;
    cursor: pointer;
}
.topbar-title {
    /*font-family: "Playfair Display", serif;*/
    font-family: "DM Sans", sans-serif;
    font-size: 20px;
    font-weight: 600;
}
.topbar-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}
.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-btn {
    width: 38px;
    height: 38px;
    background: var(--hover-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
}
.topbar-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
}
.topbar-btn .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: #e74c3c;
    border-radius: 50%;
    border: 1.5px solid var(--card-bg);
}
.theme-toggle {
    font-size: 16px;
}

/* ── MAIN ────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-h);
    min-height: 100vh;
    transition: margin-left var(--transition);
}
.page-body {
    padding: 28px 24px;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition:
        background var(--transition),
        border-color var(--transition);
}
.card-header-custom {
    padding: 18px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title-main {
    font-size: 16px;
    font-weight: 600;
}
.card-body-p {
    padding: 20px;
}

/* ── STAT CARDS ──────────────────────────────────────────── */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.green {
    background: var(--primary-soft);
    color: var(--primary);
}
.stat-icon.amber {
    background: var(--accent-soft);
    color: var(--accent);
}
.stat-icon.blue {
    background: #eef2ff;
    color: #4f46e5;
}
.stat-icon.rose {
    background: #fff1f2;
    color: #e11d48;
}
[data-theme="dark"] .stat-icon.blue {
    background: #1e1f3a;
}
[data-theme="dark"] .stat-icon.rose {
    background: #2a1020;
}
.stat-val {
    font-family: "Playfair Display", serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-change {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}
.stat-change.up {
    color: #16a34a;
}
.stat-change.down {
    color: #dc2626;
}

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-control,
.form-select {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 13.5px;
    transition: all var(--transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26, 95, 63, 0.12) !important;
}
.form-control::placeholder {
    color: var(--text-muted) !important;
}
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm) !important;
}
.btn-primary:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}
.btn-outline-primary {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-size: 13.5px;
    border-radius: var(--radius-sm) !important;
}
.btn-outline-primary:hover {
    background: var(--primary-soft) !important;
}
.btn-accent {
    background: var(--accent);
    border: none;
    color: white;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
}
.btn-sm-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ── TABLE ───────────────────────────────────────────────── */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}
.table-custom thead th {
    background: var(--hover-bg);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}
.table-custom tbody tr {
    transition: background var(--transition);
}
.table-custom tbody tr:hover {
    background: var(--hover-bg);
}
.table-custom tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
    vertical-align: middle;
}
.table-custom tbody tr:nth-child(even) td {
    background: var(--table-stripe);
}
.table-custom tbody tr:nth-child(even):hover td {
    background: var(--hover-bg);
}

/* ── BADGES ──────────────────────────────────────────────── */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
}
.badge-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.badge-active {
    background: #d1fae5;
    color: #065f46;
}
.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}
.badge-ongoing {
    background: #dbeafe;
    color: #1e40af;
}
.badge-completed {
    background: #dcfce7;
    color: #166534;
}
.badge-pending {
    background: #fef9c3;
    color: #854d0e;
}
[data-theme="dark"] .badge-active {
    background: #0d3323;
    color: #6ee7b7;
}
[data-theme="dark"] .badge-inactive {
    background: #3b0a0a;
    color: #fca5a5;
}
[data-theme="dark"] .badge-ongoing {
    background: #1e1f3d;
    color: #93c5fd;
}
[data-theme="dark"] .badge-completed {
    background: #0d2e16;
    color: #86efac;
}
[data-theme="dark"] .badge-pending {
    background: #2d2306;
    color: #fcd34d;
}

/* ── UPLOAD BOX ──────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--input-border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--hover-bg);
    /* height: 100%; */
    width: 100%;
}
.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.upload-zone i {
    font-size: 32px;
    color: var(--text-muted);
}
.upload-zone p {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}
.upload-zone span {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

/* ── SECTION PAGES ───────────────────────────────────────── */
.page-section {
    display: none;
}
.page-section.active {
    display: block;
}

/* ── TABS ────────────────────────────────────────────────── */
.custom-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    width: fit-content;
    flex-wrap: wrap;
}
.custom-tab {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
    border: none;
    background: none;
    text-decoration: none;
}
.custom-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: var(--shadow);
}
.tab-content-area {
    display: none;
}
.tab-content-area.active {
    display: block;
}

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}
.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    /* background: linear-gradient(135deg, var(--primary), var(--primary-light)); */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    margin: 0 auto 20px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .topbar {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .topbar-toggle {
        display: flex;
    }
    .sidebar-overlay.show {
        display: block;
    }
}
@media (max-width: 576px) {
    .page-body {
        padding: 16px 14px;
    }
    .topbar {
        padding: 0 14px;
    }
}

/* ── MISC ────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.section-title {
    font-size: 22px;
    font-weight: 600;
}
.section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.divider {
    border-top: 1px solid var(--card-border);
    margin: 20px 0;
}
.form-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--primary-soft);
    margin-bottom: 16px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 500;
}
.chip .remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.progress-bar-custom {
    height: 6px;
    border-radius: 10px;
    background: var(--card-border);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* Range input */
input[type="range"] {
    accent-color: var(--primary);
}

/* Rich text placeholder */
.rich-editor {
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    min-height: 160px;
    padding: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: border-color var(--transition);
}
.rich-editor:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 63, 0.12);
}
.editor-toolbar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 10px;
    background: var(--hover-bg);
    border: 1px solid var(--input-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-btn {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.editor-btn:hover {
    background: var(--card-bg);
    border-color: var(--card-border);
    color: var(--primary);
}
.rich-editor {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* Color picker row */
.color-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}
.color-swatch:hover {
    transform: scale(1.15);
}
.color-swatch.selected {
    border-color: var(--text-primary);
}

/* Chart placeholder */
.chart-placeholder {
    height: 180px;
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    flex-direction: column;
    gap: 8px;
}

/* Toast */
.toast-custom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
}
.toast-custom.show {
    transform: translateY(0);
    opacity: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--card-border);
}
.timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.timeline-dot {
    position: absolute;
    left: -21px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
}
.timeline-date {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.timeline-text {
    font-size: 13.5px;
    color: var(--text-primary);
    margin-top: 3px;
}

/* Search bar */
.search-bar {
    position: relative;
}
.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}
.search-bar input {
    padding-left: 34px !important;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--hover-bg);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--card-border);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 24px;
}
.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}
.gallery-item:hover .overlay {
    opacity: 1;
}
.overlay-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--primary);
    border: none;
}

.modal-header {
    background-color: #1a5f3f;
    color: white;
}

.project-chart {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.donut {
    transform: rotate(-90deg);
}

.donut-segment {
    fill: none;
    stroke-width: 3.8;
}

.donut-segment.residential {
    stroke: var(--primary);
}

.donut-segment.commercial {
    stroke: var(--accent);
}

.donut-segment.plots {
    stroke: #4f46e5;
}

.chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-total {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.chart-label {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-menu {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    min-width: 160px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 999;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13.5px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.profile-dropdown a:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

/* SHOW ON HOVER */
.profile-menu:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.card h6.text-muted {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-card {
    border-radius: var(--radius-md);
}

.profile-header {
    flex-wrap: wrap;
}

.section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-camera:hover {
    transform: scale(1.08);
}

.visit-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

.badge-confirmed {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.badge-cancel {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.badge-scheduled {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
}

.twofa-switch .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.profile-card {
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.avatar-upload {
    position: relative;
    width: 120px;
    margin: auto;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    border: 2px dashed var(--card-border);
}

.avatar-camera {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.security-desc {
    max-width: 520px;
    font-size: 13.5px;
}

.twofa-switch .form-check-input {
    width: 46px;
    height: 24px;
}

.profile-side {
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

.profile-main {
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    background: var(--hover-bg);
    padding: 6px;
    border-radius: 12px;
}

.settings-tab {
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    background: transparent;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.settings-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.twofa-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.twofa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: 0.2s;
}

.twofa-card i {
    font-size: 20px;
    color: var(--primary);
}

.twofa-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.twofa-card:hover {
    background: var(--hover-bg);
}

.twofa-card.active {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.select-dropdown {
    position: relative;
}

.select-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
}

.select-dropdown i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #6c757d;
    pointer-events: none;
}

/* Select2 main box */
.select2-container--default .select2-selection--single {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 13.5px;
    line-height: 1.5;
    height: calc(1.5em + 0.75rem + 2px); 
    transition: all var(--transition);
}

.select2-container .select2-selection--single {
    height: 34px !important;
}
/* Text inside */
.select2-container--default .select2-selection__rendered {
    padding-left: 0 !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height: 20px !important;
}

/* Arrow alignment */
.select2-container--default .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 26px;
    position: absolute;
    top: 5px !important;
    right: 1px;
    width: 20px;
}

/* Focus state (VERY IMPORTANT for UX) */
.select2-container--default.select2-container--focus
    .select2-selection--single {
    border-color: var(--input-border-focus, #86b7fe) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dropdown */
.select2-dropdown {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
}

/* Highlighted (hover + keyboard select) */
.select2-results__option--highlighted {
    background-color: #228b5e !important;
    color: #fff;
}

/* Selected option (when already chosen) */
.select2-results__option--selected {
    background-color: rgba(34, 139, 94, 0.1) !important;
    color: #228b5e;
}


.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236c757d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
    background-repeat: no-repeat!important;
    background-position: right 0.75rem center!important;
    background-size: 14px!important;
    padding-right: 2rem;
}
#regenSlugBtn{
    margin-left:8px;
    border-radius: 7px;
    border: 1px solid #c5c5c5;
}
.bi-link45deg{
    position: relative;
}
.bi-link45deg::before{
    content: "\f470";
    font-size: 15px;
    vertical-align: -5px;
    
}
.editor-btn{
    width:35px;
}