/*!
 * Zen skin for AdminLTE 4 — shared by hub.gardengo.in and f.nurserylive.com
 * Original theme: minimal, achromatic (zinc) neutrals, thin borders, one brand colour.
 * Inspired by the look of shadcn/ui-style dashboards; no third-party template code.
 * Change the brand with ONE variable: --zen-brand (and its -hover / -tint / -ink).
 */

/* ---------- Fonts ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/inter/files/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/inter/files/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/inter/files/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/inter/files/inter-latin-700-normal.woff2") format("woff2"); }

/* ---------- Tokens: light ---------- */
:root, [data-bs-theme="light"] {
  --zen-brand: #15803d;          /* GardenGo / NurseryLive green */
  --zen-brand-hover: #166534;
  --zen-brand-tint: #f0fdf4;
  --zen-brand-ink: #ffffff;
  --zen-brand-ring: rgba(21, 128, 61, .22);

  --zen-bg: #fafafa;             /* page */
  --zen-surface: #ffffff;        /* cards, sidebar, header */
  --zen-surface-2: #f4f4f5;      /* hover, active nav, table head */
  --zen-border: #e4e4e7;
  --zen-border-strong: #d4d4d8;
  --zen-text: #09090b;
  --zen-text-2: #52525b;
  --zen-muted: #71717a;

  --zen-radius: 12px;
  --zen-radius-sm: 8px;
  --zen-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --zen-shadow-pop: 0 10px 30px -10px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06);

  --zen-sidebar-width: 248px;
  --zen-header-height: 56px;

  /* status pills */
  --zen-ok-bg: #dcfce7;   --zen-ok-fg: #166534;
  --zen-warn-bg: #fef3c7; --zen-warn-fg: #92400e;
  --zen-bad-bg: #fee2e2;  --zen-bad-fg: #991b1b;
  --zen-info-bg: #dbeafe; --zen-info-fg: #1e40af;
  --zen-mute-bg: #f4f4f5; --zen-mute-fg: #3f3f46;
}

/* ---------- Tokens: dark ---------- */
[data-bs-theme="dark"] {
  --zen-brand: #22c55e;
  --zen-brand-hover: #16a34a;
  --zen-brand-tint: rgba(34, 197, 94, .12);
  --zen-brand-ink: #052e16;
  --zen-brand-ring: rgba(34, 197, 94, .28);

  --zen-bg: #09090b;
  --zen-surface: #111113;
  --zen-surface-2: #1c1c1f;
  --zen-border: #27272a;
  --zen-border-strong: #3f3f46;
  --zen-text: #fafafa;
  --zen-text-2: #a1a1aa;
  --zen-muted: #8b8b93;
  --zen-shadow: none;
  --zen-shadow-pop: 0 10px 30px -10px rgba(0, 0, 0, .7);

  --zen-ok-bg: rgba(34, 197, 94, .15);  --zen-ok-fg: #86efac;
  --zen-warn-bg: rgba(245, 158, 11, .15); --zen-warn-fg: #fcd34d;
  --zen-bad-bg: rgba(239, 68, 68, .15);  --zen-bad-fg: #fca5a5;
  --zen-info-bg: rgba(59, 130, 246, .15); --zen-info-fg: #93c5fd;
  --zen-mute-bg: #27272a; --zen-mute-fg: #d4d4d8;
}

/* ---------- Map tokens onto Bootstrap + AdminLTE ---------- */
:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-color: var(--zen-text);
  --bs-body-bg: var(--zen-bg);
  --bs-secondary-color: var(--zen-text-2);
  --bs-tertiary-bg: var(--zen-bg);
  --bs-secondary-bg: var(--zen-surface-2);
  --bs-border-color: var(--zen-border);
  --bs-border-radius: var(--zen-radius-sm);
  --bs-border-radius-lg: var(--zen-radius);
  --bs-primary: var(--zen-brand);
  --bs-link-color: var(--zen-text);
  --bs-link-hover-color: var(--zen-brand);
  --bs-focus-ring-color: var(--zen-brand-ring);
  --bs-emphasis-color: var(--zen-text);
  --bs-heading-color: var(--zen-text);

  --lte-sidebar-width: var(--zen-sidebar-width);
  --lte-sidebar-color: var(--zen-text-2);
  --lte-sidebar-hover-bg: var(--zen-surface-2);
  --lte-sidebar-hover-color: var(--zen-text);
  --lte-sidebar-active-color: var(--zen-text);
  --lte-sidebar-menu-active-bg: var(--zen-surface-2);
  --lte-sidebar-menu-active-color: var(--zen-text);
  --lte-sidebar-header-color: var(--zen-muted);
  --lte-sidebar-submenu-bg: transparent;
  --lte-sidebar-submenu-color: var(--zen-text-2);
  --lte-sidebar-submenu-hover-bg: var(--zen-surface-2);
  --lte-sidebar-submenu-hover-color: var(--zen-text);
  --lte-sidebar-submenu-active-bg: var(--zen-surface-2);
  --lte-sidebar-submenu-active-color: var(--zen-text);
}

body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, .h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
h2, .h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.015em; }
h3, .h3 { font-size: 1rem; font-weight: 600; }
.text-muted, .text-body-secondary { color: var(--zen-muted) !important; }
a { text-decoration: none; }
::selection { background: var(--zen-brand-tint); }

/* ---------- Header ---------- */
.app-header {
  background: var(--zen-surface) !important;
  border-bottom: 1px solid var(--zen-border);
  box-shadow: none !important;
  min-height: var(--zen-header-height);
}
.app-header .nav-link { color: var(--zen-text-2); border-radius: var(--zen-radius-sm); }
.app-header .nav-link:hover { color: var(--zen-text); background: var(--zen-surface-2); }

.zen-search {
  display: flex; align-items: center; gap: .5rem;
  width: min(360px, 40vw); height: 36px; padding: 0 .5rem 0 .75rem;
  border: 1px solid var(--zen-border); border-radius: var(--zen-radius-sm);
  background: var(--zen-bg); color: var(--zen-muted); font-size: .8125rem; cursor: pointer;
}
.zen-search:hover { border-color: var(--zen-border-strong); color: var(--zen-text-2); }
.zen-kbd {
  margin-left: auto; padding: 1px 6px; font-size: .6875rem; font-weight: 500;
  border: 1px solid var(--zen-border); border-radius: 5px; background: var(--zen-surface); color: var(--zen-muted);
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  background: var(--zen-surface) !important;
  border-right: 1px solid var(--zen-border);
  box-shadow: none !important;
}
.app-sidebar .sidebar-brand {
  height: var(--zen-header-height); border-bottom: 1px solid var(--zen-border);
  justify-content: flex-start; padding: 0 1rem;
}
.app-sidebar .brand-link { display: flex; align-items: center; gap: .625rem; color: var(--zen-text); }
.zen-logo {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--zen-brand); color: var(--zen-brand-ink); font-weight: 700; font-size: .8125rem;
}
.app-sidebar .brand-text { font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.app-sidebar .brand-sub { display: block; font-size: .6875rem; color: var(--zen-muted); font-weight: 500; line-height: 1; margin-top: 2px; }

.sidebar-wrapper { padding: .5rem .625rem 1rem; }
.sidebar-menu .nav-header {
  padding: 1rem .625rem .375rem !important; font-size: .6875rem !important; font-weight: 500;
  color: var(--zen-muted) !important; text-transform: none; letter-spacing: 0;
}
.sidebar-menu .nav-item > .nav-link {
  display: flex; align-items: center; gap: .625rem;
  height: 34px; padding: 0 .625rem !important; margin: 1px 0;
  border-radius: var(--zen-radius-sm); font-size: .8125rem; font-weight: 500;
  color: var(--zen-text-2);
}
.sidebar-menu .nav-item > .nav-link p { margin: 0; flex: 1; display: flex; align-items: center; }
.sidebar-menu .nav-link .nav-icon { font-size: 1rem; width: 1rem; margin: 0 !important; color: var(--zen-muted); }
.sidebar-menu .nav-link:hover .nav-icon, .sidebar-menu .nav-link.active .nav-icon { color: var(--zen-text); }
.sidebar-menu .nav-link.active { background: var(--zen-surface-2) !important; color: var(--zen-text) !important; box-shadow: inset 2px 0 0 var(--zen-brand); }
.sidebar-menu .nav-link .zen-count {
  margin-left: auto; min-width: 20px; padding: 0 6px; height: 18px; line-height: 18px; text-align: center;
  font-size: .6875rem; font-weight: 600; border-radius: 999px; background: var(--zen-surface-2); color: var(--zen-text-2);
}
.sidebar-menu .nav-link.active .zen-count { background: var(--zen-surface); }
.sidebar-menu .nav-link.disabled { opacity: .55; }

.zen-sidebar-user {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: .625rem;
  margin: .5rem .625rem .75rem; padding: .5rem; border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-sm); background: var(--zen-surface);
}
.zen-avatar {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; flex: none;
  background: var(--zen-surface-2); color: var(--zen-text); font-size: .75rem; font-weight: 600;
}
.zen-sidebar-user .name { font-size: .8125rem; font-weight: 600; line-height: 1.1; color: var(--zen-text); }
.zen-sidebar-user .role { font-size: .6875rem; color: var(--zen-muted); }

/* collapsed (mini) sidebar */
.sidebar-mini.sidebar-collapse .app-sidebar .brand-text,
.sidebar-mini.sidebar-collapse .app-sidebar .brand-sub,
.sidebar-mini.sidebar-collapse .zen-sidebar-user .who { display: none; }

/* ---------- Main ---------- */
.app-main { background: var(--zen-bg); }
.app-content-header { padding: 1.5rem 0 .25rem; }
.app-content-header .breadcrumb { font-size: .75rem; margin-bottom: .25rem; --bs-breadcrumb-divider-color: var(--zen-muted); }
.app-content-header .breadcrumb-item a { color: var(--zen-muted); }
.app-content-header .breadcrumb-item.active { color: var(--zen-text-2); }
.zen-page-sub { color: var(--zen-muted); font-size: .875rem; margin: .125rem 0 0; }
.app-content { padding: 1rem 0 2rem; }
.app-content .container-fluid, .app-content-header .container-fluid { padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- Cards ---------- */
.card {
  --bs-card-border-color: var(--zen-border);
  --bs-card-border-radius: var(--zen-radius);
  --bs-card-inner-border-radius: calc(var(--zen-radius) - 1px);
  --bs-card-cap-bg: transparent;
  --bs-card-bg: var(--zen-surface);
  border: 1px solid var(--zen-border); box-shadow: var(--zen-shadow); margin-bottom: 1rem;
}
.card-header { border-bottom: 1px solid var(--zen-border); padding: .875rem 1.25rem; display: flex; align-items: center; gap: .5rem; }
.card-header::after { display: none; }
.card-title { font-size: .9375rem; font-weight: 600; margin: 0; float: none; }
.card-header .card-sub { color: var(--zen-muted); font-size: .8125rem; }
.card-header .card-tools { margin-left: auto; margin-right: 0; float: none; }
.card-body { padding: 1.25rem; }
.card-footer { background: transparent; border-top: 1px solid var(--zen-border); }

/* stat card */
.zen-stat .label { display: flex; align-items: center; justify-content: space-between; color: var(--zen-text-2); font-size: .8125rem; font-weight: 500; }
.zen-stat .label i { color: var(--zen-muted); font-size: 1rem; }
.zen-stat .value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-top: .5rem; color: var(--zen-text); }
.zen-stat .foot { font-size: .75rem; color: var(--zen-muted); margin-top: .25rem; }
.zen-delta-up { color: var(--zen-ok-fg); font-weight: 500; }
.zen-delta-down { color: var(--zen-bad-fg); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { --bs-btn-font-size: .8125rem; --bs-btn-font-weight: 500; --bs-btn-padding-y: .4375rem; --bs-btn-padding-x: .875rem; --bs-btn-border-radius: var(--zen-radius-sm); box-shadow: none !important; }
.btn-sm { --bs-btn-padding-y: .3125rem; --bs-btn-padding-x: .625rem; --bs-btn-font-size: .75rem; }
.btn-primary {
  --bs-btn-bg: var(--zen-brand); --bs-btn-border-color: var(--zen-brand); --bs-btn-color: var(--zen-brand-ink);
  --bs-btn-hover-bg: var(--zen-brand-hover); --bs-btn-hover-border-color: var(--zen-brand-hover); --bs-btn-hover-color: var(--zen-brand-ink);
  --bs-btn-active-bg: var(--zen-brand-hover); --bs-btn-active-border-color: var(--zen-brand-hover); --bs-btn-active-color: var(--zen-brand-ink);
  --bs-btn-disabled-bg: var(--zen-brand); --bs-btn-disabled-border-color: var(--zen-brand);
}
.btn-dark { --bs-btn-bg: var(--zen-text); --bs-btn-border-color: var(--zen-text); --bs-btn-color: var(--zen-surface); --bs-btn-hover-bg: var(--zen-text-2); --bs-btn-hover-border-color: var(--zen-text-2); --bs-btn-hover-color: var(--zen-surface); }
.btn-outline-secondary, .btn-light {
  --bs-btn-bg: var(--zen-surface); --bs-btn-border-color: var(--zen-border); --bs-btn-color: var(--zen-text);
  --bs-btn-hover-bg: var(--zen-surface-2); --bs-btn-hover-border-color: var(--zen-border); --bs-btn-hover-color: var(--zen-text);
  --bs-btn-active-bg: var(--zen-surface-2); --bs-btn-active-border-color: var(--zen-border-strong); --bs-btn-active-color: var(--zen-text);
}
.btn-ghost { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: var(--zen-text-2); --bs-btn-hover-bg: var(--zen-surface-2); --bs-btn-hover-color: var(--zen-text); }
.btn-danger { --bs-btn-bg: #dc2626; --bs-btn-border-color: #dc2626; --bs-btn-hover-bg: #b91c1c; --bs-btn-hover-border-color: #b91c1c; }

/* ---------- Badges (pills) ---------- */
.badge { font-size: .75rem; font-weight: 500; padding: .25em .625em; border-radius: 999px; }
.zen-pill { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; font-weight: 500; padding: .125rem .5rem; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.zen-pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .85; }
.zen-pill.no-dot::before { display: none; }
.zen-pill.ok   { background: var(--zen-ok-bg);   color: var(--zen-ok-fg); }
.zen-pill.warn { background: var(--zen-warn-bg); color: var(--zen-warn-fg); }
.zen-pill.bad  { background: var(--zen-bad-bg);  color: var(--zen-bad-fg); }
.zen-pill.info { background: var(--zen-info-bg); color: var(--zen-info-fg); }
.zen-pill.mute { background: var(--zen-mute-bg); color: var(--zen-mute-fg); }

/* ---------- Tables ---------- */
.table {
  --bs-table-bg: transparent; --bs-table-color: var(--zen-text);
  --bs-table-border-color: var(--zen-border); --bs-table-hover-bg: var(--zen-surface-2);
  --bs-table-striped-bg: var(--zen-bg);
  margin-bottom: 0; font-size: .8125rem;
}
.table > thead th {
  font-size: .75rem; font-weight: 500; color: var(--zen-muted); background: transparent;
  border-bottom-width: 1px; white-space: nowrap; padding-top: .625rem; padding-bottom: .625rem;
}
.table > :not(caption) > * > * { padding: .75rem 1rem; vertical-align: middle; }
.table > tbody > tr:last-child > * { border-bottom: 0; }
.card > .table-responsive > .table > thead th:first-child, .card > .table-responsive > .table td:first-child { padding-left: 1.25rem; }
.card > .table-responsive > .table > thead th:last-child, .card > .table-responsive > .table td:last-child { padding-right: 1.25rem; }
.zen-cell-main { font-weight: 500; color: var(--zen-text); }
.zen-cell-sub { display: block; font-size: .75rem; color: var(--zen-muted); }
.zen-num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  font-size: .8125rem; border-color: var(--zen-border); border-radius: var(--zen-radius-sm);
  background-color: var(--zen-surface); color: var(--zen-text); min-height: 36px; box-shadow: none;
}
.form-control::placeholder { color: var(--zen-muted); }
.form-control:focus, .form-select:focus { border-color: var(--zen-brand); box-shadow: 0 0 0 3px var(--zen-brand-ring); }
.form-label { font-size: .8125rem; font-weight: 500; margin-bottom: .375rem; color: var(--zen-text); }
.form-text { color: var(--zen-muted); font-size: .75rem; }
.form-check-input:checked { background-color: var(--zen-brand); border-color: var(--zen-brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--zen-brand-ring); border-color: var(--zen-brand); }
.input-group-text { background: var(--zen-surface-2); border-color: var(--zen-border); color: var(--zen-muted); font-size: .8125rem; }

/* ---------- Tabs / segmented ---------- */
.zen-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--zen-radius-sm); background: var(--zen-surface-2); }
.zen-tabs .nav-link { padding: .3125rem .75rem; font-size: .8125rem; font-weight: 500; border-radius: 6px; color: var(--zen-text-2); }
.zen-tabs .nav-link.active { background: var(--zen-surface); color: var(--zen-text); box-shadow: var(--zen-shadow); }

/* ---------- Progress ---------- */
.progress { --bs-progress-height: 6px; --bs-progress-bg: var(--zen-surface-2); --bs-progress-bar-bg: var(--zen-brand); border-radius: 999px; }

/* ---------- Dropdowns / modals / alerts ---------- */
.dropdown-menu { --bs-dropdown-border-color: var(--zen-border); --bs-dropdown-border-radius: var(--zen-radius-sm); --bs-dropdown-link-hover-bg: var(--zen-surface-2); --bs-dropdown-font-size: .8125rem; --bs-dropdown-bg: var(--zen-surface); box-shadow: var(--zen-shadow-pop); padding: .25rem; }
.dropdown-item { border-radius: 6px; padding: .375rem .625rem; }
.modal-content { border: 1px solid var(--zen-border); border-radius: var(--zen-radius); box-shadow: var(--zen-shadow-pop); background: var(--zen-surface); }
.modal-header, .modal-footer { border-color: var(--zen-border); }
.alert { border-radius: var(--zen-radius-sm); font-size: .8125rem; border: 1px solid var(--zen-border); background: var(--zen-surface); color: var(--zen-text); }
.alert-warning { background: var(--zen-warn-bg); color: var(--zen-warn-fg); border-color: transparent; }
.alert-danger  { background: var(--zen-bad-bg);  color: var(--zen-bad-fg);  border-color: transparent; }
.alert-success { background: var(--zen-ok-bg);   color: var(--zen-ok-fg);   border-color: transparent; }
.alert-info    { background: var(--zen-info-bg); color: var(--zen-info-fg); border-color: transparent; }

/* ---------- Command palette ---------- */
.zen-cmd .modal-dialog { max-width: 560px; margin-top: 12vh; }
.zen-cmd .zen-cmd-input { border: 0; border-bottom: 1px solid var(--zen-border); border-radius: 0; height: 48px; font-size: .9375rem; padding: 0 1rem; box-shadow: none !important; }
.zen-cmd .list-group { max-height: 50vh; overflow: auto; padding: .375rem; }
.zen-cmd .list-group-item { border: 0; border-radius: 6px; font-size: .8125rem; display: flex; align-items: center; gap: .625rem; color: var(--zen-text); background: transparent; }
.zen-cmd .list-group-item i { color: var(--zen-muted); }
.zen-cmd .list-group-item.active, .zen-cmd .list-group-item:hover { background: var(--zen-surface-2); color: var(--zen-text); }
.zen-cmd .zen-cmd-group { font-size: .6875rem; color: var(--zen-muted); padding: .5rem .75rem .25rem; }

/* ---------- Empty state ---------- */
.zen-empty { text-align: center; padding: 3rem 1rem; color: var(--zen-muted); }
.zen-empty i { font-size: 1.75rem; color: var(--zen-border-strong); }
.zen-empty h3 { margin: .75rem 0 .25rem; color: var(--zen-text); }

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .zen-search { width: auto; }
  .zen-search .zen-search-text, .zen-search .zen-kbd { display: none; }
  .app-content .container-fluid, .app-content-header .container-fluid { padding-left: 1rem; padding-right: 1rem; }
  .btn, .form-control, .form-select { min-height: 40px; }
}
