/* ==========================================================================
   Akaunts design system
   --------------------------------------------------------------------------
   Loaded automatically by Perfex after the core stylesheets
   (application/helpers/assets_helper.php: `assets/css/custom.css`).
   Presentation only: no selectors here are used by JavaScript, and no
   element is hidden or re-ordered in a way that changes behaviour.

   Contents
     1. Design tokens
     2. Base & typography
     3. Application shell: sidebar
     4. Application shell: header
     5. Content area & panels
     6. Buttons
     7. Forms, inputs & selects
     8. Dropdown menus, badges, alerts
     9. Modals
    10. Data tables (DataTables lists)
    11. Page patterns (ak-*)
    12. Chart of Accounts & shared form patterns (badges, switch, settings rows)
        12b. Customers  12c. Report catalogue  12d. Properties, units & unit sales  12e. Staff profile  12f. Edit profile  12g. Rental agreements  12h. Rent invoicing  12i. Reports  12j. Public website
    13. Compatibility notes
    14. Responsive
   ========================================================================== */

/* 1. Design tokens -------------------------------------------------------- */
:root {
  /* Brand */
  --ak-navy-950: #0b1527;
  --ak-navy-900: #0f1b2e;   /* sidebar */
  --ak-navy-800: #172b4d;   /* primary brand */
  --ak-navy-700: #22385e;

  /* Accent (actions, focus, selection) */
  --ak-accent-50: #eef3fe;
  --ak-accent-100: #dce6fd;
  --ak-accent-200: #bccffb;
  --ak-accent-300: #93b1f7;
  --ak-accent-500: #3563e9;
  --ak-accent-600: #2a51cc;
  --ak-accent-700: #2243a8;

  /* Neutrals */
  --ak-bg: #f5f7fa;
  --ak-surface: #ffffff;
  --ak-surface-muted: #f9fafb;
  --ak-surface-hover: #f6f8fb;
  --ak-border: #e4e7ec;
  --ak-border-subtle: #eef0f3;
  --ak-border-strong: #d0d5dd;
  --ak-text: #182230;
  --ak-text-2: #344054;
  --ak-text-3: #667085;
  --ak-text-4: #98a2b3;

  /* Status */
  --ak-success: #15803d;
  --ak-success-bg: #ecfdf3;
  --ak-success-border: #abefc6;
  --ak-warning: #b45309;
  --ak-warning-bg: #fffaeb;
  --ak-warning-border: #fedf89;
  --ak-danger: #c24141;
  --ak-danger-600: #a83535;
  --ak-danger-bg: #fef3f2;
  --ak-danger-border: #fecdca;
  --ak-info: #2a51cc;
  --ak-info-bg: #eef3fe;

  /* Typography */
  --ak-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ak-text-xs: 12px;
  --ak-text-sm: 13px;
  --ak-text-base: 14px;
  --ak-text-md: 15px;
  --ak-text-lg: 20px;
  --ak-text-xl: 18px;
  --ak-text-2xl: 24px;

  /* Spacing (4px scale) */
  --ak-space-1: 4px;
  --ak-space-2: 8px;
  --ak-space-3: 12px;
  --ak-space-4: 16px;
  --ak-space-5: 20px;
  --ak-space-6: 24px;
  --ak-space-8: 32px;

  /* Radius */
  --ak-radius-sm: 4px;
  --ak-radius: 6px;
  --ak-radius-md: 8px;
  --ak-radius-lg: 10px;
  --ak-radius-xl: 12px;

  /* Elevation */
  --ak-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --ak-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --ak-shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --ak-shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, 0.12), 0 4px 8px -4px rgba(16, 24, 40, 0.06);
  --ak-shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, 0.22);
  --ak-focus-ring: 0 0 0 3px rgba(53, 99, 233, 0.22);
  --ak-focus-ring-danger: 0 0 0 3px rgba(194, 65, 65, 0.18);

  /* Controls */
  --ak-control-h: 36px;
  --ak-control-h-sm: 30px;
  --ak-transition: 120ms ease;

  /* Shell (dimensions kept identical to Perfex so its collapse/mobile logic still works) */
  --ak-sidebar-w: 230px;
  --ak-header-h: 63px;
}

/* 2. Base & typography ---------------------------------------------------- */
body {
  font-family: var(--ak-font);
  background: var(--ak-navy-900);
  color: var(--ak-text-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body > * {
  font-size: var(--ak-text-base);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ak-text);
  letter-spacing: -0.01em;
}

a {
  color: var(--ak-accent-600);
}

a:hover,
a:focus {
  color: var(--ak-accent-700);
}

hr {
  border-top-color: var(--ak-border);
}

::selection {
  background: var(--ak-accent-100);
  color: var(--ak-text);
}

/* Keyboard focus is always visible; mouse focus stays quiet. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ak-accent-500);
  outline-offset: 2px;
  border-radius: var(--ak-radius-sm);
}

/* Tabular figures everywhere numbers are compared. */
table td,
table th,
.ak-num,
.dataTables_info,
.pagination {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.text-muted {
  color: var(--ak-text-3);
}

/* 3. Application shell: sidebar ------------------------------------------ */
/* Solid navy rail, flat states, one blue accent. Width stays 230px (Perfex layout maths). */
#menu.sidebar,
#setup-menu-wrapper.sidebar {
  --ak-nav-bg: #0f1b2e;
  --ak-nav-text: #c3cbd8;
  --ak-nav-icon: #8d99ad;
  --ak-nav-muted: #6b778c;
  --ak-nav-line: rgba(255, 255, 255, 0.08);
  --ak-nav-hover: rgba(255, 255, 255, 0.06);
  --ak-nav-active-bg: rgba(138, 180, 248, 0.16);
  --ak-nav-active-text: #a8c7fa;
  padding-left: 8px;
  padding-right: 8px;
  background: var(--ak-nav-bg);
  border-right: 0;
}

/* Brand, aligned with the 63px header */
#menu.sidebar .ak-brand-item {
  margin: 0 -8px 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--ak-nav-line);
}

#menu.sidebar #logo {
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0;
}

.ak-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 4px;
  border-radius: 8px;
  color: #fff;
}

.ak-brand:hover,
.ak-brand:focus {
  color: #fff;
  text-decoration: none;
}

.ak-brand__mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1a73e8;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ak-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.ak-brand__text strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ak-brand__text small {
  margin-top: 1px;
  color: var(--ak-nav-muted);
  font-size: 11.5px;
  font-weight: 400;
}

/* Uploaded logos are usually dark artwork: show them on a plain light plate. */
.ak-brand--image .ak-brand__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff;
}

.ak-brand--image .ak-brand__plate img {
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
}

/* Section labels: Property, Accounting, People, System */
#menu.sidebar .ak-nav-label {
  margin-top: 12px;
  padding: 6px 10px 6px;
  color: #5f6c82;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 14px;
  text-transform: uppercase;
  pointer-events: none;
}

#menu.sidebar .ak-nav-label--system {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ak-nav-line);
}

/* DEV-017: section labels inside the Setup group (flat, not clickable). */
#menu.sidebar .nav-second-level > li.ak-sub-label {
  padding: 10px 10px 4px 47px;
  color: var(--ak-nav-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}
#menu.sidebar .nav-second-level > li.ak-sub-label:first-child { padding-top: 4px; }

/* Top-level items: icon tile, label, count, chevron */
#menu.sidebar #side-menu > li { position: relative; }

#menu.sidebar #side-menu > li:nth-child(2) > a,
.sidebar > ul > li:nth-child(2) a {
  margin-top: 0;
}

#menu.sidebar #side-menu > li.ak-brand-item + li > a { margin-top: 8px; }

#menu.sidebar #side-menu > li > a,
#setup-menu-wrapper #setup-menu > li > a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 10px;
  margin-top: 1px;
  border-radius: 7px;
  color: var(--ak-nav-text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  transition: background-color var(--ak-transition), color var(--ak-transition);
}

#menu.sidebar #side-menu > li > a .menu-text,
#setup-menu-wrapper #setup-menu > li > a .menu-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#menu.sidebar #side-menu > li > a i.menu-icon,
#setup-menu-wrapper #setup-menu > li > a i.menu-icon {
  position: static;
  display: inline-flex;
  float: none;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 11px;
  border-radius: 6px;
  color: var(--ak-nav-icon);
  font-size: 13.5px;
  text-align: center;
  opacity: 1;
  transition: background-color var(--ak-transition), color var(--ak-transition);
}

#menu.sidebar .nav > li > a:hover,
#menu.sidebar .nav > li > a:focus,
#setup-menu-wrapper .nav > li > a:hover,
#setup-menu-wrapper .nav > li > a:focus {
  background: var(--ak-nav-hover);
  color: #fff;
}

#menu.sidebar .nav > li > a:hover .menu-icon,
#menu.sidebar .nav > li > a:focus .menu-icon {
  color: #dbe2ec;
}

#menu.sidebar #side-menu > li > a:focus-visible,
#menu.sidebar .nav-second-level > li > a:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: -2px;
}

/* Open group: white label, icon on a quiet tile */
#menu.sidebar #side-menu > li.active > a,
#menu.sidebar #side-menu > li.active > a:hover {
  background: transparent;
  color: #fff;
}

#menu.sidebar #side-menu > li.active > a .menu-icon {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* Current page without children: tinted row with a marker on the left edge */
#menu.sidebar #side-menu > li.active:not(:has(> ul)) > a {
  background: var(--ak-nav-active-bg);
  color: #e8eefb;
}
#menu.sidebar #side-menu > li.active:not(:has(> ul)) > a .menu-icon {
  background: transparent;
  color: var(--ak-nav-active-text);
}
#menu.sidebar #side-menu > li.active:not(:has(> ul)) > a::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #8ab4f8;
}

/* Chevron: points right when closed, down when open */
#menu.sidebar .fa.arrow,
#setup-menu-wrapper .fa.arrow {
  float: none;
  order: 3;
  padding-top: 0;
  margin-left: 6px;
  color: var(--ak-nav-muted);
  font-size: 10px;
  transition: transform 160ms ease;
}
#menu.sidebar .fa.arrow::before,
#menu.sidebar .active > a > .fa.arrow::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}
#menu.sidebar .active > a > .fa.arrow { transform: rotate(90deg); color: #c3cbd8; }

/* Nested items: hang off a thin guide line under the parent icon */
#menu.sidebar .nav-second-level {
  position: relative;
  margin: 2px 0 8px;
  padding: 0;
}
#menu.sidebar #side-menu .nav-second-level::before {
  content: "";
  display: block;
  position: absolute;
  top: 2px;
  bottom: 4px;
  left: 22px;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

#menu.sidebar li .nav-second-level li a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: 1px 0 0;
  padding: 6px 10px 6px 47px;
  border-radius: 6px;
  color: #a3adbd;
  font-size: 13px;
  font-weight: 400;
  line-height: 19px;
}

#menu.sidebar li .nav-second-level li a .sub-menu-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#menu.sidebar .nav > li .nav-second-level > li:not(.active) > a:hover,
#menu.sidebar .nav > li .nav-second-level > li:not(.active) > a:focus {
  background: var(--ak-nav-hover);
  color: #fff;
}

/* style.css forces white text and a blue pill here with !important; this restores the flat row. */
#menu.sidebar li .nav-second-level li.active a {
  display: flex;
  margin: 1px 0 0;
  padding: 6px 10px 6px 47px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  font-weight: 500;
}
/* The current page sits on the guide line as a filled dot. */
#menu.sidebar #side-menu li .nav-second-level li.active > a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 19px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: #8ab4f8;
}

/* Counts: a small solid pill; on a parent only while the group is closed */
#menu.sidebar .badge,
#setup-menu-wrapper .badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  float: none;
  order: 2;
  height: 18px;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 9px;
  background: #d93025;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
#menu.sidebar #side-menu > li.active > a > .badge { display: none; }

/* Long menus scroll inside the rail, with a slim scrollbar */
#menu.sidebar { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
#menu.sidebar::-webkit-scrollbar { width: 6px; }
#menu.sidebar::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(255, 255, 255, 0.14); }

/* Setup (customizer) panel uses the same rail */
#setup-menu-wrapper .customizer-heading {
  color: #fff;
  font-size: var(--ak-text-md);
}

#setup-menu-wrapper .close-customizer {
  color: var(--ak-nav-icon);
}

#setup-menu-wrapper li .nav-second-level li.active a {
  background: var(--ak-nav-active-bg);
  color: var(--ak-nav-active-text) !important;
}

/* 4. Application shell: header ------------------------------------------- */
#header.ak-header {
  position: sticky;
  top: 0;
  height: 63px;
  background: #fff;
  border-bottom: 1px solid #e3e6ea;
  box-shadow: none;
}

.ak-header__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 16px 0 12px;
}

.ak-header__start {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ak-header__end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Round icon buttons (menu toggle, back) */
.ak-icon-btn,
#header .hide-menu.ak-icon-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 16px;
  cursor: pointer;
  transition: background-color var(--ak-transition), color var(--ak-transition);
}

.ak-icon-btn:hover,
.ak-icon-btn:focus {
  background: #f1f3f4;
  color: #202124;
  text-decoration: none;
}

.ak-icon-btn:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 0;
}

.ak-back {
  align-items: center;
}

/* Project switcher: outlined field with a small label */
.ak-project-switch {
  position: relative;
  min-width: 220px;
  max-width: 300px;
}

.ak-project-switch #global_project_form,
#global_project_form {
  width: 100%;
  margin: 0;
}

#global_project_form .form-group {
  margin-bottom: 0;
}

#global_project_form .bootstrap-select {
  width: 100% !important;
}

#global_project_form .bootstrap-select > .dropdown-toggle {
  position: relative;
  height: 40px;
  padding: 17px 30px 3px 38px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #202124;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

#global_project_form .bootstrap-select > .dropdown-toggle::before {
  content: "\f1ad"; /* building */
  position: absolute;
  left: 13px;
  top: 50%;
  color: #5f6368;
  font-family: "Font Awesome 6 Free";
  font-size: 13px;
  font-weight: 900;
  transform: translateY(-50%);
}

#global_project_form .bootstrap-select > .dropdown-toggle::after {
  content: "Property";
  position: absolute;
  left: 38px;
  top: 5px;
  color: #80868b;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 12px;
}

#global_project_form .bootstrap-select > .dropdown-toggle .bs-caret,
#global_project_form .bootstrap-select > .dropdown-toggle .caret {
  right: 12px;
}

#global_project_form .bootstrap-select > .dropdown-toggle:hover {
  border-color: #bdc1c6;
}

#global_project_form .bootstrap-select.open > .dropdown-toggle,
#global_project_form .bootstrap-select > .dropdown-toggle:focus {
  border-color: #1a73e8;
  box-shadow: inset 0 0 0 1px #1a73e8;
  outline: none !important;
}

/* Working property chosen: the switch reads as an active filter, with a clear button. */
.ak-project-switch.is-filtered #global_project_form .bootstrap-select > .dropdown-toggle {
  padding-right: 58px;
  border-color: var(--ak-accent-300);
  background: var(--ak-accent-50);
  color: var(--ak-accent-700);
}

.ak-project-switch.is-filtered #global_project_form .bootstrap-select > .dropdown-toggle::before,
.ak-project-switch.is-filtered #global_project_form .bootstrap-select > .dropdown-toggle::after {
  color: var(--ak-accent-600);
}

.ak-project-switch.is-filtered #global_project_form .bootstrap-select > .dropdown-toggle::after {
  content: "Filtering by property";
}

.ak-project-switch__clear {
  position: absolute;
  top: 50%;
  right: 30px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ak-accent-600);
  font-size: 12px;
  transform: translateY(-50%);
  cursor: pointer;
}

.ak-project-switch__clear:hover,
.ak-project-switch__clear:focus-visible {
  background: var(--ak-accent-100);
  outline: none;
}

/* Search-style trigger for the jump-to dialog */
.ak-cmdk-trigger {
  display: inline-flex;
  flex: 0 1 420px;
  align-items: center;
  gap: 12px;
  height: 40px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 8px 0 16px;
  border: 0;
  border-radius: 8px;
  background: #f1f3f4;
  color: #5f6368;
  font-size: var(--ak-text-sm);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ak-transition);
}

.ak-cmdk-trigger > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-cmdk-trigger:hover {
  background: #e8eaed;
}

.ak-cmdk-trigger:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 0;
}

.ak-cmdk-trigger kbd,
.ak-cmdk kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  color: #5f6368;
  font-family: var(--ak-font);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

/* Header navbars: flatten Bootstrap's floated, padded lists */
.ak-header .navbar-nav {
  display: flex;
  align-items: center;
  float: none;
  margin: 0;
}

.ak-header .navbar-nav > li {
  float: none;
}

.ak-header .navbar-nav > li > a {
  padding: 0;
  color: #3c4043;
}

.ak-header .navbar-nav > li > a:hover,
.ak-header .navbar-nav > li > a:focus,
.ak-header .navbar-nav > .open > a,
.ak-header .navbar-nav > .open > a:hover,
.ak-header .navbar-nav > .open > a:focus {
  background: transparent;
}

.ak-header .navbar-nav.navbar-right {
  margin-right: 0;
}

/* Create: flat primary button */
.ak-create-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 14px !important;
  border-radius: 8px;
  background: #1a73e8 !important;
  color: #fff !important;
  font-size: var(--ak-text-sm);
  font-weight: 500;
  transition: background-color var(--ak-transition);
}

.ak-create-btn:hover,
.ak-create-btn:focus {
  background: #1765cc !important;
  text-decoration: none;
}

/* User: avatar, name, role */
.ak-user-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 4px 10px 4px 4px !important;
  border-radius: 22px;
  transition: background-color var(--ak-transition);
}

.ak-user-btn:hover,
.ak-user-btn:focus,
.ak-header .open > .ak-user-btn {
  background: #f1f3f4 !important;
}

.ak-header .ak-user-btn img.ak-user-btn__avatar {
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 50%;
  box-shadow: none;
}

.ak-user-btn__text {
  display: flex;
  flex-direction: column;
  max-width: 160px;
  line-height: 1.25;
}

.ak-user-btn__text strong {
  overflow: hidden;
  color: #202124;
  font-size: var(--ak-text-sm);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-user-btn__text small {
  color: #5f6368;
  font-size: 12px;
}

.ak-user-btn__chevron {
  color: #5f6368;
  font-size: 10px;
}

/* Header menus: Material-style elevation, nothing more */
.ak-header .dropdown-menu.ak-menu {
  min-width: 240px;
  margin-top: 8px;
  padding: 6px 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.ak-menu > li > a {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 9px 16px !important;
  border-radius: 0;
  color: #3c4043 !important;
  font-size: var(--ak-text-sm);
}

.ak-menu > li > a > i {
  width: 16px;
  color: #5f6368;
  text-align: center;
}

.ak-menu > li > a:hover,
.ak-menu > li > a:focus {
  background: #f1f3f4 !important;
  color: #202124 !important;
}

.ak-menu .dropdown-header {
  padding: 8px 16px 4px;
  color: #5f6368;
  font-size: 12px;
  font-weight: 500;
}

.ak-menu .divider {
  margin: 6px 0;
  background: #e3e6ea;
}

.ak-user-menu__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0 6px;
  padding: 16px;
  border-bottom: 1px solid #e3e6ea;
}

.ak-user-menu__head img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.ak-user-menu__head span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ak-user-menu__head strong {
  color: #202124;
  font-size: var(--ak-text-sm);
  font-weight: 500;
}

.ak-user-menu__head small {
  overflow: hidden;
  color: #5f6368;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Jump-to dialog */
body.ak-cmdk-open {
  overflow: hidden;
}

.ak-cmdk {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
}

.ak-cmdk[hidden] {
  display: none;
}

.ak-cmdk__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.4);
}

.ak-cmdk__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: 70vh;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
}

.ak-cmdk__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3e6ea;
  color: #5f6368;
}

.ak-cmdk__search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #202124;
  font-size: var(--ak-text-md);
  outline: none;
  box-shadow: none !important;
}

.ak-cmdk__list {
  flex: 1 1 auto;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
}

.ak-cmdk__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  color: #3c4043;
  cursor: pointer;
}

.ak-cmdk__item > i {
  flex: 0 0 18px;
  width: 18px;
  color: #5f6368;
  font-size: 14px;
  text-align: center;
}

.ak-cmdk__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #202124;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-cmdk__group {
  flex: 0 0 auto;
  max-width: 45%;
  overflow: hidden;
  color: #80868b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-cmdk__item.is-active {
  background: #e8f0fe;
}

.ak-cmdk__item.is-active > i,
.ak-cmdk__item.is-active .ak-cmdk__label {
  color: #1967d2;
}

.ak-cmdk__empty {
  padding: 28px 16px;
  color: #5f6368;
  text-align: center;
}

.ak-cmdk__foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid #e3e6ea;
  color: #80868b;
  font-size: 12px;
}

/* Content area fills the window, so no dark strip shows below short pages */
#wrapper {
  min-height: calc(100vh - 63px);
}

@media (max-width: 1199px) {
  .ak-user-btn__text,
  .ak-user-btn__chevron {
    display: none;
  }

  .ak-user-btn {
    padding: 4px !important;
  }

  .ak-cmdk-trigger kbd {
    display: none;
  }
}

@media (max-width: 991px) {
  .ak-cmdk-trigger {
    flex: 0 0 40px;
    justify-content: center;
    width: 40px;
    margin: 0 0 0 auto;
    padding: 0;
    border-radius: 50%;
    background: transparent;
  }

  .ak-cmdk-trigger:hover {
    background: #f1f3f4;
  }

  .ak-cmdk-trigger > span {
    display: none;
  }

  .ak-header__end {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .ak-header__bar {
    gap: 6px;
    padding: 0 8px;
  }

  .ak-project-switch {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .ak-header .mobile-menu-toggle {
    display: inline-flex;
    margin: 0;
    padding: 0;
    line-height: 1;
  }

  .ak-header .mobile-menu {
    display: flex;
    align-items: center;
  }

  .ak-header ul.mobile-icon-menu {
    margin: 0;
  }

  .ak-cmdk {
    padding-top: 10px;
  }

  .ak-cmdk__panel {
    max-height: 85vh;
  }

  .ak-cmdk__foot {
    display: none;
  }
}

/* 5. Content area & panels ------------------------------------------------ */
#wrapper {
  background: var(--ak-bg);
}

#wrapper .content {
  padding: 24px 32px 40px;
}

.panel_s {
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-xs);
}

.panel_s > .panel-body {
  padding: 20px 24px;
  border-radius: var(--ak-radius-lg);
  background: transparent;
}

/* Legacy page titles (`<h4 class="no-margin font-bold">…</h4><hr>`) used across modules */
.panel_s > .panel-body > h4.no-margin:first-child,
.panel_s > .panel-body > h4:first-child {
  font-size: var(--ak-text-xl);
  font-weight: 600;
  line-height: 26px;
  color: var(--ak-text);
}

.panel_s > .panel-body > h4:first-child + hr {
  margin-top: 16px;
  margin-bottom: 20px;
}

/* 6. Buttons --------------------------------------------------------------- */
.btn,
.btn-group > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--ak-control-h);
  padding: 7px 14px;
  border-radius: var(--ak-radius);
  font-size: var(--ak-text-base);
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  transition: background-color var(--ak-transition), border-color var(--ak-transition), color var(--ak-transition), box-shadow var(--ak-transition);
}

.btn-group > .btn {
  display: inline-flex;
}

.btn-sm,
.btn-group > .btn-sm,
.btn-group-sm > .btn {
  min-height: var(--ak-control-h-sm);
  padding: 4px 10px;
  font-size: var(--ak-text-sm);
  border-radius: var(--ak-radius);
}

.btn-xs,
.btn-group > .btn-xs,
.btn-group-xs > .btn {
  min-height: 24px;
  padding: 2px 8px;
  font-size: var(--ak-text-xs);
  border-radius: var(--ak-radius-sm);
}

.btn:focus,
.btn.focus,
.btn:active:focus,
.btn.active:focus,
.open > .dropdown-toggle.btn {
  outline: none;
  box-shadow: none;
}

.btn:focus-visible,
.btn.btn:focus-visible {
  outline: none;
  box-shadow: var(--ak-focus-ring);
}

/* Primary (Perfex uses .btn-info for most primary actions) */
.btn-primary,
.btn-info {
  background: var(--ak-accent-500);
  border-color: var(--ak-accent-500);
  color: #ffffff;
  box-shadow: var(--ak-shadow-xs);
}

.btn-primary:hover,
.btn-info:hover,
.btn-primary:focus,
.btn-info:focus,
.btn-primary:active,
.btn-info:active,
.btn-primary.active,
.btn-info.active,
.open > .dropdown-toggle.btn-primary,
.open > .dropdown-toggle.btn-info {
  background: var(--ak-accent-600);
  border-color: var(--ak-accent-600);
  color: #ffffff;
}

.btn-primary:active:hover,
.btn-info:active:hover,
.btn-primary:active:focus,
.btn-info:active:focus {
  background: var(--ak-accent-700);
  border-color: var(--ak-accent-700);
  color: #ffffff;
}

/* Secondary / default */
.btn-default,
.btn-secondary {
  background: var(--ak-surface);
  border-color: var(--ak-border-strong);
  color: var(--ak-text-2);
  box-shadow: var(--ak-shadow-xs);
}

.btn-default:hover,
.btn-secondary:hover,
.btn-default:focus,
.btn-secondary:focus,
.btn-default:active,
.btn-secondary:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default,
.open > .dropdown-toggle.btn-secondary {
  background: var(--ak-surface-muted);
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
}

/* Status buttons (muted, not neon) */
.btn-success {
  background: var(--ak-success);
  border-color: var(--ak-success);
  color: #ffffff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background: #116a32;
  border-color: #116a32;
  color: #ffffff;
}

.btn-danger {
  background: var(--ak-danger);
  border-color: var(--ak-danger);
  color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background: var(--ak-danger-600);
  border-color: var(--ak-danger-600);
  color: #ffffff;
}

.btn-warning {
  background: var(--ak-warning);
  border-color: var(--ak-warning);
  color: #ffffff;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background: #96450a;
  border-color: #96450a;
  color: #ffffff;
}

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  opacity: 0.55;
  box-shadow: none;
}

/* Icon-only buttons (Perfex icon_btn → .btn.btn-icon) */
.btn.btn-icon {
  min-height: 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--ak-radius);
  font-size: 13px;
}

.btn-default.btn-icon {
  background: transparent;
  border-color: transparent;
  color: var(--ak-text-3);
  box-shadow: none;
}

.btn-default.btn-icon:hover,
.btn-default.btn-icon:focus {
  background: var(--ak-surface-muted);
  border-color: var(--ak-border);
  color: var(--ak-text);
}

/* 7. Forms, inputs & selects ---------------------------------------------- */
.form-group {
  margin-bottom: 16px;
}

label,
.control-label {
  margin-bottom: 6px;
  color: var(--ak-text-2);
  font-size: var(--ak-text-sm);
  font-weight: 500;
  line-height: 18px;
}

.form-group .req,
label .text-danger {
  color: var(--ak-danger);
}

/* Same selector list as Perfex's resources/css/form.css so specificity matches. */
textarea.form-control,
select.form-control,
input.form-control,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"] {
  border: 1px solid var(--ak-border-strong);
  border-radius: var(--ak-radius);
  background-color: var(--ak-surface);
  color: var(--ak-text);
  font-size: var(--ak-text-base);
  box-shadow: var(--ak-shadow-xs);
  transition: border-color var(--ak-transition), box-shadow var(--ak-transition);
}

input.form-control,
select.form-control {
  height: var(--ak-control-h);
  padding: 7px 12px;
  line-height: 20px;
}

textarea.form-control {
  padding: 8px 12px;
  line-height: 20px;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--ak-text-4);
}

textarea.form-control:focus,
select.form-control:focus,
input.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus {
  border-color: var(--ak-accent-500);
  outline: none;
  box-shadow: var(--ak-focus-ring);
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: var(--ak-surface-muted);
  border-color: var(--ak-border);
  color: var(--ak-text-3);
}

.has-error .form-control,
.has-error .form-control:focus {
  border-color: var(--ak-danger);
}

.has-error .form-control:focus {
  box-shadow: var(--ak-focus-ring-danger);
}

.has-error .control-label,
.has-error .help-block,
p.text-danger,
label.error,
.form-group label.error {
  color: var(--ak-danger);
  font-size: var(--ak-text-sm);
  font-weight: 500;
}

.help-block {
  color: var(--ak-text-3);
  font-size: var(--ak-text-sm);
}

.input-group-addon {
  border-color: var(--ak-border-strong);
  background: var(--ak-surface-muted);
  color: var(--ak-text-3);
  border-radius: var(--ak-radius);
}

.input-group {
  box-shadow: var(--ak-shadow-xs);
  border-radius: var(--ak-radius);
}

/* bootstrap-select toggles look like inputs */
.bootstrap-select .btn {
  height: var(--ak-control-h);
  font-size: var(--ak-text-base);
}

.bootstrap-select > .dropdown-toggle.btn-default,
.bootstrap-select > .dropdown-toggle.btn-default:hover,
.bootstrap-select > .dropdown-toggle.btn-default:focus {
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--ak-border-strong);
  background: var(--ak-surface);
  color: var(--ak-text);
  font-weight: 400;
  box-shadow: var(--ak-shadow-xs);
}

.bootstrap-select > .dropdown-toggle.btn-default:hover {
  border-color: #b9c0cc;
}

.bootstrap-select.open > .dropdown-toggle.btn-default,
.bootstrap-select.open > .dropdown-toggle.btn-default:hover,
.bootstrap-select > .dropdown-toggle.btn-default:focus-visible {
  border-color: var(--ak-accent-500);
  box-shadow: var(--ak-focus-ring);
}

.bootstrap-select:not(.dropup) .dropdown-toggle[aria-expanded="true"],
.bootstrap-select.dropup .dropdown-toggle[aria-expanded="true"] {
  border-radius: var(--ak-radius);
}

.bootstrap-select:not(.dropup) .dropdown-menu,
.bootstrap-select.dropup .dropdown-menu {
  margin-top: 4px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-md);
}

.bootstrap-select.dropup .dropdown-menu {
  margin-bottom: 4px;
}

.bootstrap-select .dropdown-menu li a {
  padding: 7px 12px;
  border-radius: var(--ak-radius);
}

.bootstrap-select .dropdown-menu li.selected a,
.bootstrap-select .dropdown-menu li.active a {
  background: var(--ak-accent-50);
  color: var(--ak-accent-700);
}

.bootstrap-select .bs-searchbox {
  padding: 6px 6px 4px;
}

.bootstrap-select > .dropdown-toggle.bs-placeholder,
.bootstrap-select.btn-group .bs-placeholder .filter-option {
  color: var(--ak-text-4);
}

/* 8. Dropdown menus, badges, alerts ---------------------------------------- */
.dropdown-menu {
  padding: 4px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-md);
  box-shadow: var(--ak-shadow-lg);
  font-size: var(--ak-text-base);
}

.dropdown-menu > li > a {
  padding: 7px 12px;
  border-radius: var(--ak-radius);
  color: var(--ak-text-2);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background: var(--ak-surface-muted);
  color: var(--ak-text);
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background: var(--ak-accent-50);
  color: var(--ak-accent-700);
}

.dropdown-header {
  padding: 6px 12px 4px;
  color: var(--ak-text-3);
  font-size: var(--ak-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alert {
  border-radius: var(--ak-radius-md);
  border-width: 1px;
  font-size: var(--ak-text-base);
}

.alert-success { background: var(--ak-success-bg); border-color: var(--ak-success-border); color: #0e5a2b; }
.alert-warning { background: var(--ak-warning-bg); border-color: var(--ak-warning-border); color: #7a3a07; }
.alert-danger { background: var(--ak-danger-bg); border-color: var(--ak-danger-border); color: #8a2a2a; }
.alert-info { background: var(--ak-info-bg); border-color: var(--ak-accent-200); color: var(--ak-accent-700); }

/* Float notifications (alert_float) keep their position; refine surface only. */
.float-alert.alert {
  box-shadow: var(--ak-shadow-lg);
}

/* 9. Modals ---------------------------------------------------------------- */
.modal-backdrop {
  background-color: #0f172a;
}

.modal-backdrop.in {
  opacity: 0.45;
}

.modal-content {
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-xl);
  box-shadow: var(--ak-shadow-xl);
  overflow: visible;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-xl) var(--ak-radius-xl) 0 0;
  background: var(--ak-surface);
}

.modal-title {
  color: var(--ak-text);
  font-size: var(--ak-text-lg);
  font-weight: 600;
  line-height: 24px;
}

.modal-header .close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-top: -4px;
  border-radius: var(--ak-radius);
  font-size: 24px;
  color: var(--ak-text-3);
}

.modal-header .close:hover {
  background: var(--ak-surface-muted);
  color: var(--ak-text);
}

.modal-body {
  padding: 20px 24px 8px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--ak-border);
  border-radius: 0 0 var(--ak-radius-xl) var(--ak-radius-xl);
  background: var(--ak-surface-muted);
}

.modal-footer .btn + .btn {
  margin-left: 0;
}

/* 10. Data tables (DataTables lists) -------------------------------------- */
table.dataTable {
  margin-top: 0 !important; /* DataTables sets 6px !important inline-class; keeps header flush with toolbar */
  border-collapse: separate;
  border-spacing: 0;
}

table.dataTable thead > tr > th,
.table.dataTable > thead:first-child > tr:first-child > th {
  padding: 10px 14px;
  border-top: 1px solid var(--ak-border);
  border-bottom: 1px solid var(--ak-border);
  border-right: 0;
  background: var(--ak-surface-muted);
  color: var(--ak-text-3);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

table.dataTable thead > tr > th:not(:last-child) {
  border-right: 0;
}

.table.dataTable > thead:first-child > tr:first-child > th:first-child,
.table.dataTable > thead:first-child > tr:first-child > th:last-child {
  border-left: 0;
  border-right: 0;
}

table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc {
  background: #f2f4f7;
  color: var(--ak-text);
}

.table > tbody > tr > td,
.table > tfoot > tr > td {
  color: var(--ak-text);
}

table.dataTable tbody > tr > td {
  padding: 11px 14px;
  border-top: 1px solid var(--ak-border-subtle);
  font-size: var(--ak-text-base);
  line-height: 20px;
  /* Top-aligned: Perfex reserves space for the hidden .row-options block
     inside the first cell, so middle alignment would offset that cell. */
  vertical-align: top;
}

/* Tables using the overlay row-actions pattern reserve no such space. */
table.dataTable.ak-table--hover-actions tbody > tr > td {
  vertical-align: middle;
}

table.dataTable tbody > tr:first-child > td {
  border-top: 0;
}

table.dataTable tbody > tr {
  transition: background-color var(--ak-transition);
}

table.dataTable tbody > tr:hover > td {
  background: var(--ak-surface-hover);
}

table.dataTable td.dataTables_empty {
  padding: 48px 16px;
  color: var(--ak-text-3);
  text-align: center !important; /* core sets left !important */
}

table.dataTable td.dataTables_empty::before {
  content: "\f15b"; /* file */
  display: block;
  margin-bottom: 8px;
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  font-size: 22px;
  color: var(--ak-text-4);
}

/* Toolbar above and pager below the table */
div.dataTables_wrapper div.dataTables_length select {
  width: auto;
  min-width: 72px;
  height: var(--ak-control-h-sm);
  padding: 4px 28px 4px 10px;
  font-size: var(--ak-text-sm);
}

.dt-buttons.btn-group > .btn,
.dt-buttons .btn {
  min-height: var(--ak-control-h-sm);
  padding: 4px 10px;
  font-size: var(--ak-text-sm);
}

div.dataTables_wrapper div.dataTables_info {
  margin-top: 0;
  padding-top: 6px;
  color: var(--ak-text-3);
  font-size: var(--ak-text-sm);
}

div.dataTables_wrapper div.dataTables_paging {
  margin-top: 0;
}

.dataTables_wrapper .pagination {
  margin: 0;
}

.pagination > li > a,
.pagination > li > span {
  min-width: 32px;
  height: 32px;
  margin-left: 4px;
  padding: 5px 10px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius) !important; /* Bootstrap's first/last-child radius rules use high specificity */
  background: var(--ak-surface);
  color: var(--ak-text-2);
  font-size: var(--ak-text-sm);
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

.pagination > li > a:hover,
.pagination > li > a:focus,
.pagination > li > span:hover,
.pagination > li > span:focus {
  background: var(--ak-surface-muted);
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  background: var(--ak-accent-500);
  border-color: var(--ak-accent-500);
  color: #ffffff;
}

.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > span {
  background: var(--ak-surface);
  border-color: var(--ak-border-subtle);
  color: var(--ak-text-4);
}

.dt-page-jump .dt-page-jump-select {
  height: 32px;
  margin-top: 0;
  padding: 4px 24px 4px 8px;
  font-size: var(--ak-text-sm);
}

div.dataTables_wrapper div.dataTables_processing {
  top: 64px;
  left: 50%;
  width: auto;
  margin: 0;
  padding: 6px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-md);
  color: var(--ak-text-3);
  font-size: var(--ak-text-sm);
  z-index: 5;
}

/* Row options (Edit | Delete links under the first cell) */
table .row-options {
  font-size: 12.5px;
  color: var(--ak-text-4);
}

table .row-options a {
  font-weight: 500;
}

table .row-options a.text-danger,
table .row-options a._delete {
  color: var(--ak-danger);
}

/* 11. Page patterns (ak-*) -------------------------------------------------- */
.ak-page {
  max-width: 1600px;
}

.ak-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.ak-page-header__titles {
  min-width: 0;
}

.ak-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--ak-text-3);
  font-size: var(--ak-text-sm);
  font-weight: 500;
  line-height: 18px;
}

.ak-eyebrow .ak-eyebrow__sep {
  color: var(--ak-text-4);
}

.ak-page-title {
  margin: 0;
  color: var(--ak-text);
  font-size: var(--ak-text-2xl);
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.015em;
}

.ak-page-subtitle {
  margin: 4px 0 0;
  max-width: 640px;
  color: var(--ak-text-3);
  font-size: var(--ak-text-base);
  line-height: 20px;
}

.ak-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ak-card {
  position: relative;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-xs);
}

.ak-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
  align-items: end;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ak-border);
}

.ak-toolbar .form-group {
  margin-bottom: 0;
}

.ak-toolbar .control-label,
.ak-toolbar label {
  margin-bottom: 4px;
  color: var(--ak-text-3);
  font-size: var(--ak-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ak-search .form-group {
  position: relative;
}

.ak-search .form-group::after {
  content: "\f002"; /* magnifying glass */
  position: absolute;
  left: 12px;
  bottom: 0;
  height: var(--ak-control-h);
  display: flex;
  align-items: center;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 13px;
  color: var(--ak-text-4);
  pointer-events: none;
}

.ak-search input.form-control {
  padding-left: 36px;
}

/* Tables placed inside an .ak-card run edge to edge; controls keep the card gutter. */
.ak-card .dataTables_wrapper {
  padding: 0;
}

.ak-card .dataTables_wrapper > .row {
  margin-left: 0;
  margin-right: 0;
}

/* Bootstrap's clearfix pseudo-elements would become flex items in the rows below. */
.ak-card .dataTables_wrapper > .row::before,
.ak-card .dataTables_wrapper > .row::after {
  display: none;
}

.ak-card .dataTables_wrapper > .row:empty {
  display: none;
}

.ak-card .dataTables_wrapper > .row:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.ak-card .dataTables_wrapper > .row:nth-child(2) > [class*="col-"] {
  float: none;
  width: auto;
  padding: 0;
}

.ak-card .dataTables_wrapper > .row:nth-child(2) > [class*="col-"]:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ak-card .dataTables_wrapper .dataTables_length {
  float: none;
  margin: 0;
}

.ak-card .dataTables_wrapper .dataTables_length label {
  margin: 0;
}

.ak-card .dataTables_wrapper .dt-buttons {
  float: none;
  width: auto;
  margin: 0;
}

.ak-card .dataTables_wrapper > .row:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--ak-border);
}

.ak-card .dataTables_wrapper > .row:last-child > [class*="col-"] {
  float: none;
  width: auto;
  padding: 0;
}

.ak-card .dataTables_wrapper .dataTables_paging {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ak-card .dataTables_wrapper div.dataTables_paginate {
  padding-right: 0;
}

.ak-card .table-responsive {
  margin: 0;
  border: 0;
}

.ak-card table.dataTable > thead > tr > th:first-child,
.ak-card table.dataTable > tbody > tr > td:first-child {
  padding-left: 20px;
}

.ak-card table.dataTable > thead > tr > th:last-child,
.ak-card table.dataTable > tbody > tr > td:last-child {
  padding-right: 20px;
}

.ak-card table.dataTable {
  margin-bottom: 0 !important; /* matches the margin-top override above */
}

/* Numeric columns */
.ak-num,
table.dataTable th.ak-num,
table.dataTable td.ak-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

td.ak-num.ak-num--zero {
  color: var(--ak-text-4);
}

td.ak-num.ak-num--negative {
  color: var(--ak-danger);
}

td.ak-cell-empty:empty::before,
td.ak-num:empty::before {
  content: "\2014"; /* em dash: column has no value */
  color: var(--ak-text-4);
}

td.ak-cell-center,
th.ak-cell-center {
  text-align: center;
}

td.ak-cell-actions,
th.ak-cell-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

/* Classification chips */
.ak-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  background: var(--ak-surface-muted);
  color: var(--ak-text-2);
  font-size: var(--ak-text-xs);
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.ak-chip::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.ak-chip--asset { background: #eef4ff; border-color: #d1e0ff; color: #2943a8; }
.ak-chip--liability { background: #fff6ed; border-color: #fddcab; color: #9a3d0a; }
.ak-chip--equity { background: #f4f3ff; border-color: #dad7fd; color: #4b3cc1; }
.ak-chip--income { background: #ecfdf3; border-color: #abefc6; color: #11683a; }
.ak-chip--expense { background: #fef3f2; border-color: #fecdca; color: #a3302c; }

/* Hover-reveal row actions (opt-in per table: .ak-table--hover-actions) */
.ak-table--hover-actions tbody tr td {
  position: relative;
}

.ak-table--hover-actions tbody tr td .row-options {
  position: absolute;
  top: 50%;
  right: 8px;
  left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 28px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(246, 248, 251, 0) 0, var(--ak-surface-hover) 24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ak-transition);
  white-space: nowrap;
}

.ak-table--hover-actions tbody tr:hover td .row-options,
.ak-table--hover-actions tbody tr td:focus-within .row-options {
  opacity: 1;
  pointer-events: auto;
}

.ak-table--hover-actions tbody tr td .row-options a {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--ak-radius);
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  box-shadow: var(--ak-shadow-xs);
  font-size: 12.5px;
  line-height: 1;
}

.ak-table--hover-actions tbody tr td .row-options a:hover {
  border-color: var(--ak-border-strong);
}

.mobile .ak-table--hover-actions tbody tr td .row-options {
  position: static;
  transform: none;
  padding: 4px 0 0;
  background: none;
  opacity: 1;
  pointer-events: auto;
}

/* 12. Chart of Accounts & shared form patterns ------------------------------- */

/* Status badges */
.ak-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  background: var(--ak-surface-muted);
  color: var(--ak-text-2);
  font-size: var(--ak-text-xs);
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}
.ak-badge--success { background: var(--ak-success-bg); border-color: var(--ak-success-border); color: var(--ak-success); }
.ak-badge--warning { background: var(--ak-warning-bg); border-color: var(--ak-warning-border); color: var(--ak-warning); }
.ak-badge--danger { background: var(--ak-danger-bg); border-color: var(--ak-danger-border); color: var(--ak-danger); }
.ak-badge--muted { color: var(--ak-text-3); }

/* Class tiles above the table: counts that double as filters */
.ak-class-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: var(--ak-space-3);
  margin-bottom: var(--ak-space-4);
}
.ak-class-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px 10px 16px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-xs);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--ak-transition), box-shadow var(--ak-transition), background var(--ak-transition);
}
.ak-class-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ak-border-strong);
}
.ak-class-tile:hover { border-color: var(--ak-border-strong); box-shadow: var(--ak-shadow-sm); }
.ak-class-tile:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-class-tile.is-selected { border-color: var(--ak-accent-500); background: var(--ak-accent-50); }
.ak-class-tile__label { color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.ak-class-tile__count { color: var(--ak-text); font-size: var(--ak-text-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-class-tile--asset::before { background: #4b6fdc; }
.ak-class-tile--liability::before { background: #d97a2b; }
.ak-class-tile--equity::before { background: #7a6be0; }
.ak-class-tile--income::before { background: #2f9e62; }
.ak-class-tile--expense::before { background: #d25454; }
.ak-class-tile--inactive::before { background: var(--ak-text-4); }

/* Account cell: own name, sub-account count, parent path; indented by depth */
.ak-acct {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 2px;
  padding-left: calc(var(--ak-depth, 0) * 16px);
}
.ak-acct__number {
  color: var(--ak-text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--ak-text-xs);
}
.ak-acct__name { color: var(--ak-text); font-weight: 500; }
.ak-acct__count {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ak-surface-muted);
  border: 1px solid var(--ak-border-subtle);
  color: var(--ak-text-3);
  font-size: 11px;
  line-height: 16px;
}
.ak-acct__path {
  flex-basis: 100%;
  color: var(--ak-text-4);
  font-size: var(--ak-text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}
.ak-acct__detail {
  display: block;
  margin-top: 3px;
  color: var(--ak-text-4);
  font-size: var(--ak-text-xs);
}

/* Visible columns (the hidden selection column is not rendered): 1 Account, 2 Type, 3 Balance, 4 Status, 5 Actions */
.ak-coa .table-accounts > thead > tr > th,
.ak-coa .table-accounts > tbody > tr > td { vertical-align: middle; }
.ak-coa .table-accounts > tbody > tr > td:nth-child(1) { width: 44%; white-space: normal; }
.ak-coa .table-accounts > tbody > tr > td:nth-child(2) { width: 24%; white-space: normal; }
.ak-coa .table-accounts > thead > tr > th:nth-child(3),
.ak-coa .table-accounts > tbody > tr > td:nth-child(3) { width: 14%; text-align: right; white-space: nowrap; }
.ak-coa .table-accounts > thead > tr > th:nth-child(4),
.ak-coa .table-accounts > tbody > tr > td:nth-child(4) { width: 90px; text-align: center; }
.ak-coa .table-accounts > thead > tr > th:nth-child(5),
.ak-coa .table-accounts > tbody > tr > td:nth-child(5) { width: 1%; text-align: right; white-space: nowrap; }
.ak-coa .table-accounts .ak-switch { display: block; margin: 0 auto; }
.ak-coa .table-accounts td .ak-num { font-weight: 500; }
.ak-num--negative { color: var(--ak-danger); }
.ak-num--zero { color: var(--ak-text-4); }

/* Toggle switch (button role="switch") */
.ak-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ak-border-strong);
  cursor: pointer;
  vertical-align: middle;
  transition: background var(--ak-transition);
}
.ak-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--ak-shadow-xs);
  transition: transform var(--ak-transition);
}
.ak-switch.is-on { background: var(--ak-success); }
.ak-switch.is-on::after { transform: translateX(14px); }
.ak-switch:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-switch[disabled] { opacity: 0.5; cursor: progress; }

/* Row action buttons */
.ak-row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.ak-row-actions .btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ak-row-actions .ak-btn-danger:hover,
.ak-row-actions .ak-btn-danger:focus { color: var(--ak-danger); border-color: var(--ak-danger-border); background: var(--ak-danger-bg); }

/* Form sections inside dialogs and settings pages */
.ak-form-section { margin: 0 0 var(--ak-space-5); padding: 0; border: 0; }
.ak-form-section:last-of-type { margin-bottom: 0; }
.ak-form-section__title {
  width: auto;
  margin: 0 0 var(--ak-space-3);
  padding: 0;
  border: 0;
  color: var(--ak-text-3);
  font-size: var(--ak-text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ak-form-section .form-group { margin-bottom: var(--ak-space-3); }
.ak-field-help { margin: -4px 0 var(--ak-space-3); color: var(--ak-text-3); font-size: var(--ak-text-xs); line-height: 1.5; }
.ak-field-help:empty { display: none; }
.ak-optional { margin-left: 4px; color: var(--ak-text-4); font-weight: 400; text-transform: none; letter-spacing: 0; }
.ak-form-error { margin-bottom: var(--ak-space-4); }
.ak-form-notes {
  margin-bottom: var(--ak-space-4);
  padding: 10px 14px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-md);
  background: var(--ak-info-bg);
  color: var(--ak-text-2);
  font-size: var(--ak-text-sm);
}
.ak-form-notes ul,
.ak-error-list { margin: 0; padding-left: 18px; }

/* Settings pages (Akaunts Settings → default accounts) */
.ak-progress-note { display: flex; align-items: center; gap: var(--ak-space-3); margin-bottom: var(--ak-space-4); font-size: var(--ak-text-sm); }
.ak-settings-group { margin-bottom: var(--ak-space-4); padding: 0; }
.ak-settings-group__header {
  display: flex;
  align-items: center;
  gap: var(--ak-space-3);
  padding: var(--ak-space-4) var(--ak-space-5);
  border-bottom: 1px solid var(--ak-border-subtle);
}
.ak-settings-group__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--ak-radius-md);
  background: var(--ak-accent-50);
  color: var(--ak-accent-600);
}
.ak-settings-group__title { margin: 0; color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-settings-group__hint { margin: 2px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-settings-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr);
  gap: var(--ak-space-5);
  align-items: center;
  padding: var(--ak-space-4) var(--ak-space-5);
  border-bottom: 1px solid var(--ak-border-subtle);
}
.ak-settings-row:last-child { border-bottom: 0; }
.ak-settings-row__label { margin: 0; color: var(--ak-text); font-weight: 500; }
.ak-settings-row__help { margin: 2px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-settings-row__control { display: flex; align-items: center; gap: var(--ak-space-3); }
.ak-settings-row__control .bootstrap-select { flex: 1 1 auto; min-width: 0; }
.ak-form-actions { display: flex; justify-content: flex-end; gap: var(--ak-space-2); margin-top: var(--ak-space-4); }

@media (max-width: 767px) {
  .ak-class-tiles { display: flex; overflow-x: auto; gap: var(--ak-space-2); padding-bottom: 4px; scroll-snap-type: x proximity; }
  .ak-class-tile { flex: 0 0 auto; min-width: 116px; padding: 8px 12px 8px 14px; scroll-snap-align: start; }
  .ak-class-tile__count { font-size: var(--ak-text-lg); }
  .ak-settings-row { grid-template-columns: 1fr; gap: var(--ak-space-2); }
  .ak-settings-row__control { flex-wrap: wrap; }
  .ak-acct__path { max-width: 220px; }
}

/* 12b. Customers (DEV-007) --------------------------------------------------- */
.ak-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; letter-spacing: 0.01em; }
.ak-cell-muted { color: var(--ak-text-4); }
.ak-cell-sub { display: block; color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-cell-clamp { display: -webkit-box; max-width: 280px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ak-text-2); }
.ak-inline-form { display: inline-flex; margin: 0; }
.ak-tooltip-wrap { display: inline-flex; }
.ak-page-actions .ak-btn-danger:hover,
.ak-page-actions .ak-btn-danger:focus { color: var(--ak-danger); border-color: var(--ak-danger-border); background: var(--ak-danger-bg); }

/* Initials avatar */
.ak-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ak-accent-50);
  color: var(--ak-accent-700);
  border: 1px solid var(--ak-accent-100);
  font-size: var(--ak-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ak-avatar--lg { width: 56px; height: 56px; font-size: var(--ak-text-xl); }

/* List: person cell */
.ak-person { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.ak-person__text { display: flex; flex-direction: column; min-width: 0; }
.ak-person__name { color: var(--ak-text); font-weight: 500; }
.ak-person__name:hover { color: var(--ak-accent-600); }
.ak-person__sub { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-customers .table-clients td .row-options { padding-left: 42px; }
.ak-customers .table-clients > thead > tr > th:nth-child(3),
.ak-customers .table-clients > tbody > tr > td:nth-child(3) { min-width: 220px; }
.ak-customers .table-clients td .ak-num { font-weight: 500; }
.ak-customers .table-clients > thead > tr > th.ak-num { text-align: right; }
.ak-customers .table-clients > tbody > tr > td:has(> .ak-num) { text-align: right; }
.ak-row-inactive td { color: var(--ak-text-3); }
.ak-row-inactive .ak-avatar { background: var(--ak-surface-muted); color: var(--ak-text-3); border-color: var(--ak-border); }
.ak-class-tile--static { cursor: default; }
.ak-class-tile--static:hover { border-color: var(--ak-border); box-shadow: var(--ak-shadow-xs); }

/* Profile: identity header */
.ak-customer-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ak-space-4);
  margin-bottom: var(--ak-space-4);
  padding: var(--ak-space-5) var(--ak-space-6);
}
.ak-customer-hero__identity { display: flex; align-items: flex-start; gap: var(--ak-space-4); min-width: 0; flex: 1 1 420px; }
.ak-customer-hero__titles { min-width: 0; }
.ak-customer-hero .ak-page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ak-customer-hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--ak-text-2); font-size: var(--ak-text-sm); }
.ak-customer-hero__meta li { display: inline-flex; align-items: center; gap: 6px; }
.ak-customer-hero__meta i { color: var(--ak-text-4); width: 14px; text-align: center; }
.ak-customer-hero__address { flex-basis: 100%; }
.ak-customer-inactive { margin-bottom: var(--ak-space-4); }

/* Profile: summary tiles */
.ak-stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--ak-space-3); margin-bottom: var(--ak-space-5); }
.ak-stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-xs);
  color: inherit;
  transition: border-color var(--ak-transition), box-shadow var(--ak-transition);
}
a.ak-stat-tile:hover,
a.ak-stat-tile:focus { border-color: var(--ak-border-strong); box-shadow: var(--ak-shadow-sm); color: inherit; text-decoration: none; }
a.ak-stat-tile:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-stat-tile--accent { border-color: var(--ak-accent-200); background: var(--ak-accent-50); }
.ak-stat-tile--warning { border-color: var(--ak-warning-border); background: var(--ak-warning-bg); }
.ak-stat-tile__label { color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.ak-stat-tile__value { color: var(--ak-text); font-size: var(--ak-text-xl); font-weight: 600; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-stat-tile__value--text { font-size: var(--ak-text-md); }
.ak-stat-tile__value.ak-num { text-align: left; }
.ak-stat-tile__hint { color: var(--ak-text-3); font-size: var(--ak-text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stock tab headings are absolutely positioned above the panel; here they sit in the panel. */
.ak-customer .customer-profile-group-heading { position: static; margin: 0 0 var(--ak-space-4); }
.ak-customer .ak-tab-header .customer-profile-group-heading { margin-bottom: var(--ak-space-1); }
.ak-customers-table .table-responsive { overflow-x: auto; }

/* Profile: stacked tab navigation */
.customer_profile .customer-tabs { padding: 6px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); background: var(--ak-surface); box-shadow: var(--ak-shadow-xs); }
.customer_profile .customer-tabs > li { float: none; margin: 0; }
.customer_profile .customer-tabs > li > a { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border: 0; border-radius: var(--ak-radius); color: var(--ak-text-2); font-weight: 500; }
.customer_profile .customer-tabs > li > a .menu-icon { width: 16px; color: var(--ak-text-4); text-align: center; }
.customer_profile .customer-tabs > li > a:hover { background: var(--ak-surface-hover); color: var(--ak-text); }
.customer_profile .customer-tabs > li.active > a,
.customer_profile .customer-tabs > li.active > a:hover { background: var(--ak-accent-50); color: var(--ak-accent-700); }
.customer_profile .customer-tabs > li.active > a .menu-icon { color: var(--ak-accent-600); }
.customer_profile .customer-tabs > li > a .badge { margin-left: auto; }

/* Profile: form */
.ak-customer-form .ak-form-section { padding-bottom: var(--ak-space-4); border-bottom: 1px solid var(--ak-border-subtle); }
.ak-customer-form .ak-form-section:last-of-type { border-bottom: 0; }
.ak-customer-form fieldset[disabled] .form-control { background: var(--ak-surface-muted); }
.ak-req { margin-left: 3px; color: var(--ak-danger); }
.ak-field-error { margin: 4px 0 0; color: var(--ak-danger); font-size: var(--ak-text-xs); }
.ak-field-status:empty { display: none; }
.ak-field-status { margin: -6px 0 6px; font-size: var(--ak-text-xs); }
.ak-field-status.is-ok { color: var(--ak-success); }
.ak-field-status.is-error,
.ak-field-status.is-error a { color: var(--ak-danger); font-weight: 500; }
.ak-input-icon { position: relative; }
.ak-input-icon > i { position: absolute; top: 50%; left: 11px; transform: translateY(-50%); color: var(--ak-text-4); pointer-events: none; }
.ak-input-icon > .form-control { padding-left: 34px; }
.ak-ledger-link { color: var(--ak-text); font-weight: 500; }

/* Profile tabs: header, empty state, ledger */
.ak-tab-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--ak-space-3); margin-bottom: var(--ak-space-4); }
.ak-tab-header .customer-profile-group-heading { margin-top: 0; }
.ak-tab-header__hint { margin: 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-tab-header__figure { display: flex; flex-direction: column; align-items: flex-end; }
.ak-tab-header__figure span { color: var(--ak-text-3); font-size: var(--ak-text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.ak-tab-header__figure strong { color: var(--ak-text); font-size: var(--ak-text-xl); }
.ak-empty { padding: 40px 16px; border: 1px dashed var(--ak-border-strong); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); text-align: center; }
.ak-empty__icon { color: var(--ak-text-4); font-size: 26px; }
.ak-empty__title { margin: 10px 0 2px; color: var(--ak-text); font-weight: 600; }
.ak-empty__text { max-width: 420px; margin: 0 auto; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-table--compact > thead > tr > th { color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.ak-table--compact > thead > tr > th.ak-num,
.ak-table--compact > tbody > tr > td.ak-num { text-align: right; white-space: nowrap; }
.ak-table--compact > tbody > tr > td { vertical-align: middle; }
.ak-ledger-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ak-space-3); margin-bottom: var(--ak-space-4); }
.ak-ledger-totals > div { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); }
.ak-ledger-totals span { color: var(--ak-text-3); font-size: var(--ak-text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.ak-ledger-totals strong { color: var(--ak-text); font-size: var(--ak-text-lg); text-align: left; }
.ak-table--compact > tbody > tr > td { white-space: nowrap; }
.ak-table--compact > tbody > tr > td.ak-ledger-desc { white-space: normal; min-width: 180px; }
.ak-table--compact > tbody > tr > td.ak-cell-wrap { white-space: normal; min-width: 120px; }
.ak-table--compact > thead > tr > th.ak-col-id { min-width: 72px; }
.ak-ledger-totals__balance { border-color: var(--ak-accent-200) !important; background: var(--ak-accent-50) !important; }
.ak-ledger-desc { max-width: 320px; color: var(--ak-text-2); }
.ak-row-pending td { background: var(--ak-warning-bg); }
.ak-ledger-table .ak-badge { margin-left: 6px; }

@media (max-width: 767px) {
  .ak-customer-hero { padding: var(--ak-space-4); }
  .ak-customer-hero__identity { flex-basis: 100%; }
  .ak-avatar--lg { width: 44px; height: 44px; font-size: var(--ak-text-md); }
  .ak-customer-hero .ak-page-actions,
  .ak-customer-hero .ak-page-actions .ak-inline-form,
  .ak-customer-hero .ak-page-actions .ak-tooltip-wrap { width: 100%; }
  .ak-customer-hero .ak-page-actions .btn { width: 100%; }
  .ak-stat-tiles { display: flex; overflow-x: auto; gap: var(--ak-space-2); padding-bottom: 4px; scroll-snap-type: x proximity; }
  .ak-stat-tile { flex: 0 0 auto; min-width: 160px; scroll-snap-align: start; }
  .ak-ledger-totals { grid-template-columns: 1fr; }
  .ak-tab-header__figure { align-items: flex-start; }
  .customer_profile .customer-tabs { display: flex; overflow-x: auto; margin-bottom: var(--ak-space-3); }
  .customer_profile .customer-tabs > li > a { white-space: nowrap; }
  .ak-cell-clamp { max-width: 180px; }
}

/* 12c. Report catalogue (Accounting → Reports) ------------------------------ */
.ak-tone--asset { --ak-tone: #3f63d4; --ak-tone-bg: #eef2fd; }
.ak-tone--income { --ak-tone: #23875a; --ak-tone-bg: #eaf7f0; }
.ak-tone--equity { --ak-tone: #6a5ad6; --ak-tone-bg: #f1effd; }
.ak-tone--liability { --ak-tone: #c46a1f; --ak-tone-bg: #fdf3ea; }
.ak-tone--accent { --ak-tone: var(--ak-accent-600); --ak-tone-bg: var(--ak-accent-50); }
.ak-tone--warning { --ak-tone: #b7791f; --ak-tone-bg: #fef6e4; }

.ak-reports .ak-page-header { align-items: center; }
.ak-reports__count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.ak-reports__count strong { color: var(--ak-text); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-reports__count span { color: var(--ak-text-3); font-size: var(--ak-text-xs); text-transform: uppercase; letter-spacing: 0.05em; }

/* Key reports: four larger cards with a tinted wash */
.ak-reports__featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--ak-space-3); margin-bottom: var(--ak-space-5); }
.ak-report-card--featured { min-height: 132px; flex-direction: column; align-items: flex-start; padding: 18px 18px 16px; }
.ak-report-card--featured .ak-report-card__icon { width: 40px; height: 40px; font-size: 17px; margin-bottom: 4px; }
.ak-report-card--featured .ak-report-card__title { font-size: var(--ak-text-md); }
.ak-report-card--featured .ak-report-card__go { position: absolute; right: 18px; bottom: 16px; }

/* Toolbar: search, category chips, recently opened */
.ak-reports__toolbar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ak-space-3); margin-bottom: var(--ak-space-5); padding: 12px 14px; box-shadow: var(--ak-shadow-sm); }
.ak-reports__search { position: relative; flex: 1 1 280px; max-width: 420px; margin: 0; font-weight: 400; }
.ak-reports__search > i { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--ak-text-4); pointer-events: none; }
.ak-reports__search .form-control { height: 38px; padding-left: 36px; padding-right: 36px; border-radius: var(--ak-radius-md); }
.ak-reports__search kbd { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); padding: 1px 6px; border: 1px solid var(--ak-border); border-radius: 4px; background: var(--ak-surface-muted); box-shadow: none; color: var(--ak-text-3); font-size: 11px; }
.ak-reports__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--ak-border); border-radius: 999px; background: var(--ak-surface); color: var(--ak-text-2); font-size: var(--ak-text-sm); font-weight: 500; cursor: pointer; transition: border-color var(--ak-transition), background var(--ak-transition), color var(--ak-transition); }
.ak-chip-btn i { color: var(--ak-tone, var(--ak-text-4)); font-size: 12px; }
.ak-chip-btn span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--ak-surface-muted); color: var(--ak-text-3); font-size: 11px; line-height: 18px; text-align: center; }
.ak-chip-btn:hover { border-color: var(--ak-border-strong); color: var(--ak-text); }
.ak-chip-btn:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-chip-btn.is-selected { border-color: var(--ak-tone, var(--ak-accent-500)); background: var(--ak-tone-bg, var(--ak-accent-50)); color: var(--ak-tone, var(--ak-accent-700)); }
.ak-chip-btn.is-selected span { background: var(--ak-surface); color: inherit; }
.ak-reports__recent { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 10px; border-top: 1px solid var(--ak-border-subtle); font-size: var(--ak-text-sm); }
.ak-reports__recent-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ak-text-3); font-size: var(--ak-text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.ak-reports__recent-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-recent-link { padding: 2px 10px; border-radius: 999px; background: var(--ak-surface-muted); border: 1px solid var(--ak-border-subtle); color: var(--ak-text-2); }
.ak-recent-link:hover, .ak-recent-link:focus { border-color: var(--ak-accent-200); background: var(--ak-accent-50); color: var(--ak-accent-700); text-decoration: none; }

/* Sections and cards */
.ak-report-section { margin-bottom: var(--ak-space-6); }
.ak-report-section__header { display: flex; align-items: center; gap: var(--ak-space-3); margin-bottom: var(--ak-space-3); }
.ak-report-section__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--ak-radius-md); background: var(--ak-tone-bg); color: var(--ak-tone); }
.ak-report-section__title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ak-text); font-size: var(--ak-text-lg); font-weight: 600; }
.ak-report-section__count { padding: 0 7px; border-radius: 999px; background: var(--ak-surface); border: 1px solid var(--ak-border); color: var(--ak-text-3); font-size: 11px; font-weight: 500; line-height: 18px; }
.ak-report-section__hint { margin: 1px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--ak-space-3); }

.ak-report-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  height: 100%;
  padding: 14px 44px 14px 14px;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  background: var(--ak-surface);
  box-shadow: var(--ak-shadow-xs);
  cursor: pointer;
  transition: border-color var(--ak-transition), box-shadow var(--ak-transition), transform var(--ak-transition);
}
.ak-report-card::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ak-tone); opacity: 0; transition: opacity var(--ak-transition); }
.ak-report-card:hover { border-color: var(--ak-border-strong); background: var(--ak-surface-hover); }
.ak-report-card:hover::before, .ak-report-card:focus-within::before { opacity: 1; }
.ak-report-card:focus-within { border-color: var(--ak-tone); box-shadow: var(--ak-focus-ring); }
.ak-report-card__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--ak-radius-md); background: var(--ak-tone-bg); color: var(--ak-tone); font-size: 15px; }
.ak-report-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ak-report-card__title { color: var(--ak-text); font-size: var(--ak-text-base); font-weight: 600; line-height: 20px; }
.ak-report-card__title:hover, .ak-report-card__title:focus { color: var(--ak-tone); text-decoration: none; outline: none; }
.ak-report-card__desc { display: -webkit-box; overflow: hidden; color: var(--ak-text-3); font-size: var(--ak-text-sm); line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ak-report-card__go { position: absolute; right: 16px; bottom: 15px; color: var(--ak-text-4); font-size: 12px; opacity: 0; transform: translateX(-4px); transition: opacity var(--ak-transition), transform var(--ak-transition), color var(--ak-transition); }
.ak-report-card:hover .ak-report-card__go { opacity: 1; transform: none; color: var(--ak-tone); }
.ak-report-card__pin { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--ak-radius); background: transparent; color: var(--ak-text-4); opacity: 0; cursor: pointer; transition: opacity var(--ak-transition), background var(--ak-transition), color var(--ak-transition); }
.ak-report-card:hover .ak-report-card__pin, .ak-report-card__pin:focus-visible, .ak-report-card.is-pinned .ak-report-card__pin { opacity: 1; }
.ak-report-card__pin:hover { background: var(--ak-surface-muted); color: #b7791f; }
.ak-report-card__pin:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-report-card.is-pinned .ak-report-card__pin { color: #d69e2e; }

@media (hover: none) {
  .ak-report-card__pin { opacity: 1; }
}

@media (max-width: 767px) {
  .ak-reports .ak-page-header { align-items: flex-start; }
  .ak-reports__count { flex-direction: row; align-items: baseline; gap: 6px; }
  .ak-reports__count strong { font-size: var(--ak-text-xl); }
  .ak-reports__featured { display: flex; overflow-x: auto; gap: var(--ak-space-2); padding-bottom: 4px; scroll-snap-type: x proximity; }
  .ak-reports__featured > div { flex: 0 0 78%; scroll-snap-align: start; }
  .ak-reports__toolbar { position: static; padding: 12px; }
  .ak-reports__search { flex-basis: 100%; max-width: none; }
  .ak-reports__search kbd { display: none; }
  .ak-reports__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .ak-chip-btn { flex: 0 0 auto; }
  .ak-report-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ak-report-card, .ak-report-card__go { transition: none; }
  .ak-report-card:hover { transform: none; }
}

/* 12d. Properties, units & unit sales (DEV-008) ------------------------------ */
:root {
  --ak-st-available: #2f9e62;
  --ak-st-sold: #3f63d4;
  --ak-st-rented: #7a5be0;
  --ak-st-repair: #d39221;
}
.ak-badge--accent { background: var(--ak-accent-50); border-color: var(--ak-accent-200); color: var(--ak-accent-700); }
.ak-badge--violet { background: #f4f1fe; border-color: #ddd4fb; color: #5b3fc4; }
.ak-class-tile--available::before { background: var(--ak-st-available); }
.ak-class-tile--sold::before { background: var(--ak-st-sold); }
.ak-class-tile--rented::before { background: var(--ak-st-rented); }
.ak-class-tile--repair::before { background: var(--ak-st-repair); }

/* Toolbar above the property cards */
.ak-prop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ak-space-3); margin-bottom: var(--ak-space-4); padding: 12px 14px; }
.ak-prop-toolbar .ak-reports__search { max-width: 360px; }
.ak-prop-toolbar select.form-control { width: auto; min-width: 150px; height: 38px; border-radius: var(--ak-radius-md); }
.ak-prop-toolbar__count { margin-left: auto; color: var(--ak-text-3); font-size: var(--ak-text-sm); }

/* Property cards */
.ak-prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--ak-space-4); }
.ak-prop-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 0; overflow: hidden; transition: border-color var(--ak-transition), box-shadow var(--ak-transition); }
.ak-prop-card:hover { border-color: var(--ak-border-strong); box-shadow: var(--ak-shadow-md); }
.ak-prop-card.is-inactive { background: var(--ak-surface-muted); }
.ak-prop-card.is-inactive .ak-prop-card__icon { filter: grayscale(1); opacity: 0.6; }
.ak-prop-card__head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ak-prop-card__icon,
.ak-hero__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--ak-radius-lg); background: var(--ak-tone-bg, var(--ak-accent-50)); color: var(--ak-tone, var(--ak-accent-600)); font-size: 18px; }
.ak-prop-card__titles { min-width: 0; flex: 1 1 auto; }
.ak-prop-card__title { display: block; overflow: hidden; color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.ak-prop-card__title::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.ak-prop-card__title:hover,
.ak-prop-card__title:focus { color: var(--ak-accent-600); text-decoration: none; outline: none; }
.ak-prop-card:focus-within { box-shadow: var(--ak-focus-ring); }
.ak-prop-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 3px 0 0; padding: 0; list-style: none; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-prop-meta li { display: inline-flex; align-items: center; gap: 5px; }
.ak-prop-meta i { color: var(--ak-text-4); font-size: 12px; }
.ak-prop-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -18px; padding: 12px 18px; border-top: 1px solid var(--ak-border-subtle); background: var(--ak-surface-muted); font-size: var(--ak-text-sm); }
.ak-prop-card__price { color: var(--ak-text-3); }
.ak-prop-card__price strong { color: var(--ak-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-prop-card__go { color: var(--ak-text-4); transition: transform var(--ak-transition), color var(--ak-transition); }
.ak-prop-card:hover .ak-prop-card__go { color: var(--ak-accent-600); transform: translateX(2px); }
.ak-tone--residential { --ak-tone: #3f63d4; --ak-tone-bg: #eef2fd; }
.ak-tone--commercial { --ak-tone: #c46a1f; --ak-tone-bg: #fdf3ea; }
.ak-tone--plots { --ak-tone: #23875a; --ak-tone-bg: #eaf7f0; }
.ak-tone--mixed { --ak-tone: #6a5ad6; --ak-tone-bg: #f1effd; }
.ak-tone--none { --ak-tone: var(--ak-text-3); --ak-tone-bg: var(--ak-surface-muted); }

/* Occupancy bar + legend (available / sold / rented / repair) */
.ak-occupancy__bar { display: flex; height: 8px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-occupancy__seg { height: 100%; transition: width 300ms ease; }
.ak-occupancy__seg + .ak-occupancy__seg { box-shadow: -1px 0 0 var(--ak-surface); }
.ak-occupancy__seg--available { background: var(--ak-st-available); }
.ak-occupancy__seg--sold { background: var(--ak-st-sold); }
.ak-occupancy__seg--rented { background: var(--ak-st-rented); }
.ak-occupancy__seg--repair { background: var(--ak-st-repair); }
.ak-occupancy__legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ak-occupancy__legend li { display: flex; flex-direction: column; min-width: 0; }
.ak-occupancy__legend strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-occupancy__legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--ak-text-3); font-size: 11.5px; white-space: nowrap; }
.ak-occupancy__legend span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--ak-dot); }
.ak-occupancy--empty { color: var(--ak-text-4); font-size: var(--ak-text-sm); }

/* Detail page hero (property and unit) */
.ak-hero { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ak-space-4); margin-bottom: var(--ak-space-4); padding: var(--ak-space-5) var(--ak-space-6); }
.ak-hero__identity { display: flex; align-items: flex-start; gap: var(--ak-space-4); min-width: 0; flex: 1 1 420px; }
.ak-hero__icon { width: 56px; height: 56px; font-size: 22px; }
.ak-hero .ak-page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ak-hero .ak-prop-meta { margin-top: 8px; color: var(--ak-text-2); }
.ak-hero__desc { max-width: 760px; margin: 10px 0 0; color: var(--ak-text-2); font-size: var(--ak-text-sm); line-height: 1.55; white-space: pre-line; }
.ak-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ak-text-3); }
.ak-back-link:hover { color: var(--ak-accent-600); text-decoration: none; }

/* Unit detail layout */
.ak-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--ak-space-4); align-items: start; }
.ak-panel { margin-bottom: var(--ak-space-4); }
.ak-panel__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ak-space-3); padding: 14px 20px; border-bottom: 1px solid var(--ak-border-subtle); }
.ak-panel__title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-panel__hint { margin: 2px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-panel__body { padding: 16px 20px; }
.ak-panel__body--flush { padding: 0; }
.ak-panel__body--flush .table { margin: 0; }
.ak-panel__body--flush .table > thead > tr > th:first-child,
.ak-panel__body--flush .table > tbody > tr > td:first-child,
.ak-panel__body--flush .table > tfoot > tr > td:first-child { padding-left: 20px; }
.ak-panel__body--flush .table > thead > tr > th:last-child,
.ak-panel__body--flush .table > tbody > tr > td:last-child,
.ak-panel__body--flush .table > tfoot > tr > td:last-child { padding-right: 20px; }
.ak-dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 16px; margin: 0; font-size: var(--ak-text-sm); }
.ak-dl dt { color: var(--ak-text-3); font-weight: 500; }
.ak-dl dd { margin: 0; min-width: 0; color: var(--ak-text); overflow-wrap: anywhere; }
.ak-progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-progress__bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ak-st-available), #46b77c); }
.ak-progress-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-buyer { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ak-buyer__name { display: block; color: var(--ak-text); font-weight: 600; }
.ak-plan-table > tbody > tr.is-overdue > td { background: var(--ak-danger-bg); }
.ak-plan-table > tbody > tr.is-paid > td { color: var(--ak-text-3); }
.ak-plan-table > tbody > tr.is-cancelled > td { color: var(--ak-text-4); }
.ak-plan-table > tfoot > tr > td { border-top: 2px solid var(--ak-border); font-weight: 600; }
.ak-plan-type { display: inline-flex; align-items: center; gap: 6px; }
.ak-plan-type__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ak-text-4); }
.ak-plan-type--1 .ak-plan-type__dot { background: var(--ak-accent-500); }
.ak-plan-type--3 .ak-plan-type__dot { background: var(--ak-st-rented); }
.ak-plan-type--4 .ak-plan-type__dot { background: var(--ak-st-repair); }
.ak-sale-history { margin: 0; padding: 0; list-style: none; }
.ak-sale-history li { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--ak-border-subtle); font-size: var(--ak-text-sm); }
.ak-sale-history li:first-child { border-top: 0; }
.ak-sale-history__body { flex: 1 1 auto; min-width: 0; }
.ak-sale-history__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ak-text); font-weight: 600; }
.ak-sale-history__meta { margin-top: 2px; color: var(--ak-text-3); }
.ak-callout { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); color: var(--ak-text-2); font-size: var(--ak-text-sm); }
.ak-callout > i { margin-top: 2px; color: var(--ak-text-4); }
.ak-callout--info { border-color: var(--ak-accent-200); background: var(--ak-accent-50); }
.ak-callout--info > i { color: var(--ak-accent-600); }
.ak-callout--success { border-color: var(--ak-success-border); background: var(--ak-success-bg); }
.ak-callout--success > i { color: var(--ak-success); }
.ak-callout--warning { border-color: var(--ak-warning-border); background: var(--ak-warning-bg); }
.ak-callout--warning > i { color: var(--ak-warning); }
.ak-callout--danger { border-color: var(--ak-danger-border); background: var(--ak-danger-bg); }
.ak-callout--danger > i { color: var(--ak-danger); }
.ak-actions-list { display: flex; flex-direction: column; gap: 8px; }
.ak-actions-list .btn,
.ak-actions-list form,
.ak-actions-list .ak-tooltip-wrap { width: 100%; }
.ak-actions-list .btn { justify-content: flex-start; }

/* Forms in dialogs: two columns that stack on phones */
.ak-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ak-form-grid > .ak-span-2 { grid-column: 1 / -1; }
.ak-input-suffix { display: flex; }
.ak-input-suffix > .form-control:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ak-input-suffix > select.form-control:last-child { flex: 0 0 110px; width: 110px; margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ak-input-prefix { position: relative; }
.ak-input-prefix > span { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--ak-text-4); font-size: var(--ak-text-xs); font-weight: 600; pointer-events: none; }
.ak-input-prefix > .form-control { padding-left: 46px; font-variant-numeric: tabular-nums; }
.ak-input-prefix--none > .form-control { padding-left: 12px; }

/* Sell-unit page */
.ak-sell { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--ak-space-5); align-items: start; }
.ak-sell__aside { position: sticky; top: 16px; }
.ak-step { padding: 18px 20px 6px; border-top: 1px solid var(--ak-border-subtle); }
.ak-step:first-child { border-top: 0; }
.ak-step__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ak-step__num { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ak-accent-50); color: var(--ak-accent-700); font-size: var(--ak-text-xs); font-weight: 700; }
.ak-step__title { margin: 2px 0 0; color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-step__hint { margin: 2px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-step__body { padding-left: 38px; }
.ak-toggle-row { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; color: var(--ak-text-2); font-weight: 500; cursor: pointer; }
.ak-toggle-row input { margin: 0; }
.ak-summary { padding: 18px 20px; }
.ak-summary__unit { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ak-border-subtle); }
.ak-summary__rows { margin: 14px 0 0; padding: 0; list-style: none; font-size: var(--ak-text-sm); }
.ak-summary__rows li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: var(--ak-text-2); }
.ak-summary__rows li strong { color: var(--ak-text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ak-summary__rows li.is-total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--ak-border-strong); font-size: var(--ak-text-base); }
.ak-summary__status { margin-top: 12px; }
.ak-summary__status .ak-callout { padding: 8px 12px; }
.ak-schedule-preview { max-height: 340px; overflow: auto; border-top: 1px solid var(--ak-border-subtle); }
.ak-schedule-preview .table { margin: 0; }
.ak-schedule-preview thead th { position: sticky; top: 0; z-index: 1; background: var(--ak-surface); }
.ak-schedule-preview .table > thead > tr > th:first-child,
.ak-schedule-preview .table > tbody > tr > td:first-child { padding-left: 20px; }
.ak-schedule-preview .table > thead > tr > th:last-child,
.ak-schedule-preview .table > tbody > tr > td:last-child { padding-right: 20px; }
.ak-summary__foot { padding: 14px 20px; border-top: 1px solid var(--ak-border-subtle); }
.ak-summary__foot .btn { width: 100%; justify-content: center; }
.ak-summary__foot p { margin: 8px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-xs); text-align: center; }
.ak-is-loading { opacity: 0.55; transition: opacity var(--ak-transition); }
.ak-sell [hidden] { display: none !important; } /* grid/flex rows must still honour the hidden attribute */
.table-ak-units > tbody > tr > td:has(> .ak-num) { text-align: right; }

@media (max-width: 1199px) {
  .ak-sell { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 991px) {
  .ak-detail-grid,
  .ak-sell { grid-template-columns: minmax(0, 1fr); } /* lets wide tables scroll inside their card */
  .ak-sell__aside { position: static; }
}
@media (max-width: 767px) {
  .ak-prop-grid { grid-template-columns: 1fr; }
  .ak-prop-toolbar .ak-reports__search { flex-basis: 100%; max-width: none; }
  .ak-prop-toolbar select.form-control { flex: 1 1 140px; min-width: 0; }
  .ak-prop-toolbar__count { flex-basis: 100%; margin-left: 0; }
  .ak-hero { padding: var(--ak-space-4); }
  .ak-hero__identity { flex-basis: 100%; }
  .ak-hero__icon { width: 44px; height: 44px; font-size: 18px; }
  .ak-hero .ak-page-actions { width: 100%; }
  .ak-hero .ak-page-actions .btn { flex: 1 1 auto; }
  .ak-form-grid { grid-template-columns: 1fr; }
  .ak-step__body { padding-left: 0; }
  .ak-panel__header,
  .ak-panel__body,
  .ak-sale-history li { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ak-occupancy__seg,
  .ak-prop-card__go { transition: none; }
}

/* 12e. Staff profile (admin/profile) ------------------------------------------ */
.ak-detail-grid--single { grid-template-columns: minmax(0, 1fr); }
.ak-me--notices .ak-detail-grid--single { max-width: 820px; margin: 0 auto; }
.ak-panel__title > i { color: var(--ak-text-4); font-size: 14px; }

.ak-me-hero { margin-bottom: var(--ak-space-4); overflow: hidden; }
.ak-me-hero__band { height: 84px; background: linear-gradient(120deg, var(--ak-navy-800) 0%, var(--ak-accent-600) 70%, #5b8def 100%); }
.ak-me-hero__body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ak-space-4); padding: 0 var(--ak-space-6) var(--ak-space-5); }
.ak-me-hero__avatar { flex: 0 0 auto; margin-top: -42px; }
.ak-me-hero__img { display: block; width: 96px; height: 96px; border: 4px solid var(--ak-surface); border-radius: 50%; background: var(--ak-surface-muted); box-shadow: var(--ak-shadow-md); object-fit: cover; }
.ak-me-hero__identity { flex: 1 1 360px; min-width: 0; padding-top: var(--ak-space-3); }
.ak-me-hero .ak-page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ak-me-hero__meta { margin-top: 8px; color: var(--ak-text-2); }
.ak-me-hero__meta a { color: inherit; }
.ak-me-hero__meta a:hover { color: var(--ak-accent-600); }
.ak-me-hero__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ak-me-hero__actions { align-self: flex-end; }
.ak-me-copy { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--ak-radius); background: transparent; color: var(--ak-text-4); cursor: pointer; }
.ak-me-copy:hover,
.ak-me-copy:focus-visible { background: var(--ak-surface-muted); color: var(--ak-accent-600); outline: none; }

/* Notifications: Perfex's notification markup, restyled */
.ak-me-notifications .notification-handler { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 44px 12px 20px; border-top: 1px solid var(--ak-border-subtle); }
.ak-me-notifications .ak-me-notification:first-child .notification-handler { border-top: 0; }
.ak-me-notifications .notification-handler:hover { background: var(--ak-surface-hover); }
.ak-me-notifications .unread-notification { background: var(--ak-accent-50); }
.ak-me-notifications .unread-notification::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ak-accent-500); }
.ak-me-notifications img { flex: 0 0 auto; width: 32px; height: 32px; margin: 0 !important; border-radius: 50%; float: none !important; }
.ak-me-notifications .media-body { flex: 1 1 auto; min-width: 0; }
.ak-me-notifications .description { color: var(--ak-text); font-size: var(--ak-text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.ak-me-notification__time { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-me-notifications .not-mark-as-read-inline { position: absolute; top: 12px; right: 16px; color: var(--ak-accent-500); }
.ak-me-notifications__empty { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: var(--ak-text-3); }
.ak-me-notifications__empty.hide { display: none; }
.ak-me-notifications__more { border-top: 1px solid var(--ak-border-subtle); text-align: center; }

/* Activity timeline */
.ak-me-timeline { margin: 0; padding: 14px 20px 6px; list-style: none; }
.ak-me-timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.ak-me-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: var(--ak-border-subtle); }
.ak-me-timeline__dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 5px; border: 2px solid var(--ak-accent-300); border-radius: 50%; background: var(--ak-surface); }
.ak-me-timeline__text { margin: 0; color: var(--ak-text-2); font-size: var(--ak-text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.ak-me-timeline__time { color: var(--ak-text-4); font-size: var(--ak-text-xs); }

/* Checklist, sign-ins, access */
.ak-me-checklist { margin: 14px 0 0; padding: 0; list-style: none; }
.ak-me-checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--ak-border-subtle); }
.ak-me-checklist li:first-child { border-top: 0; }
.ak-me-checklist li > i { margin-top: 3px; color: var(--ak-text-4); }
.ak-me-checklist li.is-done > i { color: var(--ak-success); }
.ak-me-checklist li > div { flex: 1 1 auto; min-width: 0; }
.ak-me-checklist__label { display: block; color: var(--ak-text); font-size: var(--ak-text-sm); font-weight: 500; }
.ak-me-checklist li.is-done .ak-me-checklist__label { color: var(--ak-text-3); }
.ak-me-checklist__hint { display: block; color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-me-checklist__fix { flex: 0 0 auto; font-size: var(--ak-text-xs); font-weight: 600; }
.ak-me-signins { margin: 0; padding: 6px 0; list-style: none; }
.ak-me-signins li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 20px; font-size: var(--ak-text-sm); }
.ak-me-signins__meta { display: flex; flex-direction: column; align-items: flex-end; color: var(--ak-text-3); font-size: var(--ak-text-xs); text-align: right; }
.ak-me-access { display: grid; gap: 10px; margin: 0; }
.ak-me-access dt { color: var(--ak-text-2); font-size: var(--ak-text-sm); font-weight: 600; }
.ak-me-access dd { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 0; }
.ak-me-access .ak-chip::before { display: none; }
.ak-me-access__more { margin-top: 10px; }
.ak-me-access__more > summary { color: var(--ak-accent-600); font-size: var(--ak-text-sm); font-weight: 500; cursor: pointer; }
.ak-me-access__more[open] > summary { margin-bottom: 10px; }
.ak-me-access__all { margin: 0; color: var(--ak-text-2); font-size: var(--ak-text-sm); }
.ak-me-access__all i { color: #d69e2e; }

@media (max-width: 767px) {
  .ak-me-hero__band { height: 64px; }
  .ak-me-hero__body { padding: 0 var(--ak-space-4) var(--ak-space-4); }
  .ak-me-hero__avatar { margin-top: -36px; }
  .ak-me-hero__img { width: 76px; height: 76px; }
  .ak-me-hero__actions { width: 100%; }
  .ak-me-hero__actions .btn:not(.btn-icon) { flex: 1 1 auto; }
  .ak-me-notifications .notification-handler { padding-left: 16px; }
  .ak-me-timeline { padding-left: 16px; padding-right: 16px; }
  .ak-me-signins li { padding-left: 16px; padding-right: 16px; }
}

/* 12f. Edit profile (staff/edit_profile) -------------------------------------- */
.ak-account__layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--ak-space-5); align-items: start; }
.ak-account__main { max-width: 860px; }
.ak-account__nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.ak-account__nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--ak-radius); color: var(--ak-text-2); font-weight: 500; }
.ak-account__nav a i { width: 16px; color: var(--ak-text-4); text-align: center; }
.ak-account__nav a:hover { background: var(--ak-surface-hover); color: var(--ak-text); text-decoration: none; }
.ak-account__nav a.is-active { background: var(--ak-accent-50); color: var(--ak-accent-700); }
.ak-account__nav a.is-active i { color: var(--ak-accent-600); }
.ak-account .ak-panel { scroll-margin-top: 16px; }
.ak-panel__foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--ak-border-subtle); }

/* Photo */
.ak-photo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ak-space-5); }
.ak-photo__preview { position: relative; flex: 0 0 auto; width: 112px; height: 112px; }
.ak-photo__preview img { width: 112px; height: 112px; border: 1px solid var(--ak-border); border-radius: 50%; background: var(--ak-surface-muted); box-shadow: var(--ak-shadow-sm); object-fit: cover; }
.ak-photo__busy { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.7); color: var(--ak-accent-600); font-size: 22px; }
.ak-photo.is-busy .ak-photo__busy { display: flex; }
.ak-photo__controls { flex: 1 1 280px; min-width: 0; }
.ak-photo__controls form { margin: 0; }
.ak-dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 18px 16px; border: 1.5px dashed var(--ak-border-strong); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); color: var(--ak-text-3); font-weight: 400; text-align: center; cursor: pointer; transition: border-color var(--ak-transition), background var(--ak-transition); }
.ak-dropzone > i { color: var(--ak-accent-500); font-size: 22px; }
.ak-dropzone:hover,
.ak-dropzone.is-over,
.ak-dropzone:focus-within { border-color: var(--ak-accent-500); background: var(--ak-accent-50); }
.ak-dropzone__title { color: var(--ak-text); font-weight: 600; }
.ak-dropzone__hint { font-size: var(--ak-text-xs); }
.ak-photo__status { min-height: 18px; margin: 8px 0; font-size: var(--ak-text-sm); }
.ak-photo__status.is-ok { color: var(--ak-success); }
.ak-photo__status.is-error { color: var(--ak-danger); font-weight: 500; }
.ak-photo__status.is-info { color: var(--ak-text-3); }

/* Segmented control, signature preview */
.ak-seg { display: inline-flex; padding: 2px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); }
.ak-seg button { padding: 4px 12px; border: 0; border-radius: var(--ak-radius); background: transparent; color: var(--ak-text-3); font-size: var(--ak-text-sm); font-weight: 500; }
.ak-seg button.is-selected { background: var(--ak-surface); color: var(--ak-text); box-shadow: var(--ak-shadow-xs); }
.ak-seg button:focus-visible { outline: none; box-shadow: var(--ak-focus-ring); }
.ak-account #ak_sec_signature .form-group { margin-bottom: 0; }
.ak-sig-preview { display: block; width: 100%; min-height: 140px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: #fff; }

/* Save bar for the details form */
.ak-savebar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--ak-space-4); padding: 10px 14px; border: 1px solid var(--ak-accent-200); border-radius: var(--ak-radius-lg); background: var(--ak-surface); box-shadow: var(--ak-shadow-lg); color: var(--ak-text-2); font-size: var(--ak-text-sm); }
.ak-savebar[hidden] { display: none; }
.ak-savebar i { color: var(--ak-accent-600); }
.ak-savebar > div { display: flex; gap: 8px; }
.ak-account__form > .ak-form-actions { margin: 0 0 var(--ak-space-5); }

/* Password */
.ak-password { position: relative; }
.ak-password .form-control { padding-right: 42px; }
.ak-password__toggle { position: absolute; top: 50%; right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: var(--ak-radius); background: transparent; color: var(--ak-text-4); transform: translateY(-50%); }
.ak-password__toggle:hover,
.ak-password__toggle:focus-visible { background: var(--ak-surface-muted); color: var(--ak-text-2); outline: none; }
.ak-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ak-strength__bar { display: grid; flex: 1 1 auto; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ak-strength__bar span { height: 5px; border-radius: 999px; background: var(--ak-border-subtle); transition: background var(--ak-transition); }
.ak-strength[data-score="1"] .ak-strength__bar span:nth-child(-n+1) { background: var(--ak-danger); }
.ak-strength[data-score="2"] .ak-strength__bar span:nth-child(-n+2) { background: #e08a2c; }
.ak-strength[data-score="3"] .ak-strength__bar span:nth-child(-n+3) { background: #c9a227; }
.ak-strength[data-score="4"] .ak-strength__bar span { background: var(--ak-success); }
.ak-strength__label { min-width: 70px; color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 600; text-align: right; }
.ak-strength__rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-strength__rules li::before { content: "\f111"; margin-right: 6px; font-family: "Font Awesome 6 Free"; font-weight: 400; font-size: 10px; }
.ak-strength__rules li.is-ok { color: var(--ak-success); }
.ak-strength__rules li.is-ok::before { content: "\f058"; font-weight: 900; }
#ak_capslock,
#ak_capslock_text { color: var(--ak-warning); }
.ak-account .ak-field-status { margin: 6px 0 0; }

/* Two-factor options */
.ak-options { display: grid; gap: 8px; }
.ak-option { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); font-weight: 400; cursor: pointer; transition: border-color var(--ak-transition), background var(--ak-transition); }
.ak-option:hover { border-color: var(--ak-border-strong); }
.ak-option input { margin: 12px 0 0; }
.ak-option:has(input:checked) { border-color: var(--ak-accent-500); background: var(--ak-accent-50); }
.ak-option:has(input:focus-visible) { box-shadow: var(--ak-focus-ring); }
.ak-option__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); color: var(--ak-text-3); }
.ak-option:has(input:checked) .ak-option__icon { background: var(--ak-surface); color: var(--ak-accent-600); }
.ak-option__text { display: flex; flex-direction: column; min-width: 0; }
.ak-option__text strong { color: var(--ak-text); font-weight: 600; }
.ak-option__text span { color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-qr:not(:empty) { margin-top: 14px; padding: 14px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); }
.ak-qr .google_auth_qr img { max-width: 200px; margin: 0 auto; border-radius: var(--ak-radius-md); background: #fff; }

@media (max-width: 991px) {
  .ak-account__layout { grid-template-columns: minmax(0, 1fr); }
  .ak-account__nav { position: static; flex-direction: row; overflow-x: auto; }
  .ak-account__nav a { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 767px) {
  .ak-photo { justify-content: center; }
  .ak-strength__rules { grid-template-columns: 1fr; }
  .ak-savebar > div { width: 100%; }
  .ak-savebar .btn { flex: 1 1 auto; }
}

/* 12g. Rental agreements (DEV-010) ------------------------------------------- */
/* Rentals use the "rented" violet as their accent; everything else is the shared palette. */
.ak-rent-roll { display: flex; flex-direction: column; align-items: flex-end; padding: 4px 14px 4px 0; margin-right: 4px; border-right: 1px solid var(--ak-border); line-height: 1.25; }
.ak-rent-roll span { color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.ak-rent-roll strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-toolbar__note { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; align-self: flex-end; padding-bottom: 8px; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-toolbar__note i { color: var(--ak-st-rented); }
.ak-row-attention td { background: var(--ak-danger-bg); }
.ak-row-ended td { color: var(--ak-text-3); }
.ak-row-ended .ak-person__name, .ak-row-ended .ak-agreement-no { color: var(--ak-text-2); }
.ak-agreement-no { font-weight: 600; white-space: nowrap; }
.ak-nowrap { white-space: nowrap; }
.ak-rentals-page .ak-toolbar { grid-template-columns: minmax(220px, 340px) 1fr; }
.ak-rent-facts .ak-num, .ak-rent-balance .ak-num, .ak-class-tile__count.ak-num { text-align: left; }
.table-ak-rentals .ak-cell-sub i { color: var(--ak-st-rented); font-size: 10px; }

/* New agreement / renewal form */
.ak-rental-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); }
.ak-rental-pair__arrow { color: var(--ak-text-4); }
.ak-charges { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.ak-charges__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ak-term-line { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 14px 0 6px; padding: 0; list-style: none; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-lg); overflow: hidden; }
.ak-term-line li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--ak-surface-muted); }
.ak-term-line li + li { border-left: 1px solid var(--ak-border-subtle); text-align: right; }
.ak-term-line span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-term-line strong { color: var(--ak-text); font-size: var(--ak-text-sm); font-weight: 600; }

/* Agreement page: term timeline */
.ak-term { position: relative; padding: 6px 0 22px; }
.ak-term__bar { height: 10px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-term__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9b85ec, var(--ak-st-rented)); transition: width 300ms ease; }
.ak-term__bar--expiring span { background: linear-gradient(90deg, #f0c26a, var(--ak-st-repair)); }
.ak-term__bar--expired span { background: var(--ak-danger); }
.ak-term__bar--terminated span, .ak-term__bar--renewed span { background: var(--ak-text-4); }
.ak-term__today { position: absolute; top: 20px; transform: translateX(-50%); padding: 1px 6px; border-radius: var(--ak-radius-sm); background: var(--ak-navy-800); color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.ak-term__today::before { content: ""; position: absolute; top: -12px; left: 50%; width: 2px; height: 12px; margin-left: -1px; background: var(--ak-navy-800); }
.ak-term__ends { display: flex; justify-content: space-between; gap: 12px; }
.ak-term__ends div { display: flex; flex-direction: column; }
.ak-term__ends span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-term__ends strong { color: var(--ak-text); font-weight: 600; }
.ak-term__mid { align-items: center; text-align: center; }
.ak-term__end { align-items: flex-end; text-align: right; }
.ak-chain { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ak-border-subtle); }
.ak-chain__title { margin: 0 0 8px; color: var(--ak-text-3); font-size: var(--ak-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ak-chain ol { margin: 0; padding: 0; list-style: none; }
.ak-chain li { position: relative; display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; padding: 6px 0 6px 18px; font-size: var(--ak-text-sm); color: var(--ak-text-2); }
.ak-chain li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--ak-border-strong); }
.ak-chain li + li::after { content: ""; position: absolute; left: 6px; top: -6px; width: 2px; height: 18px; background: var(--ak-border); }
.ak-chain li.is-current::before { background: var(--ak-st-rented); box-shadow: 0 0 0 3px #ece6fd; }

/* Agreement page: rent, balance, terms */
.ak-rent-table { margin: 0; }
.ak-rent-table td { padding: 10px 20px !important; }
.ak-rent-table tfoot td { border-top: 1px solid var(--ak-border) !important; color: var(--ak-text); font-weight: 600; }
.ak-rent-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--ak-border-subtle); }
.ak-rent-facts div, .ak-rent-balance div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ak-rent-facts span, .ak-rent-balance span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-rent-facts strong, .ak-rent-balance strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-rent-facts small { color: var(--ak-text-4); font-size: 11.5px; }
.ak-rent-balance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ak-rent-balance div { padding: 10px 12px; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); }
.ak-rent-balance .is-due { border-color: var(--ak-warning-border); background: var(--ak-warning-bg); }
.ak-rent-balance .is-due strong { color: var(--ak-warning); }
.ak-terms-text { margin: 0; color: var(--ak-text-2); font-size: var(--ak-text-sm); line-height: 1.6; white-space: pre-line; }

/* Agreement page: documents */
.ak-docs { margin: 0; padding: 0; list-style: none; }
.ak-docs li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--ak-border-subtle); }
.ak-docs li:last-child { border-bottom: 0; }
.ak-docs__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--ak-radius-md); background: #f4f1fe; color: var(--ak-st-rented); font-size: 16px; }
.ak-docs__body { flex: 1 1 auto; min-width: 0; }
.ak-docs__name { display: block; overflow: hidden; color: var(--ak-text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ak-docs__actions { display: inline-flex; gap: 6px; }
.ak-upload { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.ak-upload__drop { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 12px; border: 1px dashed var(--ak-border-strong); border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); color: var(--ak-text-3); font-weight: 400; cursor: pointer; transition: border-color var(--ak-transition), background var(--ak-transition); }
.ak-upload__drop:hover, .ak-upload__drop:focus-within { border-color: var(--ak-accent-500); background: var(--ak-accent-50); }
.ak-upload__drop.has-file { border-style: solid; border-color: var(--ak-st-rented); background: #f8f6fe; }
.ak-upload__drop i { color: var(--ak-st-rented); font-size: 18px; }
.ak-upload__text { min-width: 0; overflow: hidden; font-size: var(--ak-text-sm); text-overflow: ellipsis; white-space: nowrap; }
.ak-upload__text strong { color: var(--ak-text); font-weight: 600; }
.ak-upload__drop input[type="file"] { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }

/* Agreement page: small history list */
.ak-mini-timeline { margin: 14px 0 0; padding: 12px 0 0 0; list-style: none; border-top: 1px solid var(--ak-border-subtle); }
.ak-mini-timeline li { position: relative; display: flex; flex-direction: column; padding: 0 0 10px 16px; font-size: var(--ak-text-sm); }
.ak-mini-timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ak-st-rented); }
.ak-mini-timeline__terminate::before, .ak-mini-timeline__delete::before { background: var(--ak-text-4) !important; }
.ak-mini-timeline span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }

/* Unit page and customer tab: current tenancy and rental history */
.ak-callout--rented { border-color: #ddd4fb; background: #f8f6fe; }
.ak-callout--rented > i { color: var(--ak-st-rented); }

.ak-tenancy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ak-tenancy div { display: flex; flex-direction: column; gap: 1px; }
.ak-tenancy span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-tenancy strong { color: var(--ak-text); font-size: var(--ak-text-sm); font-weight: 600; }
.ak-rental-history { margin: 0; padding: 0; list-style: none; }
.ak-rental-history li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--ak-border-subtle); }
.ak-rental-history li:last-child { border-bottom: 0; }
.ak-rental-history__meta { color: var(--ak-text-3); font-size: var(--ak-text-xs); }

@media (max-width: 767px) {
  .ak-rent-roll { align-items: flex-start; padding: 0; border-right: 0; }
  .ak-toolbar__note { margin-left: 0; padding-bottom: 0; }
  .ak-charges__row, .ak-upload { grid-template-columns: 1fr; }
  .ak-charges__row .btn-icon { justify-self: end; }
  .ak-rent-balance, .ak-tenancy { grid-template-columns: 1fr 1fr; }
  .ak-rent-facts { grid-template-columns: 1fr; }
  .ak-chain li { grid-template-columns: 1fr; gap: 0; }
  .ak-rental-history li { grid-template-columns: auto minmax(0, 1fr); }
  .ak-rental-history li > :last-child { grid-column: 2; }
}

/* 12h. Rent invoicing (DEV-011) --------------------------------------------------- */
/* Header figures: billed this month / outstanding */
.ak-rent-roll--due strong { color: var(--ak-warning); }
.ak-page-actions .ak-rent-roll + .ak-rent-roll { margin-left: 0; }

/* Automation strip: is the scheduled job billing for us? */
.ak-billing-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: var(--ak-space-4); padding: 12px 16px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); background: var(--ak-surface); box-shadow: var(--ak-shadow-xs); }
.ak-billing-strip__icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); color: var(--ak-text-3); }
.ak-billing-strip.is-on .ak-billing-strip__icon { background: #f4f1fe; color: var(--ak-st-rented); }
.ak-billing-strip__text { display: flex; flex: 1 1 360px; flex-direction: column; min-width: 0; font-size: var(--ak-text-sm); }
.ak-billing-strip__text strong { color: var(--ak-text); font-weight: 600; }
.ak-billing-strip__text span { color: var(--ak-text-3); }
.ak-billing-strip__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-billing-strip__actions .btn i { margin-right: 6px; }

/* Register toolbar: property, month, active tenant filter */
.ak-rent-invoices-page .ak-toolbar { grid-template-columns: minmax(220px, 320px) minmax(180px, 240px) 1fr; }
.ak-month-field { display: flex; gap: 6px; }
.ak-month-field .btn-icon { flex: 0 0 auto; width: var(--ak-control-h); height: var(--ak-control-h); }
.ak-filter-chip { display: inline-flex; align-items: center; gap: 8px; justify-self: start; align-self: end; height: var(--ak-control-h); padding: 0 12px; border: 1px solid var(--ak-accent-200); border-radius: 999px; background: var(--ak-accent-50); color: var(--ak-accent-700); font-size: var(--ak-text-sm); font-weight: 500; white-space: nowrap; }
.ak-filter-chip:hover, .ak-filter-chip:focus { border-color: var(--ak-accent-500); color: var(--ak-accent-700); text-decoration: none; }
.ak-filter-chip i { font-size: 11px; }
.table-ak-rent-invoices .ak-cell-sub i { color: var(--ak-st-rented); font-size: 10px; }
.table-ak-rent-invoices > thead > tr > th:nth-child(5), .table-ak-rent-invoices > thead > tr > th:nth-child(6),
.table-ak-rent-invoices > tbody > tr > td:nth-child(5), .table-ak-rent-invoices > tbody > tr > td:nth-child(6) { text-align: right; }
.table-ak-rent-invoices > tbody > tr > td:nth-child(5) .ak-cell-sub, .table-ak-rent-invoices > tbody > tr > td:nth-child(6) .ak-cell-sub { text-align: right; }
.table-ak-rent-invoices .ak-row-actions { opacity: .35; transition: opacity var(--ak-transition); }
.table-ak-rent-invoices tr:hover .ak-row-actions, .table-ak-rent-invoices .ak-row-actions:focus-within { opacity: 1; }
.ak-num--due { color: var(--ak-text); font-weight: 600; }
.ak-text-danger { color: var(--ak-danger) !important; }

/* Small state pills (voucher approval) and dots */
.ak-pill { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.ak-pill i { font-size: 9.5px; }
.ak-pill--warning { background: var(--ak-warning-bg); color: var(--ak-warning); }
.ak-pill--success { background: var(--ak-success-bg); color: var(--ak-success); }
.ak-pill--muted { background: var(--ak-surface-muted); color: var(--ak-text-3); }
.ak-panel__header > .ak-pill { margin-top: 0; }
.ak-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.ak-dot--warning { background: var(--ak-st-repair); box-shadow: 0 0 0 3px var(--ak-warning-bg); }

/* Billing runs log */
.ak-runs { margin: 0; padding: 0; list-style: none; }
.ak-runs__item { border-bottom: 1px solid var(--ak-border-subtle); }
.ak-runs__item:last-child { border-bottom: 0; }
.ak-runs summary { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto 18px; align-items: center; gap: 14px; padding: 12px 20px; cursor: pointer; list-style: none; }
.ak-runs summary::-webkit-details-marker { display: none; }
.ak-runs summary:hover { background: var(--ak-surface-hover); }
.ak-runs summary:focus-visible { outline: none; box-shadow: inset var(--ak-focus-ring); }
.ak-runs__when, .ak-runs__how { display: flex; flex-direction: column; min-width: 0; font-size: var(--ak-text-sm); }
.ak-runs__when strong { color: var(--ak-text); font-weight: 600; }
.ak-runs__when span, .ak-runs__how span { color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-runs__how { color: var(--ak-text-2); }
.ak-runs__counts { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ak-runs__chev { color: var(--ak-text-4); font-size: 11px; transition: transform var(--ak-transition); }
.ak-runs details[open] .ak-runs__chev { transform: rotate(180deg); }
.ak-runs__item.has-errors .ak-runs__when strong { color: var(--ak-danger); }
.ak-runs__log { margin: 0; padding: 4px 20px 14px 20px; list-style: none; }
.ak-runs__log li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 5px 0 5px 12px; border-left: 2px solid var(--ak-border); font-size: var(--ak-text-sm); color: var(--ak-text-2); }
.ak-runs__log li.is-created { border-left-color: var(--ak-success); }
.ak-runs__log li.is-skipped { border-left-color: var(--ak-st-repair); color: var(--ak-text-3); }
.ak-runs__log li.is-error { border-left-color: var(--ak-danger); color: var(--ak-danger); }

/* Generate-for-month dialog */
.ak-gen-period { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: end; margin-bottom: 16px; }
.ak-gen-period .ak-field-help { margin: 0; }
.ak-gen-preview { min-height: 80px; }
.ak-gen-preview__loading { padding: 24px 0; color: var(--ak-text-3); text-align: center; }
.ak-gen-preview .ak-callout { margin-bottom: 12px; }
.ak-gen-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--ak-accent-200); border-radius: var(--ak-radius-lg); background: var(--ak-accent-50); }
.ak-gen-summary__main { display: flex; align-items: baseline; gap: 12px; }
.ak-gen-summary__main strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-gen-summary__main .ak-num { color: var(--ak-accent-700); font-size: var(--ak-text-lg); font-weight: 600; }
.ak-gen-summary__side { display: flex; gap: 14px; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-gen-summary.is-empty { border-color: var(--ak-border); background: var(--ak-surface-muted); }
.ak-gen-table { max-height: 340px; overflow: auto; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-md); }
.ak-gen-table .table { margin: 0; }
.ak-gen-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ak-surface-muted); }
.ak-gen-table tr.is-muted td { color: var(--ak-text-3); }
.ak-gen-table .ak-person__name { display: block; color: var(--ak-text); font-weight: 500; }

/* Invoice page: received bar, edit total, next bill hint */
.ak-paybar { height: 8px; margin-bottom: 14px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-paybar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5fc28b, var(--ak-st-available)); transition: width 300ms ease; }
.ak-edit-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); }
.ak-edit-total span { color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-edit-total strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; }
.ak-next-bill { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-next-bill i { color: var(--ak-st-available); }
.ak-rent-balance small { color: var(--ak-text-3); font-size: 11.5px; }
.ak-agreement-invoices td { vertical-align: middle !important; }
.ak-bill-preview { margin: 4px 0 8px; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-md); }
.ak-bill-preview td { padding: 8px 12px !important; }

/* Settings: checkbox switch and number + unit */
.ak-check-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; cursor: pointer; }
.ak-check-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ak-check-switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--ak-border-strong); transition: background var(--ak-transition); }
.ak-check-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--ak-shadow-xs); transition: transform var(--ak-transition); }
.ak-check-switch input:checked + .ak-check-switch__track { background: var(--ak-success); }
.ak-check-switch input:checked + .ak-check-switch__track::after { transform: translateX(16px); }
.ak-check-switch input:focus-visible + .ak-check-switch__track { box-shadow: var(--ak-focus-ring); }
.ak-check-switch__label::after { content: attr(data-off); color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-check-switch input:checked ~ .ak-check-switch__label::after { content: attr(data-on); color: var(--ak-success); }
.ak-input-suffix > span { display: inline-flex; align-items: center; padding: 0 12px; margin-left: -1px; border: 1px solid var(--ak-border-strong); border-radius: 0 var(--ak-radius) var(--ak-radius) 0; background: var(--ak-surface-muted); color: var(--ak-text-3); font-size: var(--ak-text-sm); }

@media (max-width: 767px) {
  .ak-rent-invoices-page .ak-toolbar { grid-template-columns: 1fr; }
  .ak-runs summary { grid-template-columns: 1fr auto; }
  .ak-runs__counts { grid-column: 1 / -1; justify-content: flex-start; }
  .ak-runs__chev { grid-row: 1; grid-column: 2; }
  .ak-gen-period { grid-template-columns: 1fr; }
  .ak-runs__log li { grid-template-columns: 1fr; gap: 0; }
  .table-ak-rent-invoices .ak-row-actions { opacity: 1; }
}

/* 12i. Property reports (DEV-012) ------------------------------------------------- */
.ak-eyebrow a { color: inherit; }
.ak-eyebrow a:hover { color: var(--ak-accent-600); text-decoration: none; }
.ak-report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: var(--ak-space-4); border-bottom: 0; transition: opacity var(--ak-transition); }
.ak-report-filters .form-group { flex: 0 1 200px; min-width: 150px; }
.ak-report-filters.is-loading { opacity: .55; pointer-events: none; }
.ak-rf-dates[data-collapsed] { display: none; }
.ak-rf-dates { flex-basis: 300px !important; }
.ak-rf-range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ak-rf-toggle { flex: 1 1 260px !important; display: flex; align-items: center; min-height: var(--ak-control-h); }
.ak-rf-toggle .ak-check-switch { text-transform: none; letter-spacing: 0; }
.ak-rf-toggle__text { color: var(--ak-text-2); font-size: var(--ak-text-sm); font-weight: 500; }
.ak-report-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -4px 0 12px; color: var(--ak-text-3); font-size: var(--ak-text-sm); }
.ak-report-scope .ak-badge i { font-size: 10px; }
.ak-report-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ak-space-4); }
.ak-report-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Share bars (collections by property / method) */
.ak-share-list { margin: 0; padding: 6px 0; list-style: none; }
.ak-share-list li { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 1fr) auto; align-items: center; gap: 12px; padding: 8px 20px; }
.ak-share-list__label { display: flex; flex-direction: column; min-width: 0; color: var(--ak-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-share-list__label small { color: var(--ak-text-3); font-size: 11.5px; font-weight: 400; }
.ak-share-list__bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-share-list__bar i { display: block; height: 100%; border-radius: 999px; background: var(--ak-accent-500); }
.ak-share-list__bar--alt i { background: var(--ak-navy-700); }
.ak-share-list strong { color: var(--ak-text); font-weight: 600; }

/* Report tables */
.ak-report-table > tfoot > tr > td { border-top: 1px solid var(--ak-border) !important; background: var(--ak-surface-muted); color: var(--ak-text); font-weight: 600; }
.ak-report-table td { vertical-align: middle !important; }
.ak-report-table .ak-person__name { display: block; color: var(--ak-text); font-weight: 500; }
.ak-sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.ak-sortable th[data-sort]:hover { color: var(--ak-text); }
.ak-sortable th[aria-sort]::after { content: " ↑"; color: var(--ak-accent-600); }
.ak-sortable th[aria-sort="descending"]::after { content: " ↓"; }
.ak-row-reversal td { color: var(--ak-danger); background: var(--ak-danger-bg); }
.ak-row-reversal a { color: var(--ak-danger-600); }
.ak-meter { display: flex; align-items: center; gap: 10px; }
.ak-meter__bar { flex: 1 1 auto; height: 8px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-meter__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9b85ec, var(--ak-st-rented)); }
.ak-meter strong { min-width: 46px; text-align: right; color: var(--ak-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ak-legend-inline { grid-template-columns: repeat(4, max-content); gap: 16px; margin: 0; }

/* Ageing (rent outstanding) */
.ak-ageing { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-ageing__seg { height: 100%; }
.ak-ageing__seg + .ak-ageing__seg { box-shadow: -2px 0 0 var(--ak-surface); }
.ak-ageing__seg--ok, .ak-ageing__key--ok span::before { background: #8fb7f3; }
.ak-ageing__seg--warn, .ak-ageing__key--warn span::before { background: #f0c26a; }
.ak-ageing__seg--late, .ak-ageing__key--late span::before { background: #e8873a; }
.ak-ageing__seg--bad, .ak-ageing__key--bad span::before { background: var(--ak-danger); }
.ak-ageing__legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.ak-ageing__legend li { display: flex; flex-direction: column; gap: 2px; }
.ak-ageing__legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ak-text-3); font-size: var(--ak-text-xs); }
.ak-ageing__legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.ak-ageing__legend strong { color: var(--ak-text); font-size: var(--ak-text-md); font-weight: 600; text-align: left; }
.ak-age--warn { color: #9a6700 !important; font-weight: 600; }
.ak-age--late { color: #b4541a !important; font-weight: 600; }
.ak-age--bad { color: var(--ak-danger) !important; font-weight: 600; }

/* Integrity checks */
.ak-checks { margin: 0; padding: 0; list-style: none; }
.ak-checks__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: flex-start; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--ak-border-subtle); }
.ak-checks__item:last-child { border-bottom: 0; }
.ak-checks__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; }
.ak-checks__item.is-ok .ak-checks__icon { background: var(--ak-success-bg); color: var(--ak-success); }
.ak-checks__item.is-bad .ak-checks__icon { background: var(--ak-danger-bg); color: var(--ak-danger); }
.ak-checks__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ak-checks__body strong { color: var(--ak-text); font-weight: 600; }
.ak-checks__problems { margin: 8px 0 0; padding-left: 18px; color: var(--ak-text-2); font-size: var(--ak-text-sm); }

/* Print: the report alone, with a one-line heading */
.ak-report-print-head { display: none; }
@media print {
  #menu, #header, #setup-menu-wrapper, .ak-report-filters, .ak-page-actions, .ak-eyebrow, .btn, .ak-panel__hint { display: none !important; }
  #wrapper { margin: 0 !important; min-height: 0 !important; background: #fff !important; }
  #wrapper .content { padding: 0 !important; }
  body { background: #fff !important; }
  .ak-report-print-head { display: block; margin: 0 0 8px; font-size: 11px; color: #333; }
  .ak-card, .ak-stat-tile { box-shadow: none !important; break-inside: avoid; }
  .ak-report-page .ak-card { break-inside: auto; }
  .ak-report-page .table-responsive { overflow: visible !important; }
  .ak-report-page thead { display: table-header-group; }
  .ak-report-page tr { break-inside: avoid; }
  .ak-page-title { font-size: 18px; }
  .ak-hide-sm { display: table-cell !important; }
  a { color: inherit !important; text-decoration: none !important; }
}

@media (max-width: 991px) {
  .ak-report-split { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ak-report-filters .form-group { flex: 1 1 100%; }
  .ak-hide-sm { display: none; }
  .ak-ageing__legend { grid-template-columns: 1fr 1fr; }
  .ak-share-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .ak-share-list__bar { grid-column: 1 / -1; grid-row: 2; }
  .ak-checks__item { grid-template-columns: auto minmax(0, 1fr); }
  .ak-checks__item > .ak-badge { grid-column: 2; justify-self: start; }
}

/* 12j. Public website & enquiries (DEV-014) ----------------------------------- */
.ak-avatar--sm { width: 32px; height: 32px; font-size: var(--ak-text-sm); }
.ak-switch--star.is-on { background: #e08a13; }
.ak-coords { display: flex; gap: 6px; }
.ak-coords .form-control { flex: 1 1 auto; min-width: 0; }
.ak-coords .btn { flex: 0 0 auto; }
.ak-amenity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ak-amenity { position: relative; margin: 0; cursor: pointer; font-weight: 500; }
.ak-amenity input { position: absolute; opacity: 0; pointer-events: none; }
.ak-amenity span { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: var(--ak-surface); color: var(--ak-text-2); font-size: var(--ak-text-sm); transition: all var(--ak-transition); }
.ak-amenity span i { width: 16px; color: var(--ak-text-4); text-align: center; }
.ak-amenity:hover span { border-color: var(--ak-border-strong); }
.ak-amenity input:checked + span { border-color: var(--ak-accent-300); background: var(--ak-accent-50); color: var(--ak-accent-700); }
.ak-amenity input:checked + span i { color: var(--ak-accent-600); }
.ak-amenity input:focus-visible + span { box-shadow: var(--ak-focus-ring); }

.ak-web-panel .ak-panel__title .ak-badge { margin-left: 4px; font-weight: 500; }
.ak-web-panel .ak-panel__title > i { color: var(--ak-accent-600); }
.ak-web-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ak-web-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ak-text-2); font-weight: 500; cursor: pointer; }
.ak-web-panel__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 24px; }
.ak-web-sub { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ak-web-sub h3 { margin: 0; color: var(--ak-text); font-size: var(--ak-text-base); font-weight: 600; }
.ak-web-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ak-web-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); background: var(--ak-surface-muted); }
.ak-web-photo img { width: 100%; height: 100%; object-fit: cover; }
.ak-web-photo.is-cover { border-color: #e08a13; box-shadow: 0 0 0 2px rgba(224, 138, 19, 0.25); }
.ak-web-photo__cover { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: #e08a13; color: #fff; font-size: 11px; font-weight: 600; }
.ak-web-photo__actions { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: flex-end; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(11, 21, 39, 0.65)); opacity: 0; transition: opacity var(--ak-transition); }
.ak-web-photo:hover .ak-web-photo__actions, .ak-web-photo:focus-within .ak-web-photo__actions { opacity: 1; }
.ak-web-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 22px 16px; border: 2px dashed var(--ak-border-strong); border-radius: var(--ak-radius-xl); background: var(--ak-surface-muted); color: var(--ak-text-3); font-size: var(--ak-text-sm); font-weight: 400; text-align: center; cursor: pointer; transition: all var(--ak-transition); }
.ak-web-drop strong { color: var(--ak-text); font-weight: 600; }
.ak-web-drop:hover, .ak-web-drop.is-over { border-color: var(--ak-accent-500); background: var(--ak-accent-50); }
.ak-web-drop.is-busy { pointer-events: none; opacity: 0.8; }
.ak-web-drop__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px; background: var(--ak-surface); color: var(--ak-accent-600); font-size: 17px; box-shadow: var(--ak-shadow-xs); }
.ak-web-drop__progress { display: block; width: 70%; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--ak-border); }
.ak-web-drop__progress[hidden] { display: none; }
.ak-web-drop__progress span { display: block; height: 100%; background: var(--ak-accent-500); transition: width 150ms ease; }
.ak-web-side, .ak-web-photos { display: flex; flex-direction: column; gap: 16px; }
.ak-web-photos__grid { margin-bottom: 0 !important; }
.ak-web-quality { display: flex; gap: 16px; padding: 14px; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-xl); background: var(--ak-surface-muted); }
.ak-web-quality h3 { margin: 0 0 6px; color: var(--ak-text); font-size: var(--ak-text-base); font-weight: 600; }
.ak-web-ring { --score: 0; position: relative; flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(var(--ak-accent-500) calc(var(--score) * 1%), var(--ak-border) 0); }
.ak-web-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ak-surface-muted); }
.ak-web-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ak-text); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ak-web-ring small { font-size: 11px; color: var(--ak-text-3); }
.ak-web-checks { margin: 0; padding: 0; list-style: none; font-size: var(--ak-text-sm); }
.ak-web-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 7px; padding: 2px 0; color: var(--ak-text-2); }
.ak-web-checks li i { font-size: 12px; color: var(--ak-border-strong); }
.ak-web-checks li.is-done { color: var(--ak-text-3); }
.ak-web-checks li.is-done i { color: var(--ak-success); }
.ak-web-checks li small { flex-basis: 100%; padding-left: 19px; color: var(--ak-text-4); font-size: 11.5px; }
.ak-web-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ak-web-figures > * { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-lg); color: inherit; }
.ak-web-figures > a:hover { border-color: var(--ak-border-strong); text-decoration: none; box-shadow: var(--ak-shadow-sm); }
.ak-web-figures > * { align-items: flex-start; text-align: left; }
.ak-web-figures strong { color: var(--ak-text); font-size: var(--ak-text-2xl); font-weight: 600; line-height: 1.15; }
.ak-web-spark { display: flex; align-self: stretch; align-items: flex-end; gap: 2px; height: 28px; margin-top: 4px; }
.ak-web-spark span { flex: 1 1 0; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--ak-accent-500); }
.ak-web-spark span.is-zero { height: 2px !important; background: var(--ak-border); }
.ak-web-unitlist { max-height: 230px; margin: 0; padding: 0; overflow-y: auto; list-style: none; border: 1px solid var(--ak-border-subtle); border-radius: var(--ak-radius-lg); }
.ak-web-unitlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--ak-border-subtle); font-size: var(--ak-text-sm); }
.ak-web-unitlist li:first-child { border-top: 0; }
.ak-web-unitlist__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ak-web-unitlist__name strong { color: var(--ak-text); }

.ak-web-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: var(--ak-space-4); }
.ak-web-chart { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 170px auto; column-gap: 8px; }
.ak-web-chart__grid { display: flex; flex-direction: column; justify-content: space-between; color: var(--ak-text-4); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.ak-web-chart__bars { position: relative; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--ak-border); background: linear-gradient(var(--ak-border-subtle) 1px, transparent 1px) 0 0 / 100% 50%; }
.ak-web-chart__bar { position: relative; flex: 1 1 0; border-radius: 4px 4px 0 0; background: var(--ak-accent-500); outline: none; }
.ak-web-chart__bar:hover, .ak-web-chart__bar:focus { background: var(--ak-accent-700); }
.ak-web-chart__bar::before { content: ""; position: absolute; top: -170px; right: -1px; bottom: 0; left: -1px; } /* taller hit area */
.ak-web-chart__bar:hover::after, .ak-web-chart__bar:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 5; padding: 4px 8px; border-radius: var(--ak-radius); background: var(--ak-navy-900); color: #fff; font-size: 11.5px; white-space: nowrap; transform: translateX(-50%); pointer-events: none; }
.ak-web-chart__bar.is-zero { height: 0; }
.ak-web-chart__axis { grid-column: 2; display: flex; justify-content: space-between; margin-top: 6px; color: var(--ak-text-4); font-size: 11px; }
.ak-web-enqlist { margin: 0; padding: 0; list-style: none; }
.ak-web-enqlist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--ak-border-subtle); font-size: var(--ak-text-sm); }
.ak-web-enqlist li:first-child { border-top: 0; }
.ak-web-enqlist strong { color: var(--ak-text); }
.ak-web-table > tbody > tr > td { vertical-align: middle; }
.ak-web-prop { display: flex; align-items: center; gap: 12px; color: inherit; }
.ak-web-prop:hover { text-decoration: none; }
.ak-web-prop:hover strong { color: var(--ak-accent-600); }
.ak-web-prop strong { display: block; color: var(--ak-text); font-weight: 600; }
.ak-web-prop small { color: var(--ak-text-3); }
.ak-web-prop__thumb { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 56px; height: 40px; overflow: hidden; border-radius: var(--ak-radius-md); background: var(--ak-tone-bg, var(--ak-surface-muted)); color: var(--ak-tone, var(--ak-text-3)); }
.ak-web-prop__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ak-web-meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.ak-web-meter__bar { flex: 1 1 auto; height: 6px; overflow: hidden; border-radius: 999px; background: var(--ak-border-subtle); }
.ak-web-meter__bar span { display: block; height: 100%; border-radius: 999px; }
.ak-web-meter__bar .is-good { background: var(--ak-success); }
.ak-web-meter__bar .is-mid { background: var(--ak-st-repair); }
.ak-web-meter__bar .is-low { background: var(--ak-danger); }
.ak-web-meter .ak-num { width: 36px; color: var(--ak-text-2); font-size: var(--ak-text-sm); text-align: right; }

.ak-web-enq-toolbar { gap: 12px; }
.ak-web-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--ak-border); border-radius: var(--ak-radius-md); background: var(--ak-surface-muted); }
.ak-web-tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; color: var(--ak-text-3); font-weight: 500; }
.ak-web-tab span { color: var(--ak-text-4); font-size: var(--ak-text-xs); font-variant-numeric: tabular-nums; }
.ak-web-tab:hover { color: var(--ak-text); text-decoration: none; }
.ak-web-tab.is-active { background: var(--ak-surface); color: var(--ak-accent-700); box-shadow: var(--ak-shadow-xs); }
.ak-web-enq-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-web-enq-filters .form-control { width: auto; min-width: 180px; }
.ak-web-enquiries { margin: 0; padding: 0; list-style: none; }
.ak-web-enquiry { display: grid; grid-template-columns: minmax(200px, 0.8fr) minmax(0, 2fr) auto; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--ak-border-subtle); }
.ak-web-enquiry:first-child { border-top: 0; }
.ak-web-enquiry.is-new { background: linear-gradient(90deg, rgba(194, 65, 65, 0.05), transparent 40%); box-shadow: inset 3px 0 0 var(--ak-danger); }
.ak-web-enquiry.is-closed { opacity: 0.75; }
.ak-web-enquiry__who { display: flex; align-items: flex-start; gap: 12px; }
.ak-web-enquiry__who strong { color: var(--ak-text); font-size: var(--ak-text-md); }
.ak-web-enquiry__who .ak-badge { margin-left: 6px; }
.ak-web-enquiry__about { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--ak-text-2); font-weight: 500; }
.ak-web-enquiry__about > i { color: var(--ak-text-4); }
.ak-web-enquiry__msg { margin: 0 0 8px; padding: 8px 12px; border: 0; border-left: 3px solid var(--ak-accent-200); border-radius: 0 var(--ak-radius-md) var(--ak-radius-md) 0; background: var(--ak-surface-muted); color: var(--ak-text-2); font-size: var(--ak-text-sm); }
.ak-web-enquiry__note { display: flex; gap: 6px; margin: 0 0 8px; font-size: var(--ak-text-sm); }
.ak-web-enquiry__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-web-enquiry__actions .form-control { flex: 1 1 220px; width: auto; }
.ak-web-enquiry__contact { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.ak-web-pager { display: flex; align-items: center; justify-content: center; gap: 12px; border-top: 1px solid var(--ak-border-subtle); }
@media (max-width: 1199px) {
  .ak-web-panel__grid, .ak-web-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .ak-amenity-grid { grid-template-columns: 1fr 1fr; }
  .ak-web-enquiry { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .ak-web-enquiry__contact { flex-direction: row; flex-wrap: wrap; }
  .ak-web-enq-filters, .ak-web-enq-filters .form-control { width: 100%; }
  .ak-web-enqlist li { grid-template-columns: auto minmax(0, 1fr); }
  .ak-web-enqlist li .btn { grid-column: 2; justify-self: start; }
}

/* 13. Compatibility -------------------------------------------------------------
   The global utilities (.d-none, .tr_total, [data-onclick]) remain in the inline
   <style> block of application/views/admin/includes/head.php. Only the three
   purely visual table rules were removed from there (padding !important, zebra
   striping, black cell text) because this file now defines table styling. */
.btn-block,
.btn.btn-block {
  display: flex;
  width: 100%;
}

/* 14. Responsive ------------------------------------------------------------- */
@media (max-width: 1199px) {
  #wrapper .content {
    padding: 20px 24px 32px;
  }
}

@media (max-width: 991px) {
  .ak-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .ak-toolbar .ak-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  #wrapper .content {
    padding: 16px 12px 28px;
  }

  .ak-page-header {
    align-items: flex-start;
  }

  .ak-page-title {
    font-size: 20px;
    line-height: 28px;
  }

  .ak-page-actions,
  .ak-page-actions .btn {
    width: 100%;
  }

  .ak-toolbar {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .ak-card .dataTables_wrapper > .row:nth-child(2),
  .ak-card .dataTables_wrapper > .row:last-child {
    padding: 10px 12px;
  }

  .ak-card table.dataTable > thead > tr > th:first-child,
  .ak-card table.dataTable > tbody > tr > td:first-child {
    padding-left: 12px;
  }

  .ak-card table.dataTable > thead > tr > th:last-child,
  .ak-card table.dataTable > tbody > tr > td:last-child {
    padding-right: 12px;
  }

  .ak-coa .table-accounts > tbody > tr > td:nth-child(1) {
    min-width: 240px;
  }

  /* Perfex absolutely positions the length menu on phones; keep it in flow inside cards. */
  .ak-card div.dataTables_wrapper div.dataTables_length {
    position: static;
  }

  .ak-card div.dt-buttons {
    float: none;
  }

  .ak-card .dataTables_wrapper .dataTables_paging {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ak-card .table-responsive {
    padding: 0;
  }
}
