/*
 * ZaidTech Design System 1.0
 * Shared visual language for admin.zaidtechpc.com and its individual tools.
 * Upload to the main zaidtechpc.com document root for use by every app.
 */
:root {
  --zt-forest-950: #061c16;
  --zt-forest-900: #09271f;
  --zt-forest-850: #0c3026;
  --zt-forest-800: #10392d;
  --zt-forest-700: #185342;
  --zt-forest-600: #246d55;
  --zt-forest-500: #2f8666;
  --zt-sage-300: #b9edc8;
  --zt-sage-200: #d7f0db;
  --zt-acid: #d8ff83;
  --zt-paper: #f1f0e8;
  --zt-paper-2: #f8f7f1;
  --zt-white: #fffefa;
  --zt-ink: #102a23;
  --zt-ink-soft: #344d43;
  --zt-muted: #65766e;
  --zt-muted-2: #91a097;
  --zt-line: #dedfd3;
  --zt-line-strong: #cbd2c6;
  --zt-success: #137a54;
  --zt-warning: #9a6718;
  --zt-danger: #b5473c;
  --zt-info: #32698b;
  --zt-radius-xs: 7px;
  --zt-radius-sm: 10px;
  --zt-radius-md: 14px;
  --zt-radius-lg: 19px;
  --zt-radius-xl: 26px;
  --zt-shadow-soft: 0 14px 42px rgba(20, 44, 34, .075);
  --zt-shadow-card: 0 4px 16px rgba(20, 44, 34, .055);
  --zt-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --zt-font-display: Georgia, "Times New Roman", serif;
  --zt-motion-fast: 160ms;
  --zt-motion-base: 220ms;
  --zt-focus: 0 0 0 3px rgba(47, 134, 102, .24);
}

.zt-ui, .zt-app-shell, .zt-wayfinder-back,
.zt-card, .zt-panel, .zt-btn, .zt-badge,
.zt-input, .zt-select, .zt-textarea, .zt-table-wrap {
  font-family: var(--zt-font-sans);
}

.zt-app-shell { width: 100%; color: var(--zt-ink); }
.zt-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 66px;
  padding: 10px clamp(14px, 2.2vw, 30px);
  color: #edf6ee;
  background:
    radial-gradient(circle at 12% 0%, rgba(119, 187, 139, .18), transparent 36%),
    linear-gradient(110deg, var(--zt-forest-800), var(--zt-forest-950));
  border-bottom: 1px solid rgba(185, 237, 200, .18);
  box-shadow: 0 7px 22px rgba(6, 28, 22, .10);
}
.zt-appbar__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.zt-appbar__mark {
  display: grid; flex: 0 0 auto; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  color: var(--zt-forest-950); background: var(--zt-acid);
  font-size: 18px; font-weight: 950; letter-spacing: -.08em;
  box-shadow: 0 5px 16px rgba(216, 255, 131, .13);
}
.zt-appbar__labels { display: grid; gap: 3px; min-width: 0; }
.zt-appbar__eyebrow { color: #b5d0bc; font-size: 9px; font-weight: 850; letter-spacing: 1.35px; line-height: 1.2; text-transform: uppercase; }
.zt-appbar__title { overflow: hidden; color: #fffefa; font-size: 15px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.zt-appbar__subtitle { overflow: hidden; color: #b8cabe; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.zt-appbar__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.zt-appbar__return {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 39px; padding: 8px 13px;
  border: 1px solid rgba(216, 255, 131, .34); border-radius: 11px;
  color: var(--zt-forest-950); background: var(--zt-acid);
  font-size: 11px; font-weight: 850; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
  transition: transform var(--zt-motion-fast) ease, background var(--zt-motion-fast) ease, box-shadow var(--zt-motion-fast) ease;
}
.zt-appbar__return:hover { transform: translateY(-1px); background: #e4ffab; box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.zt-appbar__return:active { transform: translateY(0); }
.zt-appbar__return:focus-visible, .zt-wayfinder-back:focus-visible,
.zt-btn:focus-visible, .zt-input:focus-visible, .zt-select:focus-visible,
.zt-textarea:focus-visible { outline: none; box-shadow: var(--zt-focus); }
.zt-appbar__arrow { font-size: 17px; line-height: 1; }

/* A smaller return-link variant for insertion into an existing application header. */
.zt-wayfinder-back {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  min-height: 40px; padding: 6px 13px 6px 7px;
  border: 1px solid rgba(185, 237, 200, .28); border-radius: 12px;
  color: #edf6ec; background: linear-gradient(135deg, var(--zt-forest-800), var(--zt-forest-900));
  box-shadow: 0 7px 19px rgba(6, 28, 22, .12); text-decoration: none;
  transition: transform var(--zt-motion-fast) ease, border-color var(--zt-motion-fast) ease, box-shadow var(--zt-motion-fast) ease;
}
.zt-wayfinder-back:hover { transform: translateY(-1px); border-color: rgba(216, 255, 131, .55); box-shadow: 0 10px 24px rgba(6, 28, 22, .17); }
.zt-wayfinder-back__icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--zt-forest-950); background: var(--zt-acid); font-size: 16px; font-weight: 900; }
.zt-wayfinder-back__copy { display: grid; gap: 2px; min-width: 0; }
.zt-wayfinder-back__copy strong { color: #f2f7ee; font-size: 10px; font-weight: 850; line-height: 1.15; }
.zt-wayfinder-back__copy small { color: #a9c5b2; font-size: 9px; line-height: 1.15; }

/* Layout primitives */
.zt-page-shell { width: min(100% - 32px, 1440px); margin-inline: auto; color: var(--zt-ink); font-family: var(--zt-font-sans); }
.zt-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 24px 0 18px; }
.zt-page-heading { margin: 0; color: var(--zt-ink); font-size: clamp(23px, 3vw, 34px); font-weight: 850; letter-spacing: -.045em; line-height: 1.08; }
.zt-page-description { max-width: 760px; margin: 7px 0 0; color: var(--zt-muted); font-size: 13px; line-height: 1.55; }
.zt-eyebrow { color: var(--zt-forest-700); font-size: 9px; font-weight: 900; letter-spacing: 1.35px; text-transform: uppercase; }
.zt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.zt-stack { display: grid; gap: 14px; }
.zt-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.zt-card, .zt-panel { color: var(--zt-ink); border: 1px solid var(--zt-line); border-radius: var(--zt-radius-lg); background: var(--zt-white); box-shadow: var(--zt-shadow-card); }
.zt-card { padding: 18px; transition: transform var(--zt-motion-base) ease, box-shadow var(--zt-motion-base) ease, border-color var(--zt-motion-base) ease; }
.zt-card:hover { transform: translateY(-2px); border-color: var(--zt-line-strong); box-shadow: var(--zt-shadow-soft); }
.zt-panel { padding: clamp(16px, 2vw, 24px); }

/* Buttons and status */
.zt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--zt-line-strong); border-radius: 11px; color: var(--zt-ink); background: var(--zt-white); font-size: 12px; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform var(--zt-motion-fast) ease, border-color var(--zt-motion-fast) ease, background var(--zt-motion-fast) ease, box-shadow var(--zt-motion-fast) ease; }
.zt-btn:hover { transform: translateY(-1px); border-color: #aabbb0; background: #fbfcf8; }
.zt-btn:active { transform: translateY(0); }
.zt-btn-primary { color: #f5fbf4; border-color: var(--zt-forest-800); background: var(--zt-forest-800); }
.zt-btn-primary:hover { color: #fff; border-color: var(--zt-forest-700); background: var(--zt-forest-700); }
.zt-btn-accent { color: var(--zt-forest-950); border-color: var(--zt-acid); background: var(--zt-acid); }
.zt-btn-quiet { border-color: transparent; color: var(--zt-forest-700); background: transparent; }
.zt-btn[disabled], .zt-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.zt-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 23px; padding: 4px 8px; border: 1px solid var(--zt-line); border-radius: 999px; color: var(--zt-muted); background: #f7f8f3; font-size: 9px; font-weight: 850; letter-spacing: .025em; line-height: 1.15; }
.zt-badge-success { color: #126344; border-color: #c6e6d4; background: #eef8f1; }
.zt-badge-warning { color: #855710; border-color: #eeddb5; background: #fff8e9; }
.zt-badge-danger { color: #9e3e34; border-color: #f0cbc7; background: #fff1ef; }
.zt-badge-info { color: #2e6280; border-color: #c8dce8; background: #eff7fb; }
.zt-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }

/* Forms and data display */
.zt-field { display: grid; gap: 6px; min-width: 0; }
.zt-label { color: var(--zt-ink-soft); font-size: 11px; font-weight: 800; }
.zt-help { color: var(--zt-muted); font-size: 10px; line-height: 1.45; }
.zt-input, .zt-select, .zt-textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--zt-line-strong); border-radius: 10px; color: var(--zt-ink); background: #fff; font-size: 12px; line-height: 1.35; }
.zt-textarea { min-height: 100px; resize: vertical; }
.zt-input::placeholder, .zt-textarea::placeholder { color: #98a49c; }
.zt-table-wrap { width: 100%; overflow: auto; border: 1px solid var(--zt-line); border-radius: var(--zt-radius-md); background: #fff; }
.zt-table { width: 100%; border-collapse: collapse; color: var(--zt-ink); font-size: 11px; }
.zt-table th, .zt-table td { padding: 11px 13px; border-bottom: 1px solid #edf0e8; text-align: left; vertical-align: middle; }
.zt-table th { color: var(--zt-muted); background: #f7f8f3; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.zt-table tr:last-child td { border-bottom: 0; }
.zt-empty { padding: 28px 18px; border: 1px dashed var(--zt-line-strong); border-radius: var(--zt-radius-lg); color: var(--zt-muted); background: rgba(255,255,255,.52); text-align: center; }
.zt-empty strong { display: block; margin-bottom: 5px; color: var(--zt-ink); font-size: 13px; }

@media (max-width: 680px) {
  .zt-appbar { align-items: flex-start; gap: 12px; padding: 10px 12px; }
  .zt-appbar__identity { gap: 9px; }
  .zt-appbar__mark { width: 34px; height: 34px; border-radius: 10px; }
  .zt-appbar__title { font-size: 13px; }
  .zt-appbar__subtitle { max-width: 48vw; }
  .zt-appbar__return { min-height: 36px; padding: 7px 9px; font-size: 10px; }
  .zt-appbar__return-text { display: none; }
  .zt-page-shell { width: min(100% - 22px, 1440px); }
  .zt-page-header { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .zt-card, .zt-btn, .zt-wayfinder-back, .zt-appbar__return { transition: none !important; }
  .zt-card:hover, .zt-btn:hover, .zt-wayfinder-back:hover, .zt-appbar__return:hover { transform: none; }
}


/* V5 shared staff experience: accessible notifications and optional text sizing. */
.zt-notification-host { position:fixed; z-index:9999; right:18px; bottom:18px; display:grid; gap:8px; width:min(360px,calc(100vw - 36px)); pointer-events:none; }
.zt-notification { padding:12px 14px; border:1px solid rgba(255,255,255,.15); border-left:4px solid #76b98a; border-radius:12px; color:#f4faf3; background:#103b2d; box-shadow:0 15px 40px rgba(5,28,20,.24); font-size:12px; line-height:1.45; opacity:0; transform:translateY(8px); transition:opacity 180ms ease,transform 180ms ease; }
.zt-notification.is-visible { opacity:1; transform:translateY(0); }
.zt-notification--warning { border-left-color:#e1b45c; background:#62461e; }
.zt-notification--error { border-left-color:#e58d7b; background:#6b302a; }
html.zt-large-text .zt-appbar__title, html.zt-large-text .zt-wayfinder-back__copy strong { font-size:1.08em; }
html.zt-large-text .zt-page-description, html.zt-large-text .zt-label, html.zt-large-text .zt-help { font-size:1.08em; }
@media (max-width:600px) { .zt-notification-host { right:10px; bottom:10px; width:calc(100vw - 20px); } }
@media (prefers-reduced-motion:reduce) { .zt-notification { transition:none; } }
