:root {
  --kcp-primary: #2b63d9;
  --kcp-primary-dark: #2157c8;
  --kcp-primary-deep: #102349;
  --kcp-primary-soft: #eef4ff;
  --kcp-primary-softer: #f6f9ff;

  --kcp-success: #2f7a55;
  --kcp-success-dark: #276648;
  --kcp-success-soft: #edf8f1;

  --kcp-warning: #b56a12;
  --kcp-warning-dark: #9a5a0d;
  --kcp-warning-soft: #fff8ec;

  --kcp-danger: #c2473f;
  --kcp-danger-dark: #a73b34;
  --kcp-danger-soft: #fff3f2;

  --kcp-info: #2b63d9;
  --kcp-info-soft: #eef4ff;

  --kcp-bg: #f4f7fb;
  --kcp-bg-soft: #edf3f9;
  --kcp-bg-deep: #e8eef5;

  --kcp-surface: #ffffff;
  --kcp-surface-soft: #f8fbff;
  --kcp-surface-muted: #f5f8fc;

  --kcp-border: #dbe4ee;
  --kcp-border-strong: #c9d6e5;
  --kcp-border-soft: #e8eef5;

  --kcp-text: #172338;
  --kcp-text-muted: #6a7b90;
  --kcp-text-soft: #93a1b2;

  --kcp-shadow-xs: 0 4px 12px rgba(15, 23, 42, 0.035);
  --kcp-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.05);
  --kcp-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  --kcp-shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.12);

  --kcp-radius-sm: 0.8rem;
  --kcp-radius: 1rem;
  --kcp-radius-lg: 1.3rem;
  --kcp-radius-xl: 1.75rem;

  --kcp-page-speed: 180ms;

  --kcp-container: 1380px;
  --kcp-container-narrow: 860px;

  --kcp-font-sans: "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --kcp-font-ui: var(--kcp-font-sans);
}

/* =========================================================
   BASE
========================================================= */

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body,
.kcp-body {
  min-height: 100%;
  margin: 0;
  font-family: var(--kcp-font-ui);
  background:
    radial-gradient(circle at top left, rgba(43, 99, 217, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(16, 35, 73, 0.05), transparent 18%),
    linear-gradient(180deg, #f7f9fc 0%, #edf3f9 100%);
  color: var(--kcp-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(43, 99, 217, 0.18);
  color: var(--kcp-text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

img {
  max-width: 100%;
  image-rendering: auto;
}

a,
button,
input,
select,
textarea {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

input,
button,
select,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(43, 99, 217, 0.14);
}

.hidden {
  display: none !important;
}

/* =========================================================
   APP SHELL
========================================================= */

.page-shell,
.kcp-app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(43, 99, 217, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(47, 122, 85, 0.05), transparent 22%);
  z-index: -1;
}

.page-content {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--kcp-page-speed) ease, transform var(--kcp-page-speed) ease;
}

html.is-transitioning .page-content {
  opacity: 0;
  transform: translateY(8px);
}

.kcp-app-main {
  flex: 1;
  padding: 1.5rem 0 2rem;
}

.kcp-app-main__inner,
.kcp-container {
  width: 100%;
  max-width: var(--kcp-container);
  margin: 0 auto;
  padding: 0 1rem;
}

.kcp-container-narrow {
  width: 100%;
  max-width: var(--kcp-container-narrow);
  margin: 0 auto;
  padding: 0 1rem;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

.kcp-page-title {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--kcp-primary-deep);
}

.kcp-page-subtitle {
  margin: 0.45rem 0 0;
  max-width: 60rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--kcp-text-muted);
}

.kcp-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--kcp-text);
}

.kcp-section-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--kcp-text-muted);
}

.kcp-muted {
  color: var(--kcp-text-muted);
}

.kcp-text-soft {
  color: var(--kcp-text-soft);
}

/* =========================================================
   CARDS / SECTIONS
========================================================= */

.kcp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kcp-page-header__content {
  min-width: 0;
}

.kcp-page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kcp-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(248,251,255,0.95) 100%);
  border: 1px solid rgba(219, 228, 238, 0.96);
  border-radius: var(--kcp-radius-lg);
  box-shadow: var(--kcp-shadow);
}

.kcp-card-soft {
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
  border: 1px solid rgba(219, 228, 238, 0.94);
  border-radius: var(--kcp-radius);
  box-shadow: var(--kcp-shadow-xs);
}

.kcp-card-flat {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 228, 238, 0.94);
  border-radius: var(--kcp-radius);
  box-shadow: var(--kcp-shadow-xs);
}

.kcp-section {
  padding: 1.25rem;
}

.kcp-section + .kcp-section {
  border-top: 1px solid var(--kcp-border);
}

.kcp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.2rem 0;
}

.kcp-card-body {
  padding: 1.2rem;
}

.kcp-card-footer {
  padding: 0 1.2rem 1.2rem;
}

.kcp-brand-gradient {
  background: linear-gradient(135deg, var(--kcp-primary-deep), var(--kcp-primary));
  color: #ffffff;
}

/* =========================================================
   BUTTONS
========================================================= */

.kcp-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0.95rem;
  min-height: 42px;
  padding: 0.7rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.kcp-btn:hover {
  transform: translateY(-1px);
}

.kcp-btn:active {
  transform: translateY(0);
}

.kcp-btn:disabled,
.kcp-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.kcp-btn-primary {
  background: linear-gradient(135deg, #2b63d9 0%, #2157c8 100%);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 14px 28px rgba(43, 99, 217, 0.18);
}

.kcp-btn-primary:hover {
  background: linear-gradient(135deg, #336be2 0%, #255dcf 100%);
}

.kcp-btn-secondary {
  background: #f6f8fb;
  color: #34455e;
  border-color: #becddd;
  box-shadow: none;
}

.kcp-btn-secondary:hover {
  background: #ffffff;
  border-color: #aebfd2;
  color: #24364f;
}

.kcp-btn-accent {
  background: #dfe8f4;
  color: #1e2d46;
  border: 1px solid #d3deeb;
}

.kcp-btn-accent:hover {
  background: #d5e0ee;
  color: #16253d;
}

.kcp-btn-success {
  background: #2b63d9;
  color: #ffffff;
  border-color: #2b63d9;
  box-shadow: none;
}

.kcp-btn-success:hover {
  background: #2157c8;
  border-color: #2157c8;
}

.kcp-btn-ghost {
  background: transparent;
  color: #355b9f;
}

.kcp-btn-ghost:hover {
  background: #eaf1fb;
  color: #244b88;
}

.kcp-btn-danger {
  background: var(--kcp-danger);
  color: #ffffff;
}

.kcp-btn-danger:hover {
  background: var(--kcp-danger-dark);
}

.kcp-btn-sm {
  min-height: 36px;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  border-radius: 0.75rem;
}

.kcp-btn-lg {
  min-height: 48px;
  padding: 0.8rem 1.15rem;
  font-size: 1rem;
}

/* =========================================================
   BADGES / ALERTS
========================================================= */

.kcp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.kcp-badge-neutral {
  background: #edf2f7;
  color: #51627c;
  border-color: #d8e1eb;
}

.kcp-badge-primary {
  background: #e8effd;
  color: #193a72;
  border-color: #cfdbf2;
}

.kcp-badge-success {
  background: #e7f4ec;
  color: #2f7a55;
  border-color: #c7e4d4;
}

.kcp-badge-warning {
  background: #fff6e8;
  color: #b56a12;
  border-color: #f0dfb6;
}

.kcp-badge-danger {
  background: #fff0ee;
  color: #c2473f;
  border-color: #f2ccc9;
}

.kcp-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
}

.kcp-alert-info {
  background: #eef4ff;
  color: #315991;
  border-color: #d3e1f6;
}

.kcp-alert-success {
  background: #edf8f1;
  color: #2f7a55;
  border-color: #cee7d8;
}

.kcp-alert-warning {
  background: #fff8ec;
  color: #b56a12;
  border-color: #eeddb4;
}

.kcp-alert-danger {
  background: #fff3f2;
  color: #b8453f;
  border-color: #efcdca;
}

/* =========================================================
   FORMS
========================================================= */

.kcp-form {
  display: grid;
  gap: 1rem;
}

.kcp-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.kcp-col-12 { grid-column: span 12; }
.kcp-col-8 { grid-column: span 12; }
.kcp-col-6 { grid-column: span 12; }
.kcp-col-4 { grid-column: span 12; }
.kcp-col-3 { grid-column: span 12; }

.kcp-field {
  display: grid;
  gap: 0.45rem;
}

.kcp-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--kcp-text);
}

.kcp-label__hint {
  color: var(--kcp-text-muted);
  font-weight: 500;
}

.kcp-help {
  font-size: 0.82rem;
  color: var(--kcp-text-muted);
}

.kcp-error {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--kcp-danger);
}

.kcp-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c9d6e5;
  border-radius: 0.85rem;
  background: #fbfcfe;
  color: var(--kcp-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  font-size: 0.95rem;
}

input[type="file"] {
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  background: #ffffff;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  margin-right: 0.85rem;
  border: 0;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--kcp-primary-deep) 0%, var(--kcp-primary) 100%);
  color: #ffffff;
  padding: 0.72rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(43, 99, 217, 0.16);
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #10224a 0%, #336be2 100%);
  box-shadow: 0 14px 26px rgba(43, 99, 217, 0.22);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--kcp-primary) !important;
  box-shadow: 0 0 0 4px rgba(43, 99, 217, 0.10) !important;
}

.kcp-input--error,
.kcp-input.is-invalid {
  border-color: rgba(194, 71, 63, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(194, 71, 63, 0.08) !important;
}

.kcp-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

/* =========================================================
   SELECTS / DATE PICKERS
========================================================= */

.kcp-select,
select,
select.kcp-input {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 2.9rem 0.75rem 0.9rem;
  border: 1px solid #c9d6e5;
  border-radius: 0.85rem;
  background-color: #fbfcfe;
  color: var(--kcp-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  font-size: 0.95rem;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--kcp-text-muted) 50%),
    linear-gradient(135deg, var(--kcp-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) calc(50% - 0.1rem),
    calc(100% - 0.8rem) calc(50% - 0.1rem);
  background-size: 0.42rem 0.42rem, 0.42rem 0.42rem;
  background-repeat: no-repeat;
}

.kcp-select:hover,
select:hover,
select.kcp-input:hover {
  border-color: var(--kcp-border-strong);
  background-color: #ffffff;
}

.kcp-select:disabled,
select:disabled,
select.kcp-input:disabled {
  background-color: #f8fafc;
  color: var(--kcp-text-soft);
  cursor: not-allowed;
  opacity: 1;
}

select option {
  color: var(--kcp-text);
  background: #ffffff;
}

select option[disabled] {
  color: var(--kcp-text-soft);
}

.kcp-date-input,
.kcp-date-range-input,
.kcp-month-input {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c9d6e5;
  border-radius: 0.85rem;
  background: #fbfcfe;
  color: var(--kcp-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  font-size: 0.95rem;
}

.kcp-date-input:focus,
.kcp-date-range-input:focus,
.kcp-month-input:focus {
  border-color: var(--kcp-primary) !important;
  box-shadow: 0 0 0 4px rgba(43, 99, 217, 0.10) !important;
  outline: none;
}

/* Tom Select / Slim Select */
.ts-wrapper,
.ss-main {
  min-height: 44px;
  border: 1px solid #c9d6e5 !important;
  border-radius: 0.85rem !important;
  background: #fbfcfe !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  font-size: 0.95rem;
}

.ts-wrapper.focus,
.ss-main:focus,
.ss-main.ss-focus {
  border-color: var(--kcp-primary) !important;
  box-shadow: 0 0 0 4px rgba(43, 99, 217, 0.10) !important;
}

.ts-control,
.ss-main .ss-values {
  min-height: 44px;
  padding: 0.45rem 0.9rem !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ts-control input {
  font-size: 0.95rem !important;
}

.ts-dropdown,
.ss-content {
  border: 1px solid rgba(219, 228, 238, 0.96) !important;
  border-radius: 1rem !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.99) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12) !important;
}

.ts-dropdown .option,
.ss-option {
  padding: 0.8rem 0.95rem !important;
  font-size: 0.92rem !important;
  color: var(--kcp-text) !important;
}

.ts-dropdown .active,
.ts-dropdown .option:hover,
.ss-option:hover,
.ss-option.ss-highlighted {
  background: #eef4ff !important;
  color: var(--kcp-primary-deep) !important;
}

.ts-dropdown .selected,
.ss-option.ss-selected {
  background: rgba(43, 99, 217, 0.10) !important;
  color: var(--kcp-primary-deep) !important;
  font-weight: 700;
}

.ts-dropdown .no-results {
  padding: 0.8rem 0.95rem;
  color: var(--kcp-text-muted);
  font-size: 0.9rem;
}

.ss-search input {
  border: 1px solid #dbe3ee !important;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
  padding: 0.7rem 0.85rem !important;
}

/* Flatpickr */
.flatpickr-calendar {
  border: 1px solid rgba(219, 228, 238, 0.96);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  font-family: var(--kcp-font-ui);
  background: rgba(255, 255, 255, 0.99);
}

.flatpickr-months {
  background: linear-gradient(135deg, var(--kcp-primary-deep), var(--kcp-primary));
  padding: 0.2rem 0;
}

.flatpickr-current-month {
  padding-top: 0.4rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #ffffff !important;
  font-weight: 700;
}

.flatpickr-monthDropdown-months {
  background: transparent !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  fill: #ffffff !important;
  color: #ffffff !important;
}

.flatpickr-weekdays {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

span.flatpickr-weekday {
  color: var(--kcp-text-muted) !important;
  font-weight: 700;
  font-size: 0.78rem;
}

.flatpickr-days {
  padding: 0.45rem;
}

.flatpickr-day {
  border-radius: 0.75rem;
  color: var(--kcp-text);
  border: 1px solid transparent;
  max-width: 38px;
  height: 38px;
  line-height: 38px;
}

.flatpickr-day:hover {
  background: #eef4ff;
  border-color: #eef4ff;
}

.flatpickr-day.today {
  border-color: var(--kcp-primary);
  color: var(--kcp-primary-deep);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: linear-gradient(135deg, var(--kcp-primary), var(--kcp-primary-dark));
  border-color: var(--kcp-primary);
  color: #ffffff;
}

.flatpickr-day.inRange {
  background: rgba(43, 99, 217, 0.10);
  border-color: rgba(43, 99, 217, 0.02);
  box-shadow: none;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #cbd5e1 !important;
  background: transparent;
}

/* =========================================================
   TABLES
========================================================= */

.kcp-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9e2ec;
  border-radius: 1rem;
  background: #f8fafd;
}

.kcp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.kcp-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eaf0f6;
  color: #213553;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #d2dce7;
}

.kcp-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #e2e9f0;
  vertical-align: middle;
  color: #24364d;
  background: rgba(255,255,255,0.82);
  font-size: 0.92rem;
}

.kcp-table tbody tr:hover td {
  background: #f6f9fc;
}

.kcp-table tbody tr:last-child td {
  border-bottom: 0;
}

.kcp-table__number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kcp-table__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kcp-table--wide {
  min-width: 720px;
}

.kcp-legacy-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--kcp-border);
  border-radius: var(--kcp-radius-lg);
  box-shadow: var(--kcp-shadow-sm);
}

.kcp-legacy-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--kcp-border);
  border-radius: 1rem;
  background: #ffffff;
}

.kcp-legacy-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  min-width: 0;
  font-size: 0.92rem;
}

.kcp-legacy-table thead th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--kcp-border);
  white-space: nowrap;
}

.kcp-legacy-table tbody td {
  padding: 0.9rem 0.95rem;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
  background: #ffffff;
  font-size: 0.92rem;
}

.kcp-legacy-table tbody tr:last-child td {
  border-bottom: 0;
}

.kcp-legacy-table tbody tr:hover td {
  background: #fbfdff;
}

.kcp-legacy-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.kcp-legacy-form {
  display: grid;
  gap: 1rem;
}

.kcp-legacy-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* =========================================================
   LISTS / EMPTY STATES / MENUS
========================================================= */

.kcp-list {
  display: grid;
  gap: 0.85rem;
}

.kcp-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--kcp-border);
  border-radius: 1rem;
  background: #ffffff;
}

.kcp-empty-state {
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--kcp-border-strong);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
}

.kcp-empty-state__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--kcp-text);
}

.kcp-empty-state__text {
  margin: 0.5rem auto 0;
  max-width: 36rem;
  font-size: 0.92rem;
  color: var(--kcp-text-muted);
}

.kcp-empty-state__actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kcp-menu {
  min-width: 220px;
  padding: 0.45rem;
  border: 1px solid var(--kcp-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--kcp-shadow-lg);
}

.kcp-menu__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 40px;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--kcp-text);
  text-align: left;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.kcp-menu__item:hover {
  background: #f8fafc;
}

.kcp-menu__item--danger {
  color: var(--kcp-danger);
}

/* =========================================================
   TABS
========================================================= */

.kcp-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid var(--kcp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--kcp-shadow-xs);
}

.kcp-tab {
  border: 0;
  background: transparent;
  color: var(--kcp-text-muted);
  min-height: 38px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.kcp-tab.is-active {
  background: var(--kcp-primary);
  color: #ffffff;
}

/* =========================================================
   MODALS / DRAWERS
========================================================= */

.kcp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  z-index: 80;
}

.kcp-modal {
  width: min(100%, 680px);
  border: 1px solid var(--kcp-border);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: var(--kcp-shadow-lg);
}

.kcp-drawer {
  width: min(100%, 440px);
  height: 100%;
  border-left: 1px solid var(--kcp-border);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: var(--kcp-shadow-lg);
}

/* =========================================================
   AUTH
========================================================= */

.kcp-auth-shell {
  background: linear-gradient(135deg, var(--kcp-primary-deep) 0%, #0c365a 52%, var(--kcp-primary) 100%);
}

.kcp-auth-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 26px 60px rgba(2, 12, 27, 0.24);
  border-radius: 1.5rem;
}

/* =========================================================
   LOADERS
========================================================= */

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
  background: rgba(43, 99, 217, 0.10);
  box-shadow: 0 1px 8px rgba(43, 99, 217, 0.18);
}

.page-progress.hidden {
  display: none;
}

.page-progress::before {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--kcp-primary-deep) 0%, var(--kcp-primary) 55%, #79a4f0 100%);
  transform: translateX(-120%);
}

.page-progress.is-animating::before {
  animation: kcp-page-progress-slide 1s ease-in-out infinite;
}

@keyframes kcp-page-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.global-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.global-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 48, 0.20);
  backdrop-filter: blur(2px);
}

.global-loader__content {
  position: relative;
  z-index: 1;
  min-width: 168px;
  padding: 18px 22px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(219, 227, 238, 0.95);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.global-loader__spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(43, 99, 217, 0.16);
  border-top-color: var(--kcp-primary);
  border-right-color: var(--kcp-primary-deep);
  animation: kcp-global-loader-spin 0.8s linear infinite;
}

.global-loader__text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--kcp-primary-deep);
  letter-spacing: 0.01em;
}

@keyframes kcp-global-loader-spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   UTILS
========================================================= */

.kcp-divider {
  height: 1px;
  background: var(--kcp-border);
  border: 0;
}

.kcp-stack {
  display: grid;
  gap: 1rem;
}

.kcp-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kcp-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.kcp-right {
  display: flex;
  justify-content: flex-end;
}

.kcp-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kcp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[data-nav-link].is-active,
a[data-nav-link].is-active {
  color: var(--kcp-primary) !important;
}

/* =========================================================
   ALERT STACK
========================================================= */

.app-alert-stack {
  position: sticky;
  top: 1rem;
  z-index: 1200;
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.app-alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--kcp-shadow-sm);
}

.app-alert-close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  padding: 0.1rem 0.2rem;
  flex-shrink: 0;
}

.app-alert-close:hover {
  opacity: 1;
}

/* =========================================================
   TOP NAV - AGIZA ONE WHITE VERSION
========================================================= */

.kcp-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.kcp-topbar__inner {
  width: 100%;
  max-width: 1180px !important;
  min-height: 70px;
  margin: 0 auto;
  padding: 0 22px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.kcp-topbar__left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.kcp-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kcp-brandmark {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.kcp-brandmark__logo {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #061f33 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 900 !important;
  letter-spacing: -0.03em;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18) !important;
  flex-shrink: 0;
}

.kcp-brandmark__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.kcp-brandmark__title {
  color: #111827 !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcp-brandmark__subtitle {
  margin-top: 3px;
  color: #64748b !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcp-topbar__nav {
  display: none;
  align-items: center;
  gap: 2rem;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.kcp-topbar__link {
  position: relative;
  min-height: 70px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  font-size: 0.92rem !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: none !important;
}

.kcp-topbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17px;
  height: 2px;
  border-radius: 999px;
  background: #1d4ed8;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.kcp-topbar__link:hover,
.kcp-topbar__link.is-active,
[data-nav-link].is-active,
a[data-nav-link].is-active {
  color: #1d4ed8 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.kcp-topbar__link:hover::after,
.kcp-topbar__link.is-active::after {
  transform: scaleX(1);
}

.kcp-topbar .kcp-btn-secondary {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

.kcp-topbar .kcp-btn-secondary:hover {
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  background: #ffffff !important;
}

.kcp-topbar .kcp-btn-primary {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.2) !important;
}

.kcp-topbar .kcp-btn-primary:hover {
  background: #1e40af !important;
  border-color: #1e40af !important;
}

/* User menu */
.kcp-user-menu {
  position: relative;
}

.kcp-user-menu__button {
  min-height: 44px !important;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: 14px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  color: var(--kcp-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
  cursor: pointer;
}

.kcp-user-menu__button:hover {
  background: #ffffff !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07) !important;
}

.kcp-user-menu__avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #061f33 0%, #1d4ed8 100%) !important;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(43, 99, 217, 0.18);
}

.kcp-user-menu__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.kcp-user-menu__name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--kcp-text);
}

.kcp-user-menu__role {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--kcp-text-muted);
}

.kcp-user-menu__chevron {
  font-size: 0.9rem;
  color: var(--kcp-text-soft);
}

.kcp-user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  width: 18rem;
  overflow: hidden;
  border-radius: 18px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16) !important;
  z-index: 1100;
}

.kcp-user-menu__panel-head {
  padding: 1rem 1rem 0.9rem;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb;
}

.kcp-user-menu__panel-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kcp-text-soft);
}

.kcp-user-menu__panel-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #111827;
}

.kcp-user-menu__panel-email {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--kcp-text-muted);
  word-break: break-word;
}

.kcp-user-menu__panel-links {
  display: flex;
  flex-direction: column;
  padding: 0.45rem;
}

.kcp-user-menu__panel-links a {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827 !important;
  background: #ffffff !important;
}

.kcp-user-menu__panel-links a:hover {
  background: #ffffff !important;
  color: #1d4ed8 !important;
}

.kcp-user-menu__panel-footer {
  padding: 0.45rem;
  border-top: 1px solid #e5e7eb;
  background: #ffffff !important;
}

.kcp-user-menu__logout {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 0.9rem;
  text-align: left;
  background: transparent;
  color: var(--kcp-danger);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.kcp-user-menu__logout:hover {
  background: #fff2f1;
}

/* =========================================================
   DASHBOARD
========================================================= */

.kcp-dashboard-shell {
  display: grid;
  gap: 1.5rem;
}

.kcp-dashboard-trial {
  border: 1px solid #cbe8e4;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #f3fcfd 0%, #f7fdf9 100%);
  box-shadow: var(--kcp-shadow-sm);
}

.kcp-dashboard-trial__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.4rem;
}

.kcp-dashboard-trial__copy {
  min-width: 0;
  flex: 1;
}

.kcp-dashboard-trial__eyebrow {
  margin-bottom: 0.5rem;
}

.kcp-dashboard-trial__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--kcp-primary-deep);
  letter-spacing: -0.02em;
}

.kcp-dashboard-trial__text {
  margin: 0.45rem 0 0;
  max-width: 52rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #35506d;
}

.kcp-dashboard-trial__text strong {
  color: var(--kcp-text);
}

.kcp-dashboard-trial__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kcp-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.95fr);
  gap: 1.25rem;
  align-items: stretch;
}

.kcp-dashboard-hero__content,
.kcp-dashboard-hero__panel {
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--kcp-shadow);
}

.kcp-dashboard-hero__content {
  padding: 1.65rem;
  background:
    radial-gradient(circle at top right, rgba(43, 99, 217, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.kcp-dashboard-hero__panel {
  padding: 1.2rem;
}

.kcp-dashboard-hero__eyebrow {
  margin-bottom: 0.7rem;
}

.kcp-dashboard-filterbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.kcp-dashboard-filterbar__field {
  display: grid;
  gap: 0.45rem;
}

.kcp-dashboard-filterbar__label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--kcp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kcp-dashboard-filterbar__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kcp-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.kcp-stat-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.kcp-stat-card {
  background: linear-gradient(180deg, rgba(249,251,253,0.98) 0%, rgba(242,246,251,0.96) 100%);
  border: 1px solid rgba(219, 228, 238, 0.96);
  border-radius: 1.25rem;
  box-shadow: var(--kcp-shadow-sm);
  padding: 1.05rem 1.1rem;
  min-width: 0;
}

.kcp-stat-card__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #5c6d86;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kcp-stat-card__value {
  margin: 0.35rem 0 0;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--kcp-text);
  letter-spacing: -0.02em;
}

.kcp-stat-card__meta {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--kcp-text-muted);
}

.kcp-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.kcp-dashboard-main,
.kcp-dashboard-side {
  min-width: 0;
}

.kcp-dashboard-count {
  font-size: 0.92rem;
  color: var(--kcp-text-muted);
}

.kcp-dashboard-count strong {
  color: var(--kcp-text);
}

.kcp-dashboard-workspaces {
  display: grid;
  gap: 1rem;
}

.kcp-dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.2rem;
  padding: 1.2rem;
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 1.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--kcp-shadow-xs);
}

.kcp-dashboard-workspace__content {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.kcp-dashboard-workspace__identity {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.kcp-dashboard-workspace__logo {
  width: 3.65rem;
  height: 3.65rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--kcp-border);
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: var(--kcp-shadow-xs);
}

.kcp-dashboard-workspace__logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kcp-dashboard-workspace__logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--kcp-primary-deep), var(--kcp-primary));
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

.kcp-dashboard-workspace__header {
  min-width: 0;
  flex: 1;
}

.kcp-dashboard-workspace__badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kcp-dashboard-workspace__name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--kcp-primary-deep);
  letter-spacing: -0.02em;
}

.kcp-dashboard-workspace__note {
  margin: 0.45rem 0 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--kcp-text-muted);
}

.kcp-dashboard-workspace__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.kcp-dashboard-workspace__meta-item {
  display: grid;
  gap: 0.22rem;
}

.kcp-dashboard-workspace__meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kcp-text-soft);
  font-weight: 800;
}

.kcp-dashboard-workspace__meta-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--kcp-text);
}

.kcp-dashboard-workspace__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.kcp-dashboard-workspace__stat {
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #f9fbff 0%, #f4f8fc 100%);
  border: 1px solid rgba(219, 228, 238, 0.92);
}

.kcp-dashboard-workspace__stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.kcp-dashboard-workspace__stat-label {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kcp-text-soft);
  font-weight: 800;
}

.kcp-dashboard-workspace__stat-value {
  margin: 0.35rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--kcp-text);
  letter-spacing: -0.02em;
}

.kcp-dashboard-workspace__stat-value.is-danger {
  color: var(--kcp-danger);
}

.kcp-dashboard-workspace__progress {
  margin-top: 0.7rem;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.kcp-dashboard-workspace__progress-bar {
  height: 100%;
  border-radius: 999px;
}

.kcp-dashboard-workspace__progress-bar.is-good {
  background: #10b981;
}

.kcp-dashboard-workspace__progress-bar.is-warning {
  background: #f59e0b;
}

.kcp-dashboard-workspace__progress-bar.is-danger {
  background: #ef4444;
}

.kcp-dashboard-workspace__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: flex-start;
}

.kcp-dashboard-workspace__actions .kcp-btn {
  justify-content: center;
}

.kcp-dashboard-empty-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kcp-surface-soft);
  color: var(--kcp-text-muted);
  font-size: 1rem;
  font-weight: 800;
}

.kcp-dashboard-side__alert-link {
  text-decoration: none;
}

.kcp-dashboard-side__alert-title {
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.kcp-dashboard-side__alert-text {
  font-size: 0.9rem;
}

.kcp-dashboard-side__invoice {
  min-width: 0;
}

.kcp-dashboard-side__invoice-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kcp-text);
}

.kcp-dashboard-side__invoice-amount {
  margin-top: 0.55rem;
  font-weight: 800;
  color: var(--kcp-text);
}

.kcp-dashboard-side__small-title {
  font-size: 0.95rem;
}

.kcp-dashboard-side__timestamp {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--kcp-text-muted);
}

.kcp-dashboard-side__shortcut {
  justify-content: flex-start;
}

/* =========================================================
   BOOKKEEPING SIDEBAR - RESTORED AND SAFE
========================================================= */

.kcp-books-sidebar {
  width: 18rem !important;
  min-width: 18rem !important;
  flex: 0 0 18rem !important;
  display: flex !important;
  flex-direction: column !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.09), transparent 20%),
    linear-gradient(180deg, #081a34 0%, #0c365a 54%, #2b63d9 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04) !important;
  overflow-y: auto !important;
}

.kcp-books-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.2rem 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.kcp-books-sidebar__brand-mark {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  color: var(--kcp-primary-deep);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  flex-shrink: 0;
}

.kcp-books-sidebar__brand-copy {
  min-width: 0;
}

.kcp-books-sidebar__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.kcp-books-sidebar__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcp-books-sidebar__action {
  padding: 1rem 1rem 0.8rem;
}

.kcp-books-sidebar__cta {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  background: rgba(255,255,255,0.96);
  color: var(--kcp-primary-deep);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.kcp-books-sidebar__cta:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.kcp-books-sidebar__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kcp-books-sidebar__nav {
  padding: 0 0.75rem 1rem !important;
  display: grid !important;
  gap: 0.35rem !important;
  overflow-y: auto;
}

.kcp-books-sidebar__link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  min-height: 46px !important;
  padding: 0.8rem 0.95rem !important;
  border-radius: 1rem !important;
  text-decoration: none !important;
  color: rgba(255,255,255,0.84) !important;
  background: transparent !important;
}

.kcp-books-sidebar__link:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}

.kcp-books-sidebar__link.is-active {
  background: rgba(255,255,255,0.98) !important;
  color: var(--kcp-primary-deep) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}

.kcp-books-sidebar__link-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kcp-books-sidebar__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kcp-books-sidebar__link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
  font-weight: 700;
}

.kcp-books-sidebar__link-chevron {
  font-size: 0.8rem;
  opacity: 0.65;
}

.kcp-books-sidebar__footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 1rem;
}

.kcp-books-sidebar__metric,
.kcp-books-sidebar__summary {
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.kcp-books-sidebar__metric {
  background: rgba(255,255,255,0.1);
}

.kcp-books-sidebar__summary {
  background: rgba(255,255,255,0.06);
  display: grid;
  gap: 0.75rem;
}

.kcp-books-sidebar__metric-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
}

.kcp-books-sidebar__metric-value {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 800;
  color: #ffffff;
}

.kcp-books-sidebar__metric-note {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
}

.kcp-books-sidebar__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.kcp-books-sidebar__summary-label {
  color: rgba(255,255,255,0.72);
}

.kcp-books-sidebar__summary-value {
  font-weight: 700;
  color: #ffffff;
}

/* =========================================================
   BUSINESS PROFILE TOOLBAR
========================================================= */

.bp-toolbar {
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(219, 228, 238, 0.94);
  border-radius: 1rem;
  box-shadow: var(--kcp-shadow-xs);
}

.bp-toolbar__group--inline {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.bp-toolbar__labelbox {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.bp-toolbar__label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--kcp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bp-toolbar__filter-form--inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.bp-toolbar__select {
  width: 210px;
  min-width: 210px;
}

.bp-toolbar__custom-range--inline {
  display: none;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.bp-toolbar__custom-range--inline.is-visible {
  display: flex;
}

.bp-toolbar__date {
  width: 160px;
  min-width: 160px;
}

.bp-toolbar__apply {
  min-width: 88px;
  flex: 0 0 auto;
}

/* =========================================================
   AGIZA ONE WHITE FOOTER
========================================================= */

.agiza-footer-mini {
  margin-top: 3rem;
  background: #ffffff;
  color: #111827;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.03);
}

.agiza-footer-mini__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.agiza-footer-mini__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #e5e7eb;
}

.agiza-footer-mini__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #111827;
  text-decoration: none;
  min-width: 0;
}

.agiza-footer-mini__logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #061f33 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}

.agiza-footer-mini__brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agiza-footer-mini__title {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.agiza-footer-mini__subtitle {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 600;
}

.agiza-footer-mini__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.agiza-footer-mini__links a {
  color: #111827;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
  transition: color 160ms ease;
}

.agiza-footer-mini__links a:hover {
  color: #1d4ed8;
}

.agiza-footer-mini__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
}

.agiza-footer-mini__bottom p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 640px) {
  .kcp-app-main {
    padding: 1.75rem 0 2.5rem;
  }

  .kcp-app-main__inner {
    padding: 0 1.25rem;
  }

  .kcp-col-6 { grid-column: span 6; }
  .kcp-col-4 { grid-column: span 4; }
  .kcp-col-3 { grid-column: span 3; }
}

@media (min-width: 960px) {
  .kcp-topbar__nav {
    display: flex !important;
  }
}

@media (min-width: 1024px) {
  .kcp-app-main {
    padding: 2rem 0 3rem;
  }

  .kcp-app-main__inner {
    padding: 0 1.5rem;
  }

  .kcp-col-8 { grid-column: span 8; }
  .kcp-col-6 { grid-column: span 6; }
  .kcp-col-4 { grid-column: span 4; }
  .kcp-col-3 { grid-column: span 3; }
}

@media (max-width: 1279px) {
  .kcp-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .kcp-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .kcp-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kcp-dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .kcp-dashboard-workspace__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kcp-dashboard-trial__content {
    flex-direction: column;
  }

  .bp-toolbar__group--inline {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .bp-toolbar__filter-form--inline {
    flex-wrap: wrap;
  }
}

@media (max-width: 959px) {
  .kcp-topbar__nav {
    display: none !important;
  }

  .kcp-brandmark__subtitle {
    display: none !important;
  }

  .kcp-topbar__inner {
    min-height: 62px;
    padding: 0 14px !important;
  }
}

@media (max-width: 900px) {
  .kcp-books-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    flex-basis: auto !important;
  }
}

@media (max-width: 768px) {
  .agiza-footer-mini__top,
  .agiza-footer-mini__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .agiza-footer-mini__links {
    justify-content: flex-start;
    gap: 1rem 1.25rem;
  }
}

@media (max-width: 767px) {
  .kcp-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .kcp-page-header__actions,
  .kcp-form-actions {
    justify-content: stretch;
  }

  .kcp-page-header__actions > *,
  .kcp-form-actions > * {
    width: 100%;
  }

  .kcp-table {
    min-width: 640px;
  }

  .kcp-dashboard-filterbar {
    grid-template-columns: 1fr;
  }

  .kcp-dashboard-stats {
    grid-template-columns: 1fr;
  }

  .kcp-dashboard-workspace__identity {
    flex-direction: column;
  }

  .kcp-dashboard-workspace__meta,
  .kcp-dashboard-workspace__stats {
    grid-template-columns: 1fr;
  }

  .kcp-dashboard-hero__content,
  .kcp-dashboard-hero__panel,
  .kcp-dashboard-trial__content {
    padding: 1rem;
  }

  .bp-toolbar {
    padding: 0.9rem 0.95rem;
  }

  .bp-toolbar__group--inline {
    grid-template-columns: 1fr;
  }

  .bp-toolbar__filter-form--inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .bp-toolbar__select,
  .bp-toolbar__date,
  .bp-toolbar__apply {
    width: 100%;
    min-width: 0;
  }

  .bp-toolbar__custom-range--inline {
    width: 100%;
    display: none;
    grid-template-columns: 1fr;
  }

  .bp-toolbar__custom-range--inline.is-visible {
    display: grid;
  }
}

@media (max-width: 640px) {
  .kcp-brandmark__logo {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
  }

  .kcp-brandmark__title {
    font-size: 0.98rem !important;
  }

  .kcp-topbar .kcp-btn-secondary {
    display: none !important;
  }

  .kcp-topbar .kcp-btn-primary {
    min-height: 36px !important;
    padding: 0.55rem 0.8rem !important;
    font-size: 0.82rem !important;
    border-radius: 11px !important;
  }

  .kcp-user-menu__meta,
  .kcp-user-menu__chevron {
    display: none !important;
  }

  .kcp-user-menu__button {
    min-height: 40px !important;
    padding: 4px !important;
  }

  .kcp-user-menu__avatar {
    width: 32px !important;
    height: 32px !important;
  }

  .kcp-user-menu__panel {
    right: -4px;
    width: min(286px, calc(100vw - 24px)) !important;
  }
}

@media (max-width: 520px) {
  .agiza-footer-mini__inner {
    padding: 1.6rem 1rem;
  }

  .agiza-footer-mini__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}
/* =========================================================
   AGIZA BOOKKEEPING SIDEBAR FINAL FIX
========================================================= */

.kcp-books-sidebar {
  width: 18rem !important;
  min-width: 18rem !important;
  max-width: 18rem !important;
  flex: 0 0 18rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  min-height: calc(100vh - 70px) !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 22%),
    linear-gradient(180deg, #061f33 0%, #0c365a 52%, #2b63d9 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04) !important;
  overflow-y: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 20 !important;
}

.kcp-books-sidebar__top {
  padding: 1.2rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.kcp-books-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.kcp-books-sidebar__brand-mark {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  color: #061f33;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  flex-shrink: 0;
}

.kcp-books-sidebar__brand-copy {
  min-width: 0;
}

.kcp-books-sidebar__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kcp-books-sidebar__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.kcp-books-sidebar__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.76);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcp-books-sidebar__context {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.kcp-books-sidebar__context-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(255,255,255,0.58);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kcp-books-sidebar__context-value {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}

.kcp-books-sidebar__action {
  padding: 1rem 1rem 0.75rem;
}

.kcp-books-sidebar__cta {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 850;
  background: rgba(255,255,255,0.96);
  color: #061f33;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.kcp-books-sidebar__cta:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.kcp-books-sidebar__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kcp-books-sidebar__nav {
  padding: 0 0.75rem 1rem !important;
  display: grid !important;
  gap: 0.35rem !important;
  overflow-y: auto;
}

.kcp-books-sidebar__link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  min-height: 46px !important;
  padding: 0.8rem 0.95rem !important;
  border-radius: 1rem !important;
  text-decoration: none !important;
  color: rgba(255,255,255,0.84) !important;
  background: transparent !important;
}

.kcp-books-sidebar__link:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}

.kcp-books-sidebar__link.is-active {
  background: rgba(255,255,255,0.98) !important;
  color: #061f33 !important;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}

.kcp-books-sidebar__link-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kcp-books-sidebar__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kcp-books-sidebar__link-copy {
  min-width: 0;
}

.kcp-books-sidebar__link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
  font-weight: 750;
}

.kcp-books-sidebar__link-chevron {
  font-size: 0.8rem;
  opacity: 0.65;
}

.kcp-books-sidebar__empty {
  padding: 0.9rem;
  border-radius: 1rem;
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.06);
  font-size: 0.85rem;
}

.kcp-books-sidebar__empty p {
  margin: 0;
}

.kcp-books-sidebar__footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 1rem;
}

.kcp-books-sidebar__metric,
.kcp-books-sidebar__summary {
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.kcp-books-sidebar__metric {
  background: rgba(255,255,255,0.10);
}

.kcp-books-sidebar__metric-head,
.kcp-books-sidebar__summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.kcp-books-sidebar__metric-label,
.kcp-books-sidebar__summary-title {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
  font-weight: 750;
}

.kcp-books-sidebar__metric-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.12);
}

.kcp-books-sidebar__metric-value {
  margin: 0.4rem 0 0;
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 850;
  color: #ffffff;
}

.kcp-books-sidebar__metric-note {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
}

.kcp-books-sidebar__summary {
  background: rgba(255,255,255,0.06);
  display: grid;
  gap: 0.75rem;
}

.kcp-books-sidebar__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.kcp-books-sidebar__summary-label {
  color: rgba(255,255,255,0.72);
}

.kcp-books-sidebar__summary-value {
  font-weight: 750;
  color: #ffffff;
}

@media (max-width: 900px) {
  .kcp-books-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: auto !important;
    flex: 0 0 auto !important;
  }
}

@media print {
  .kcp-books-sidebar,
  .print\:hidden {
    display: none !important;
  }
}
/* =========================================================
   AGIZA ONE NAV - FORCE WHITE BACKGROUND
========================================================= */

.kcp-topbar,
.agiza-nav {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.kcp-topbar::before,
.kcp-topbar::after,
.agiza-nav::before,
.agiza-nav::after {
  background: none !important;
  background-image: none !important;
}

.kcp-topbar__inner,
.agiza-nav__inner {
  background: transparent !important;
}

/* =========================================================
   AGIZA ONE LOGGED-IN FOOTER
   Clean white footer matching white nav
========================================================= */

.agiza-app-footer {
  margin-top: auto;
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.025);
}

.agiza-app-footer__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.1rem;
}

.agiza-app-footer__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.agiza-app-footer__logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #111827;
  text-decoration: none;
  min-width: 0;
}

.agiza-app-footer__logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #061f33 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.16);
}

.agiza-app-footer__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agiza-app-footer__title {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.agiza-app-footer__subtitle {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
}

.agiza-app-footer__links {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.agiza-app-footer__links a {
  color: #111827;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.3;
}

.agiza-app-footer__links a:hover {
  color: #1d4ed8;
}

.agiza-app-footer__bottom {
  margin-top: 0.9rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Remove bad stacked old footer styling if both exist */
footer.agiza-footer-mini,
footer.agiza-app-footer {
  display: block !important;
}

footer.agiza-footer-mini a,
footer.agiza-app-footer a {
  text-decoration: none;
}

@media (max-width: 768px) {
  .agiza-app-footer__inner {
    padding: 1.2rem 1rem;
  }

  .agiza-app-footer__links {
    gap: 0.85rem 1rem;
  }
}

@media (max-width: 520px) {
  .agiza-app-footer__logo-wrap {
    align-items: flex-start;
  }

  .agiza-app-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   AGIZA ONE HOMEPAGE QR - BIGGER SCAN ME TEXT
========================================================= */

.agiza-hero__scan {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  margin-top: 32px !important;
}

.agiza-qr-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.agiza-qr-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.agiza-qr {
  width: 150px !important;
  height: 150px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  padding: 12px !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease !important;
  position: relative !important;
  z-index: 2 !important;
}

.agiza-qr:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 30px 58px rgba(0, 0, 0, 0.32) !important;
}

.agiza-qr img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  border-radius: 10px !important;
  object-fit: contain !important;
}

.agiza-qr-arrow {
  position: absolute !important;
  left: -48px !important;
  bottom: 8px !important;
  width: 58px !important;
  height: 82px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.agiza-qr-arrow svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Bigger handwritten Scan me text */
.agiza-qr-caption {
  margin-top: 12px !important;
  font-size: 2.25rem !important;
  line-height: 0.95 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive !important;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.36) !important;
  transform: rotate(-2deg) !important;
}

.agiza-hero__scan-copy strong {
  display: block !important;
  font-size: 0.98rem !important;
  margin-bottom: 6px !important;
  color: #ffffff !important;
}

.agiza-hero__scan-copy span {
  display: block !important;
  max-width: 310px !important;
  color: #b8cadb !important;
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
}

@media (max-width: 640px) {
  .agiza-hero__scan {
    align-items: flex-start !important;
    gap: 16px !important;
  }

  .agiza-qr {
    width: 126px !important;
    height: 126px !important;
    border-radius: 17px !important;
    padding: 10px !important;
  }

  .agiza-qr-arrow {
    left: -36px !important;
    bottom: 6px !important;
    width: 46px !important;
    height: 66px !important;
  }

  .agiza-qr-caption {
    margin-top: 9px !important;
    font-size: 1.65rem !important;
    line-height: 0.95 !important;
  }

  .agiza-hero__scan-copy span {
    max-width: 220px !important;
    font-size: 0.82rem !important;
  }
}

/* =========================================================
   AGIZA ONE FOOTER - BLUE BLACK THEME OVERRIDE
========================================================= */

.agiza-footer-mini,
.agiza-app-footer {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.26), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.18), transparent 30%),
    linear-gradient(135deg, #03101f 0%, #062b45 42%, #020617 100%) !important;
  color: #ffffff !important;
  border-top: 1px solid rgba(147, 197, 253, 0.16) !important;
  box-shadow: 0 -18px 48px rgba(2, 6, 23, 0.18) !important;
}

.agiza-footer-mini *,
.agiza-app-footer * {
  border-color: rgba(147, 197, 253, 0.16);
}

.agiza-footer-mini__title,
.agiza-footer-mini__brand,
.agiza-footer-mini__links a,
.agiza-footer-mini__bottom,
.agiza-app-footer__title,
.agiza-app-footer__column h3,
.agiza-app-footer__cta strong {
  color: #ffffff !important;
}

.agiza-footer-mini__subtitle,
.agiza-footer-mini__links a,
.agiza-footer-mini__bottom,
.agiza-app-footer__subtitle,
.agiza-app-footer__column a,
.agiza-app-footer__bottom {
  color: #cbd5e1 !important;
}

.agiza-footer-mini__top,
.agiza-footer-mini__bottom,
.agiza-app-footer__bottom {
  border-color: rgba(147, 197, 253, 0.16) !important;
}

.agiza-footer-mini__logo,
.agiza-app-footer__logo {
  background: transparent !important;
  box-shadow: none !important;
}

.agiza-footer-mini__links a:hover,
.agiza-app-footer__column a:hover {
  color: #ffffff !important;
}

.agiza-footer-mini__links,
.agiza-app-footer__badges span {
  color: #e0f2fe !important;
}

.agiza-footer-mini__links a {
  background: transparent !important;
}

.agiza-footer-mini__links a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
/* Prevent logo flash before page-specific CSS finishes loading */
.agiza-nav__logo,
.kcp-brandmark__logo,
.agiza-app-footer__logo {
  width: 46px !important;
  height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  overflow: hidden !important;
  flex: 0 0 46px !important;
}

.agiza-nav__logo img,
.kcp-brandmark__logo img,
.agiza-app-footer__logo img,
img[src*="agiza-one-logo"] {
  width: 46px !important;
  height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  object-fit: contain !important;
  display: block !important;
}

.agiza-dashboard-preview--image {
  border-radius: 26px;
  background: #071827;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
  overflow: hidden;
}

.agiza-dashboard-preview--image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  object-fit: cover;
}

/* =========================================================
   AGIZA ONE PREMIUM CONSISTENCY PATCH
   UI-only: aligns existing EJS/Tailwind pages without changing routes or data.
========================================================= */
:root {
  --agiza-premium-bg: #f6f8fb;
  --agiza-premium-card: rgba(255, 255, 255, 0.96);
  --agiza-premium-line: rgba(203, 213, 225, 0.86);
  --agiza-premium-navy: #071827;
  --agiza-premium-blue: #2563eb;
  --agiza-premium-muted: #64748b;
  --agiza-premium-radius: 1.15rem;
  --agiza-premium-shadow: 0 18px 42px rgba(15, 23, 42, 0.065);
  --agiza-premium-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.045);
}

body,
.kcp-body {
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.075), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(14, 165, 233, 0.055), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, var(--agiza-premium-bg) 100%) !important;
}

/* Make card surfaces feel from one design system, including Tailwind-built pages. */
.kcp-card,
.kcp-card-soft,
.kcp-card-flat,
.kcp-stat-card,
[class*="rounded-2xl"][class*="bg-white"],
[class*="rounded-xl"][class*="bg-white"],
[class*="rounded-3xl"][class*="bg-white"] {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.96) 100%) !important;
  border-color: var(--agiza-premium-line) !important;
  box-shadow: var(--agiza-premium-shadow-soft) !important;
}

.kcp-page-header,
.kcp-card-header,
.kcp-dashboard-hero__content,
.admin-premium-header {
  border-radius: 1.45rem !important;
}

/* Reduce explanatory UI copy visually without removing important data. */
.kcp-page-subtitle,
.kcp-section-subtitle,
.kcp-help,
.kcp-muted,
.text-slate-500,
.text-slate-600,
.text-gray-500,
.text-gray-600,
.text-zinc-500,
.text-zinc-600 {
  line-height: 1.45 !important;
}

.kcp-page-header .kcp-page-subtitle,
.kcp-card-header .kcp-section-subtitle,
.admin-premium-header span,
[class*="rounded-2xl"] > p.text-sm,
[class*="rounded-xl"] > p.text-sm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kcp-help,
.text-xs.text-slate-500,
.text-xs.text-gray-500 {
  font-size: 0.78rem !important;
}

/* Premium action consistency. */
button,
a[class*="bg-[#0f5cc0]"],
.kcp-btn,
.agiza-primary-btn,
.agiza-secondary-btn,
.agiza-link-btn,
.agiza-whatsapp-btn,
input[type="submit"] {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease !important;
}

button:hover,
a[class*="bg-[#0f5cc0]"]:hover,
.kcp-btn:hover,
.agiza-primary-btn:hover,
.agiza-secondary-btn:hover,
.agiza-link-btn:hover,
.agiza-whatsapp-btn:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
}

.bg-\[\#0f5cc0\],
.kcp-btn-primary,
.kcp-btn-success,
button[type="submit"].bg-blue-600,
a.bg-blue-600 {
  background: linear-gradient(135deg, #0f2a44 0%, #2563eb 100%) !important;
  border-color: rgba(37, 99, 235, 0.42) !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18) !important;
}

/* Inputs and selects across legacy and Tailwind pages. */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="file"],
select,
textarea,
.kcp-input,
.ts-control,
.ss-main {
  border-radius: 0.9rem !important;
  border-color: #cbd5e1 !important;
  background-color: #fbfdff !important;
}

input:focus,
select:focus,
textarea:focus,
.kcp-input:focus,
.ts-control:focus-within,
.ss-main:focus-within {
  border-color: rgba(37, 99, 235, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
  outline: none !important;
}

/* Tables: cleaner headers and calmer row hover. */
.kcp-table-wrap,
.overflow-x-auto:has(table) {
  border-radius: 1.15rem !important;
  border: 1px solid var(--agiza-premium-line) !important;
  background: #ffffff !important;
  box-shadow: var(--agiza-premium-shadow-soft) !important;
}

.kcp-table thead th,
table thead th {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}

.kcp-table tbody tr:hover td,
table tbody tr:hover td {
  background: #f8fbff !important;
}

/* Premium admin shell. */
.admin-premium-sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.34), transparent 32%),
    linear-gradient(180deg, #071827 0%, #0a2740 55%, #020617 100%) !important;
  color: #ffffff !important;
  border-color: rgba(147, 197, 253, 0.16) !important;
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.18) !important;
}

.admin-premium-sidebar__head {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(147, 197, 253, 0.16);
}

.admin-premium-sidebar__head p,
.admin-premium-header p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93c5fd;
}

.admin-premium-sidebar__head h2,
.admin-premium-header h1 {
  margin: 0.35rem 0 0;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.admin-premium-sidebar__head h2 {
  font-size: 1.25rem;
  color: #ffffff;
}

.admin-premium-sidebar__head span {
  display: inline-flex;
  margin-top: 0.65rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-premium-sidebar__nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}

.admin-premium-sidebar__link {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  color: rgba(255,255,255,0.82) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-premium-sidebar__link:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff !important;
}

.admin-premium-sidebar__link.is-active {
  background: #ffffff !important;
  color: #071827 !important;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}

.admin-premium-sidebar__link small {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: inherit;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-premium-header {
  background:
    radial-gradient(circle at 96% 0%, rgba(37, 99, 235, 0.13), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-color: var(--agiza-premium-line) !important;
  box-shadow: var(--agiza-premium-shadow-soft) !important;
}

.admin-premium-header h1 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  color: #0f172a;
}

.admin-premium-header span {
  margin-top: 0.35rem;
  display: block;
  color: var(--agiza-premium-muted);
  font-size: 0.9rem;
}

.admin-premium-header__user {
  min-width: 180px;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.85rem 1rem;
}

.admin-premium-header__user strong,
.admin-premium-header__user span {
  display: block;
}

.admin-premium-header__user strong {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 900;
}

.admin-premium-header__user span {
  margin-top: 0.15rem;
  color: var(--agiza-premium-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

/* Home page copy trim and cleaner module spacing. */
.agiza-hero h1,
.agiza-section__header h2,
.agiza-dashboard-panel__content h2,
.agiza-cta h2 {
  letter-spacing: -0.055em !important;
}

.agiza-hero p,
.agiza-module-card p,
.agiza-dashboard-panel__content p,
.agiza-review-card p,
.agiza-faq-item p {
  line-height: 1.48 !important;
}

.agiza-module-card p,
.agiza-review-card p,
.agiza-faq-item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .kcp-page-header,
  .kcp-card-header,
  .admin-premium-header {
    border-radius: 1.15rem !important;
  }

  .admin-premium-header__user {
    width: 100%;
  }
}
.referral-hero input,
.referral-link-input {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  font-weight: 700;
}

.referral-stat-card {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
}

.referral-stat-card .label,
.referral-stat-card small {
  color: #475569 !important;
  font-weight: 700;
}

.referral-stat-card .value,
.referral-stat-card strong {
  color: #0f172a !important;
  font-weight: 900;
}

.referral-email-btn {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}

.referral-email-btn:hover {
  background: #f8fafc !important;
}

