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

:root {
    --green:        #116b3a;
    --green2:       #21894d;
    --green-700:    #166534;
    --green-900:    #0b4d2c;
    --deep:         #0b5530;
    --light:        #f5f8f6;
    --border:       #e3ebe6;
    --text:         #17231c;
    --muted:        #728078;
    --white:        #fff;
    --shadow:       0 8px 28px rgba(20,55,35,.06);
    --radius:       15px;
    --sidebar-w:    252px;
    --brand-green:  #2bb017;   /* your preferred green */
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f6f8f7;
    color: var(--text);
    min-height: 100vh;
}

/* =========================================================
   PAGE SPACING FIX
   ========================================================= */
.main .content {
    padding: 28px 28px 40px !important;
}

.content-header {
    margin-bottom: 24px !important;
    padding-top: 5px !important;
}

/* For pages that use .page-title instead */
.page-title {
    margin-bottom: 24px !important;
    padding-top: 5px !important;
}

.content-header,
.page-header,
.page-title {
    margin-left: 32px !important;
    margin-right: 32px !important;
    margin-top: 10px !important;
    margin-bottom: 0px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0d5a32, #0a4f2d);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 18px;
    font-size: 20px;
    font-weight: 700;
}
.logo span {
    font-size: 26px;
}

nav {
    flex: 1;
    padding: 6px 12px;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.nav-section:hover {
    background: rgba(147,204,154,0.25);
}
.nav-section .dot {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.35);
    border-radius: 50%;
    flex-shrink: 0;
}
.nav-section .section-icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
}
.nav-section .section-title {
    flex: 1;
}
.nav-section .arrow {
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.25s ease;
}
.nav-group.open .nav-section,
.nav-group.active .nav-section {
    background: #1a7a45;
    color: #fff;
}
.nav-group.open .arrow {
    transform: rotate(-90deg);
}

.nav-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 16px;
}
.nav-group.open .nav-items {
    max-height: 400px;
    margin: 4px 0 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    margin: 2px 0;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.15s ease;
}
.nav-link:hover {
    background: rgba(147,204,154,0.25);
    color: #fff;
}
.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
}
.nav-link .nav-icon {
    width: 16px;
    text-align: center;
    font-size: 13px;
}

.sidebar-bottom {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.farm-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}
.farm-mini .status {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}
.farm-mini b {
    display: block;
    font-size: 13px;
    font-weight: 600;
}
.farm-mini small {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.tenant {
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 9px;
    background: #fff;
    font-weight: 700;
    color: var(--text);
    outline: none;
    font-size: 13px;
}
.top-actions {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}
.icon-btn {
    border: 0;
    background: transparent;
    font-size: 17px;
    position: relative;
    cursor: pointer;
}
.icon-btn span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc4d4d;
    position: absolute;
    top: 0;
    right: 0;
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dceee2;
    color: var(--green);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
}

/* =========================================================
   CONTENT AREA
   ========================================================= */
.content {
    padding: 24px 28px 32px;
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}
.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--green2);
    margin-bottom: 4px;
}
.content-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.content-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumb-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    border: 0;
    border-radius: 9px;
    background: var(--green2);
    color: #fff;
    font-weight: 650;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.btn:hover {
    filter: brightness(0.96);
}
.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}
.btn-green {
    background: var(--green2);
    color: #fff;
}
.btn-outline {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--green);
}
.btn-outline:hover {
    background: #f1f7f3;
}
.btn.secondary {
    background: #eaf4ed;
    color: var(--green);
}

/* =========================================================
   CARDS & KPIs
   ========================================================= */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.kpis-bottom {
    margin-top: 14px;
}
.kpi {
    padding: 16px 18px;
    position: relative;
}
.kpi span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}
.kpi strong {
    display: block;
    font-size: 22px;
    margin-top: 6px;
    font-weight: 700;
}
.kpi strong small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}
.kpi em {
    display: block;
    font-size: 11px;
    color: #3a8a58;
    font-style: normal;
    margin-top: 6px;
}
.kpi-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e8f5ec;
    display: grid;
    place-items: center;
    font-size: 17px;
}

/* =========================================================
   DASHBOARD GRID & PANELS
   ========================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.panel {
    padding: 18px 20px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.panel h3 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
}
.panel p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}
.panel-head a {
    font-size: 12px;
    color: var(--green2);
    text-decoration: none;
    font-weight: 600;
}
.panel-head select {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    outline: none;
    font-size: 12px;
    color: var(--text);
}

/* Chart */
.chart {
    padding-top: 4px;
}
.bars {
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 12px;
}
.bars i {
    display: block;
    flex: 1;
    max-width: 48px;
    background: linear-gradient(180deg, #58b678, #21894d);
    border-radius: 7px 7px 3px 3px;
    position: relative;
    min-height: 8px;
    transition: height 0.45s ease;
}
.bars i b {
    position: absolute;
    top: -18px;
    width: 100%;
    font-size: 10px;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}
.axis {
    display: flex;
    justify-content: space-around;
    font-size: 11px;
    color: var(--muted);
    padding-top: 10px;
}

/* Donut */
.donut {
    width: 140px;
    height: 140px;
    margin: 8px auto 16px;
    border-radius: 50%;
    background: #e5ebe6;
    display: grid;
    place-items: center;
    position: relative;
}
.donut::before {
    content: "";
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
}
.donut > div {
    z-index: 1;
    text-align: center;
}
.donut strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
}
.donut span {
    font-size: 11px;
    color: var(--muted);
}
.legend {
    display: grid;
    gap: 8px;
    font-size: 13px;
}
.legend span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.legend b {
    margin-left: auto;
    font-weight: 600;
}

/* Crop cards */
.crop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.crop-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #f8fbf9;
}
.crop-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.crop-symbol {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #e8f5ec;
    display: grid;
    place-items: center;
    font-size: 18px;
}
.crop-head strong {
    font-size: 13px;
    display: block;
}
.crop-head small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}
.crop-head label {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--green2);
}
.progress {
    height: 6px;
    background: #edf2ef;
    border-radius: 10px;
    margin: 12px 0 8px;
    overflow: hidden;
}
.progress i {
    display: block;
    height: 100%;
    background: var(--green2);
    border-radius: 10px;
    transition: width 0.5s ease;
}
.crop-foot {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
}
.crop-foot b {
    font-weight: 600;
    color: var(--text);
}

/* =========================================================
   TABLES
   ========================================================= */
.table-responsive {
    margin: 0 0 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
thead th {
    background: #fbfcfb;
    padding: 13px 14px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-weight: 600;
}
tbody td {
    padding: 14px;
    border-bottom: 1px solid #edf1ee;
    vertical-align: middle;
}
tbody tr:last-child td {
    border-bottom: none;
}
tbody tr:hover {
    background: #f7faf8;
}

/* Sortable headers */
#expenseTypesTable th {
    user-select: none;
    cursor: pointer;
}
#expenseTypesTable th .sort-icon {
    opacity: 0.4;
    font-size: 11px;
}
#expenseTypesTable th.sorted-asc .sort-icon,
#expenseTypesTable th.sorted-desc .sort-icon {
    opacity: 1;
    color: var(--brand-green);
}

/* =========================================================
   STATUS BADGES / PILLS (unified ? clean version)
   ========================================================= */
.label,
.status,
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ACTIVE */
.label-success,
.status.active,
.pill.success {
    background: #e8f5ec;
    color: #207341;
}

/* INACTIVE / Warning */
.label-warning,
.label-default,
.status.inactive,
.pill.warning {
    background: #f0f0f0;
    color: #6b7280;
}

/* =========================================================
   TOOLBAR
   ========================================================= */
.toolbar,
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.toolbar input,
.table-toolbar input,
.toolbar select,
.table-toolbar select {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    color: var(--text);
}
.toolbar input[type="search"],
.toolbar input[type="text"] {
    min-width: 220px;
}

/* =========================================================
   PAGINATION
   ========================================================= */
#pageButtons,
.pagination-app {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#pageButtons > li,
.pagination-app > li {
    list-style: none !important;
    margin: 0 !important;
}
#pageButtons > li > a,
.pagination-app > li > a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: var(--brand-green);
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}
#pageButtons > li.active > a,
.pagination-app > li.active > a {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: #fff !important;
    font-weight: 600;
}
#pageButtons > li.disabled > a,
.pagination-app > li.disabled > a {
    color: #999 !important;
    background: #f5f5f5 !important;
    border-color: #ddd !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================================
   REUSABLE MODAL (.app-modal)
   ========================================================= */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    display: none;
}
.app-modal.show {
    display: block !important;
}
.app-modal .modal-dialog {
    position: relative;
    width: 520px;
    max-width: 95%;
    margin: 60px auto;
    z-index: 1060;
}
.app-modal .modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    border: none;
    overflow: hidden;
}
.app-modal .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}
.app-modal .modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.app-modal .modal-body {
    padding: 24px 28px 12px;
}
.app-modal .modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Horizontal form rows */
.app-modal .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}
.app-modal .form-row label {
    width: 110px;
    flex-shrink: 0;
    font-weight: 600;
    margin: 0;
    color: #333;
}
.app-modal .form-row .form-control {
    flex: 1;
    height: 38px;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 6px 12px;
    font-size: 14px;
}
.app-modal .form-row .form-control:focus {
    border-color: var(--brand-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(43,176,23,0.2);
}

.app-modal .close {
    font-size: 24px;
    opacity: 0.6;
    background: none;
    border: none;
    cursor: pointer;
}
.app-modal .close:hover {
    opacity: 1;
}

body.modal-open {
    overflow: hidden;
}

/* Backdrop */
#modalBackdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

/* Modal footer buttons */
.app-modal .modal-footer .btn-danger {
    background-color: #d9534f !important;
    border-color: #d9534f !important;
    color: #fff !important;
}
.app-modal .modal-footer .btn-success {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: #fff !important;
}
.app-modal .modal-footer .btn-success:hover {
    background-color: #249a14 !important;
    border-color: #249a14 !important;
}

/* =========================================================
   TABLE ACTION BUTTONS (Edit / Delete)
   ========================================================= */
#expenseTypesTable .btn-edit,
#expenseTypesTable .btn-delete {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: #fff !important;
    font-weight: 600;
}
#expenseTypesTable .btn-edit:hover,
#expenseTypesTable .btn-delete:hover {
    background-color: #249a14 !important;
    border-color: #249a14 !important;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}
.login-brand {
    background: linear-gradient(165deg, #0a4a28 0%, #0d5c32 40%, #1a7a45 100%);
    color: #fff;
    padding: 44px 56px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.login-brand::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    border: 70px solid rgba(255,255,255,0.03);
    border-radius: 50%;
    right: -200px;
    bottom: -180px;
}
.login-brand::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border: 40px solid rgba(255,255,255,0.025);
    border-radius: 50%;
    left: -100px;
    top: 20%;
}
.brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}
.brand-logo {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.12);
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    border: 1px solid rgba(255,255,255,0.08);
}
.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.brand-tag {
    font-size: 11.5px;
    opacity: 0.6;
    margin-top: 1px;
    font-weight: 500;
}
.brand-content {
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    z-index: 2;
    max-width: 480px;
    padding: 20px 0;
}
.brand-content .eyebrow {
    opacity: 0.55;
    margin-bottom: 18px;
}
.brand-content h1 {
    font-size: 48px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin-bottom: 18px;
}
.brand-content p {
    font-size: 15.5px;
    line-height: 1.65;
    opacity: 0.78;
    margin-bottom: 36px;
    max-width: 400px;
}
.features {
    display: grid;
    gap: 14px;
}
.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0.9;
}
.feature-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 15px;
    border: 1px solid rgba(255,255,255,0.06);
}
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 44px 40px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
        0 4px 6px rgba(20,55,35,0.02),
        0 12px 24px rgba(20,55,35,0.04),
        0 24px 48px rgba(20,55,35,0.06);
}
.login-card .eyebrow {
    color: #1a7a45;
    opacity: 1;
    margin-bottom: 8px;
}
.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    color: #14261c;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.login-card > p {
    font-size: 14px;
    color: #6b7c72;
    margin-bottom: 32px;
}
.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 22px;
    font-weight: 500;
}
.field {
    display: block;
    margin-bottom: 18px;
}
.field > span {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #2d3d34;
    margin-bottom: 7px;
}
.field input {
    width: 100%;
    height: 48px;
    border: 1.5px solid #e2ebe6;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafcfb;
    color: #1a2e24;
}
.field input:focus {
    border-color: #1a7a45;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26,122,69,0.1);
}
.password-wrap {
    position: relative;
}
.password-wrap input {
    padding-right: 64px;
}
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #1a7a45;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 26px;
    font-size: 13px;
    color: #6b7c72;
}
.options label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-weight: 500;
}
.options a {
    color: #1a7a45;
    text-decoration: none;
    font-weight: 600;
}
.submit-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a7a45 0%, #0d5c32 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(13,92,50,0.25);
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,92,50,0.3);
}
.demo-box {
    margin-top: 28px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0f7f3 0%, #e8f2ec 100%);
    border: 1px solid #d5e6db;
    border-radius: 14px;
    font-size: 13px;
    color: #4a5d52;
    line-height: 1.65;
}
.demo-box strong {
    color: #0d5c32;
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 700;
}
.footer {
    text-align: center;
    margin-top: 28px;
    font-size: 11.5px;
    color: #8a9b90;
    font-weight: 500;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .kpis {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-brand {
        min-height: 300px;
        padding: 36px 28px;
    }
    .brand-content h1 {
        font-size: 36px;
    }
    .login-form-panel {
        padding: 36px 20px;
    }
    .login-card {
        padding: 36px 28px;
    }
}
@media (max-width: 720px) {
    .sidebar {
        transform: translateX(-100%);
        transition: 0.2s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .content {
        padding: 16px;
    }
    .kpis {
        grid-template-columns: 1fr;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   DASHBOARD KPI CARDS (fix)
   ========================================================= */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
}

.kpi-grid.bottom {
    margin-top: 14px !important;
}

.kpi-card {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 15px !important;
    box-shadow: var(--shadow) !important;
    padding: 16px 18px !important;
    position: relative !important;
}

.kpi-card .label {
    display: block !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    background: transparent !important;   /* important: prevent status badge styles from affecting it */
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: none !important;
}

.kpi-card .value {
    display: block !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--text) !important;
}

.kpi-card .value small {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--muted) !important;
}

.kpi-card .sub {
    display: block !important;
    font-size: 11px !important;
    color: #3a8a58 !important;
    margin-top: 6px !important;
}

.kpi-card .icon {
    position: absolute !important;
    right: 14px !important;
    top: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #e8f5ec !important;
    display: grid !important;
    place-items: center !important;
    font-size: 17px !important;
}

/* Responsive */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 700px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   DASHBOARD ? RESTORED (original working version)
   ========================================================= */

/* KPI Grid - old class names */
.kpis {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
}
.kpis-bottom {
    margin-top: 14px !important;
}

.card.kpi,
.kpi {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 15px !important;
    box-shadow: var(--shadow) !important;
    padding: 16px 18px !important;
    position: relative !important;
}

.kpi span {
    display: block !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: none !important;
}

.kpi strong {
    display: block !important;
    font-size: 22px !important;
    margin-top: 6px !important;
    font-weight: 700 !important;
}

.kpi strong small {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--muted) !important;
}

.kpi em {
    display: block !important;
    font-size: 11px !important;
    color: #3a8a58 !important;
    font-style: normal !important;
    margin-top: 6px !important;
}

.kpi-icon {
    position: absolute !important;
    right: 14px !important;
    top: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #e8f5ec !important;
    display: grid !important;
    place-items: center !important;
    font-size: 17px !important;
}

/* Newer class names (also used) */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
    padding: 0 28px 14px !important;
}
.kpi-grid.bottom {
    padding-bottom: 22px !important;
}

.kpi-card {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 15px !important;
    box-shadow: var(--shadow) !important;
    padding: 16px 18px !important;
    position: relative !important;
}

.kpi-card .label {
    display: block !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: none !important;
}

.kpi-card .value {
    display: block !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.kpi-card .value small {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--muted) !important;
}

.kpi-card .sub {
    display: block !important;
    font-size: 11px !important;
    color: #3a8a58 !important;
    margin-top: 6px !important;
}

.kpi-card .icon {
    position: absolute !important;
    right: 14px !important;
    top: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #e8f5ec !important;
    display: grid !important;
    place-items: center !important;
    font-size: 17px !important;
}

/* Dashboard header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 18px;
}
.dash-header .eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--green2);
    margin-bottom: 4px;
}
.dash-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
}
.dash-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.dash-actions {
    display: flex;
    gap: 8px;
}

/* Panel grid */
.panel-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 16px;
    padding: 0 28px 22px;
}
.panel-grid .panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

/* Responsive */
@media (max-width: 1100px) {
    .kpis,
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .panel-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 700px) {
    .kpis,
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
    .dash-header {
        flex-direction: column;
    }
}


:root {
    --claim-add-bg: #23b502;
    --claim-add-bg-hover: #1c9102;
}
.btn-claim-add,
.btn-claim-add:focus {
    background-color: var(--claim-add-bg) !important;
    border: 1px solid var(--claim-add-bg) !important;
    color: #fff !important;
}
.btn-claim-add:hover,
.btn-claim-add:active {
    background-color: var(--claim-add-bg-hover) !important;
    border-color: var(--claim-add-bg-hover) !important;
    color: #fff !important;
}

/* Row action buttons. !important is used because the theme already styles .btn */
:root {
    --approve-bg: #23b502;
    --approve-bg-hover: #1c9102;
    --reject-bg: #e36a0e;
    --reject-bg-hover: #d9782b;
}
.btn-approve,
.btn-approve:focus {
    background-color: var(--approve-bg) !important;
    border: 1px solid var(--approve-bg) !important;
    color: #fff !important;
}
.btn-approve:hover:not([disabled]),
.btn-approve:active:not([disabled]) {
    background-color: var(--approve-bg-hover) !important;
    border-color: var(--approve-bg-hover) !important;
}
.btn-reject,
.btn-reject:focus {
    background-color: var(--reject-bg) !important;
    border: 1px solid var(--reject-bg) !important;
    color: #fff !important;
}
.btn-reject:hover:not([disabled]),
.btn-reject:active:not([disabled]) {
    background-color: var(--reject-bg-hover) !important;
    border-color: var(--reject-bg-hover) !important;
}
.btn-approve[disabled],
.btn-reject[disabled] {
    opacity: .4;
    cursor: not-allowed;
}
