/* ==========================================================================
   BRAND THEME TOKENS  -  SINGLE SOURCE OF TRUTH
   --------------------------------------------------------------------------
   To re-brand the whole application, change ONLY the values in this :root
   block (colours are matched to /assets/myimg/logo.png: deep teal + gold).
   Everything else (layout, login page, dashboard, buttons, charts) reads
   these variables.  *-rgb tokens are space-separated "R G B" triplets so they
   can be used as  rgb(var(--brand-primary-rgb) / 0.15).
   ========================================================================== */
:root {
    /* Primary - deep teal of the buildings */
    --brand-primary: #0f6a85;
    --brand-primary-hover: #0b556b;
    --brand-primary-dark: #0b4a5f;
    --brand-primary-light: #3a9bb8;
    --brand-primary-soft: #e6f2f6;
    --brand-primary-rgb: 15 106 133;

    /* Accent - gold of the growth arrow */
    --brand-accent: #e0a22f;
    --brand-accent-dark: #c4861a;
    --brand-accent-light: #f2c35e;
    --brand-accent-rgb: 224 162 47;

    /* Dark surfaces - header & sidebar (navy-teal) */
    --brand-navy: #0a2f3d;
    --brand-navy-mid: #0e3d4f;
    --brand-navy-deep: #06212c;

    /* Neutrals */
    --brand-bg-body: #f4f7f9;
    --brand-border: #dbe4e9;
    --brand-text: #14303b;
    --brand-text-muted: #5f7480;
    --brand-sidebar-text: #9db6c0;
    --brand-sidebar-muted: #5d7c89;

    /* Semantic status colours (kept independent of the brand) */
    --brand-success: #1f9d6b;
    --brand-danger: #d64545;
    --brand-warning: #e0a22f;
    --brand-info: #2f9ec4;

    /* Chart palette (read by dashboard amCharts via JS) */
    --chart-1: #0f6a85;
    --chart-2: #e0a22f;
    --chart-3: #3a9bb8;
    --chart-4: #c4861a;
    --chart-5: #0a2f3d;
    --chart-6: #7fc0d3;

    /* Aliases consumed by modern-admin-theme.css */
    --erp-bg-body: var(--brand-bg-body);
    --erp-header-bg: var(--brand-navy);
    --erp-header-text: #f8fafc;
    --erp-sidebar-bg: var(--brand-navy-mid);
    --erp-sidebar-active: var(--brand-accent);
    --erp-card-bg: #ffffff;
    --erp-border-color: var(--brand-border);
    --erp-primary: var(--brand-primary);
    --erp-primary-hover: var(--brand-primary-hover);
    --erp-text-main: var(--brand-text);
    --erp-text-muted: var(--brand-text-muted);
}

/* --------------------------------------------------------------------------
   Re-colour framework (Bootstrap bundle) primary utilities with the brand
   -------------------------------------------------------------------------- */
a { color: var(--brand-primary); }
a:hover { color: var(--brand-primary-hover); }

.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }
.border-primary { border-color: var(--brand-primary) !important; }
.badge-primary { background-color: var(--brand-primary) !important; color: #fff !important; }
.badge-warning { background-color: var(--brand-accent) !important; }

.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
    box-shadow: 0 0 0 .2rem rgb(var(--brand-primary-rgb) / .25) !important;
}
.btn-outline-primary { color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
.btn-outline-primary:hover { background-color: var(--brand-primary) !important; color: #fff !important; }

.btn-warning { background-color: var(--brand-accent) !important; border-color: var(--brand-accent) !important; color: #fff !important; }
.btn-warning:hover { background-color: var(--brand-accent-dark) !important; border-color: var(--brand-accent-dark) !important; }

.form-control:focus, .custom-select:focus, .select2-container--default.select2-container--focus .select2-selection {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 .2rem rgb(var(--brand-primary-rgb) / .15) !important;
}
.page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}
.table thead th { border-bottom-color: var(--brand-border); }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--brand-primary); border-color: var(--brand-primary); }
