/* ================================================================
   Arvo Brand Theme for SFTPGo — Pantone 7623 C · Deep Burgundy
   Clean light theme, enterprise feel.
   ================================================================ */

/* ── 1. CSS variable overrides (KeenThemes + Bootstrap) ──────── */
:root,
[data-bs-theme="light"] {

  /* Primary — Arvo Burgundy */
  --bs-primary:                    #7D2935;
  --bs-primary-rgb:                125, 41, 53;
  --bs-primary-active:             #5C1E27;
  --bs-primary-light:              #F5EAEC;
  --bs-primary-dark:               #5C1E27;
  --bs-primary-inverse:            #ffffff;
  --bs-primary-clarity:            rgba(125, 41, 53, 0.2);
  --bs-primary-text-emphasis:      #4A1820;
  --bs-primary-bg-subtle:          #F5EAEC;
  --bs-primary-border-subtle:      #D4A0A8;
  --bs-text-primary:               #7D2935;

  /* Links */
  --bs-link-color:                 #7D2935;
  --bs-link-color-rgb:             125, 41, 53;
  --bs-link-hover-color:           #5C1E27;
  --bs-link-hover-color-rgb:       92, 30, 39;

  /* Focus ring */
  --bs-focus-ring-color:           rgba(125, 41, 53, 0.25);

  /* Nav pills */
  --bs-nav-pills-link-active-bg:   #7D2935;
  --bs-nav-pills-link-active-color: #ffffff;

  /* Progress */
  --bs-progress-bar-bg:            #7D2935;

  /* Component states (checkboxes, radios, selects) */
  --bs-component-active-bg:        #7D2935;
  --bs-component-active-color:     #ffffff;
  --bs-component-hover-color:      #7D2935;
  --bs-component-checked-bg:       #7D2935;
  --bs-component-checked-color:    #ffffff;

  /* Menu links */
  --bs-menu-link-color-hover:      #7D2935;
  --bs-menu-link-color-show:       #7D2935;
  --bs-menu-link-color-here:       #7D2935;
  --bs-menu-link-color-active:     #7D2935;
  --bs-menu-link-bg-color-hover:   #F5EAEC;
  --bs-menu-link-bg-color-show:    #F5EAEC;
  --bs-menu-link-bg-color-here:    #F5EAEC;
  --bs-menu-link-bg-color-active:  #F5EAEC;
  --bs-menu-heading-color:         #717180;

  /* Ribbon */
  --bs-ribbon-label-bg:            #7D2935;
  --bs-ribbon-label-border-color:  #5C1E27;

  /* DataTables row selected */
  --dt-row-selected:               125, 41, 53;
  --dt-row-selected-text:          255, 255, 255;
  --dt-row-selected-link:          210, 160, 168;

  /* Body */
  --bs-body-color:                 #09090B;
  --bs-body-color-rgb:             9, 9, 11;
  --bs-body-bg:                    #FAFAFA;
  --bs-body-bg-rgb:                250, 250, 250;
  --bs-heading-color:              #09090B;

  /* Borders */
  --bs-border-color:               #E4E4E9;
  --bs-border-dashed-color:        #E4E4E9;
  --bs-card-border-color:          #E4E4E9;
  --bs-root-card-border-color:     #E4E4E9;

  /* App layout */
  --bs-app-bg-color:               #FAFAFA;
  --bs-app-blank-bg-color:         #FAFAFA;
  --bs-app-header-base-bg-color:   #ffffff;
  --bs-app-header-minimize-bg-color: rgba(255, 255, 255, 0.95);

  /* Sidebar — light (override dark theme) */
  --bs-app-sidebar-base-bg-color:  #ffffff;
  --bs-app-sidebar-base-border-end: 1px solid #E4E4E9;

  /* Scrollbar */
  --bs-scrollbar-color:            #E4E4E9;
  --bs-scrollbar-hover-color:      #D4D4D9;
}

/* ── 2. Page background ──────────────────────────────────────── */
body,
html,
.app-wrapper,
.app-blank,
[data-kt-app-reset-transition="true"] {
  background-color: #FAFAFA !important;
  color: #09090B !important;
}

/* ── 3. Sidebar — light theme ────────────────────────────────── */
#kt_app_sidebar,
.app-sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid #E4E4E9 !important;
  box-shadow: none !important;
}

.app-sidebar-logo {
  background-color: #ffffff !important;
  border-bottom: 1px solid #E4E4E9 !important;
}

/* Sidebar menu default text */
#kt_app_sidebar .menu-title,
.app-sidebar .menu-title {
  color: #4B5675 !important;
}
#kt_app_sidebar .menu-icon i,
#kt_app_sidebar .menu-icon svg,
.app-sidebar .menu-icon i,
.app-sidebar .menu-icon svg {
  color: #78829D !important;
}
#kt_app_sidebar .menu-arrow,
.app-sidebar .menu-arrow {
  color: #78829D !important;
}
#kt_app_sidebar .menu-section,
.app-sidebar .menu-section {
  color: #A0A0B0 !important;
}

/* Sidebar menu hover */
#kt_app_sidebar .menu-item .menu-link:hover,
.app-sidebar .menu-item .menu-link:hover {
  background-color: #F5EAEC !important;
}
#kt_app_sidebar .menu-item .menu-link:hover .menu-title,
.app-sidebar .menu-item .menu-link:hover .menu-title {
  color: #7D2935 !important;
}
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon i,
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon svg,
.app-sidebar .menu-item .menu-link:hover .menu-icon i,
.app-sidebar .menu-item .menu-link:hover .menu-icon svg {
  color: #7D2935 !important;
}

/* Sidebar menu active */
#kt_app_sidebar .menu-item.here > .menu-link,
#kt_app_sidebar .menu-item .menu-link.active,
.app-sidebar .menu-item.here > .menu-link,
.app-sidebar .menu-item .menu-link.active {
  background-color: #F5EAEC !important;
}
#kt_app_sidebar .menu-item.here > .menu-link .menu-title,
#kt_app_sidebar .menu-item .menu-link.active .menu-title,
.app-sidebar .menu-item.here > .menu-link .menu-title,
.app-sidebar .menu-item .menu-link.active .menu-title {
  color: #7D2935 !important;
}
#kt_app_sidebar .menu-item.here > .menu-link .menu-icon i,
#kt_app_sidebar .menu-item.here > .menu-link .menu-icon svg,
#kt_app_sidebar .menu-item .menu-link.active .menu-icon i,
#kt_app_sidebar .menu-item .menu-link.active .menu-icon svg,
.app-sidebar .menu-item.here > .menu-link .menu-icon i,
.app-sidebar .menu-item.here > .menu-link .menu-icon svg,
.app-sidebar .menu-item .menu-link.active .menu-icon i,
.app-sidebar .menu-item .menu-link.active .menu-icon svg {
  color: #7D2935 !important;
}

/* Sidebar accordion sub-menu bg */
#kt_app_sidebar .menu-accordion .menu-sub,
.app-sidebar .menu-accordion .menu-sub {
  background-color: #FAFAFA !important;
}

/* ── 4. Header / topbar ──────────────────────────────────────── */
#kt_app_header,
.app-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #E4E4E9 !important;
  box-shadow: none !important;
}

/* ── 5. Buttons ──────────────────────────────────────────────── */
.btn-primary {
  --bs-btn-bg:                 #7D2935;
  --bs-btn-border-color:       #7D2935;
  --bs-btn-hover-bg:           #5C1E27;
  --bs-btn-hover-border-color: #5C1E27;
  --bs-btn-active-bg:          #5C1E27;
  --bs-btn-active-border-color: #5C1E27;
  --bs-btn-focus-shadow-rgb:   125, 41, 53;
  --bs-btn-color:              #ffffff;
  --bs-btn-hover-color:        #ffffff;
  --bs-btn-active-color:       #ffffff;
  --bs-btn-disabled-bg:        #B87080;
  --bs-btn-disabled-border-color: #B87080;
}
.btn-light-primary {
  --bs-btn-bg:          #F5EAEC;
  --bs-btn-color:       #7D2935;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg:    #7D2935;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-border-color: #7D2935;
  --bs-btn-active-bg:   #5C1E27;
  --bs-btn-active-color: #ffffff;
}
.btn-active-primary:hover,
.btn-active-primary.active,
.btn-active-primary:active,
[data-kt-button="true"].active.btn-active-primary {
  background-color: #7D2935 !important;
  color: #ffffff !important;
  border-color: #7D2935 !important;
}
.btn-active-light-primary:hover,
.btn-active-light-primary.active,
.btn-active-light-primary:active {
  background-color: #F5EAEC !important;
  color: #7D2935 !important;
}

/* Explicit text colors — prevent link rule from bleeding into buttons */
.btn-primary,
a.btn-primary {
  color: #ffffff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
  color: #ffffff !important;
}
.btn-light-primary,
a.btn-light-primary {
  color: #7D2935 !important;
}
.btn-light-primary:hover,
a.btn-light-primary:hover {
  color: #ffffff !important;
}

/* ── 6. Backgrounds ──────────────────────────────────────────── */
.bg-primary       { background-color: #7D2935 !important; }
.bg-light-primary { background-color: #F5EAEC !important; }

/* ── 7. Text ─────────────────────────────────────────────────── */
.text-primary              { color: #7D2935 !important; }
.text-hover-primary:hover  { color: #7D2935 !important; }
.text-active-primary.active { color: #7D2935 !important; }
.text-muted                { color: #717180 !important; }
.text-dark                 { color: #09090B !important; }
.text-gray-400             { color: #A0A0B0 !important; }
.text-gray-500             { color: #717180 !important; }
.text-gray-600             { color: #717180 !important; }
.text-gray-700             { color: #4B5675 !important; }
.text-gray-800             { color: #252F4A !important; }
.text-gray-900             { color: #09090B !important; }

/* ── 8. Links ────────────────────────────────────────────────── */
a:not(.btn) { color: #7D2935 !important; }
a:not(.btn):hover { color: #5C1E27 !important; }

/* ── 9. Borders ──────────────────────────────────────────────── */
.border-primary { border-color: #7D2935 !important; }

/* ── 10. Badges ──────────────────────────────────────────────── */
.badge.bg-primary,
.badge-primary        { background-color: #7D2935 !important; color: #ffffff !important; }
.badge-light-primary  { background-color: #F5EAEC !important; color: #7D2935 !important; }

/* ── 11. Form controls ───────────────────────────────────────── */
.form-control,
.form-control:not([type="range"]) {
  background-color: #F1F1F3 !important;
  border-color:     #E4E4E9 !important;
  color:            #09090B !important;
}
.form-control::placeholder { color: #717180 !important; }
.form-control:focus,
.form-select:focus {
  background-color: #ffffff !important;
  border-color:     #7D2935 !important;
  box-shadow: 0 0 0 0.2rem rgba(125, 41, 53, 0.2) !important;
  color: #09090B !important;
}
/* KeenThemes solid variant */
.form-control-solid,
.form-control-solid:not([type="range"]) {
  background-color: #F1F1F3 !important;
  border-color:     #E4E4E9 !important;
  color:            #09090B !important;
}
.form-control-solid::placeholder { color: #717180 !important; }
.form-control-solid:focus {
  background-color: #ffffff !important;
  border-color:     #7D2935 !important;
  box-shadow: 0 0 0 0.2rem rgba(125, 41, 53, 0.2) !important;
  color: #09090B !important;
}
.form-select {
  background-color: #F1F1F3 !important;
  border-color:     #E4E4E9 !important;
  color:            #09090B !important;
}

/* ── 12. Checkboxes / switches ───────────────────────────────── */
.form-check-input:checked {
  background-color: #7D2935 !important;
  border-color:     #7D2935 !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(125, 41, 53, 0.2) !important;
  border-color: #7D2935 !important;
}

/* ── 13. Progress bars ───────────────────────────────────────── */
.progress-bar { background-color: #7D2935 !important; }

/* ── 14. Nav pills ───────────────────────────────────────────── */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #7D2935 !important;
  color: #ffffff !important;
}
.nav-pills .nav-link {
  color: #4B5675 !important;
}
.nav-pills .nav-link:hover {
  color: #7D2935 !important;
}

/* ── 15. Tabs ────────────────────────────────────────────────── */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #7D2935 !important;
  border-bottom-color: #7D2935 !important;
}
.nav-tabs .nav-link:hover {
  color: #7D2935 !important;
}

/* ── 16. Pagination ──────────────────────────────────────────── */
.page-item.active .page-link {
  background-color: #7D2935 !important;
  border-color:     #7D2935 !important;
  color: #ffffff !important;
}
.page-link {
  color: #7D2935 !important;
}
.page-link:hover {
  color: #5C1E27 !important;
  border-color: #D4A0A8 !important;
}

/* ── 17. Tables ──────────────────────────────────────────────── */
.table thead th,
.table > thead > tr > th {
  color: #4B5675 !important;
  background-color: #FAFAFA !important;
  border-bottom-color: #E4E4E9 !important;
}
.table > tbody > tr > td {
  border-bottom-color: #F1F1F3 !important;
}
/* DataTables sort active */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  color: #7D2935 !important;
}
table.dataTable thead .dt-ordering-asc .dt-column-order,
table.dataTable thead .dt-ordering-desc .dt-column-order {
  color: #7D2935 !important;
}
/* DataTables selected rows */
table.dataTable tbody tr.selected > *,
table.dataTable tbody tr.selected td {
  box-shadow: inset 0 0 0 9999px rgba(125, 41, 53, 0.08) !important;
  color: #09090B !important;
}

/* ── 18. Cards ───────────────────────────────────────────────── */
.card {
  background-color: #ffffff !important;
  border-color: #E4E4E9 !important;
}
.card-header {
  background-color: #ffffff !important;
  border-bottom-color: #E4E4E9 !important;
}

/* ── 19. Dropdowns ───────────────────────────────────────────── */
.dropdown-menu {
  background-color: #ffffff !important;
  border-color: #E4E4E9 !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #F5EAEC !important;
  color: #7D2935 !important;
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: #7D2935 !important;
  color: #ffffff !important;
}

/* ── 20. Modals ──────────────────────────────────────────────── */
.modal-content {
  background-color: #ffffff !important;
  border-color: #E4E4E9 !important;
}
.modal-header {
  border-bottom-color: #E4E4E9 !important;
}
.modal-footer {
  border-top-color: #E4E4E9 !important;
}

/* ── 21. Alerts ──────────────────────────────────────────────── */
.alert-primary {
  background-color: #F5EAEC !important;
  border-color: #D4A0A8 !important;
  color: #7D2935 !important;
}

/* ── 22. General menu (non-sidebar) ──────────────────────────── */
.menu-item.here > .menu-link,
.menu-item .menu-link.active {
  background-color: #F5EAEC !important;
  color: #7D2935 !important;
}
.menu-item:not(.here) .menu-link:hover {
  background-color: #F5EAEC !important;
  color: #7D2935 !important;
}
.menu-item.here > .menu-link .menu-title,
.menu-item .menu-link.active .menu-title,
.menu-item:not(.here) .menu-link:hover .menu-title {
  color: #7D2935 !important;
}
.menu-item.here > .menu-link .menu-icon,
.menu-item .menu-link.active .menu-icon,
.menu-item:not(.here) .menu-link:hover .menu-icon {
  color: #7D2935 !important;
}

/* ── 23. Login page ──────────────────────────────────────────── */
.bg-body      { background-color: #ffffff !important; }

/* Login card */
.card,
.card-body {
  background-color: #ffffff !important;
  color: #09090B !important;
}

/* Hide h1 text next to logo */
#sign_in_form .container .row .col-7 { display: none !important; }
#sign_in_form .container .row .col-5 {
  width: 100% !important;
  max-width: 100% !important;
  text-align: center;
}

/* Login logo */
#id_logo img,
.login-logo img {
  max-height: 60px;
  width: auto;
}

/* ── 24. Theme toggle — hidden (light only) ──────────────────── */
[data-kt-element="theme-mode-menu"],
a[data-kt-menu-trigger]:has(.theme-light-show) {
  display: none !important;
}
