 :root {
     --bg: #f6f7fb;
     --panel: #ffffff;
     --elev: #ffffff;
     --ink: #111827;
     /* slate-900 */
     --muted: #6b7280;
     /* slate-500 */
     --brand: #16a34a;
     /* green-600 */
     --brand-ink: #ffffff;
     --danger: #dc2626;
     /* red-600 */
     --warning: #f59e0b;
     /* amber-500 */
     --ok: #16a34a;
     /* green-600 */
     --stroke: #e5e7eb;
     /* gray-200 */
     --chip: #f3f4f6;
     /* gray-100 */
     --focus: 0 0 0 3px rgba(22, 163, 74, 0.25);
     --radius: 16px;
     --radius-sm: 12px;
     --radius-xs: 10px;
     --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
 }

 * {
     box-sizing: border-box;
 }

 html,
 body {
     height: 100%;
 }

 body {
     margin: 0;
     font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
     background: var(--bg);
     color: var(--ink);
 }

 /* Shell */
main {
    display: flex;
    flex-direction: column;
    padding: 24px 32px 100px 32px;
    box-sizing: border-box;
    max-width: 1000px;
}

 #base-nav {
     position: sticky;
     top: 0;
     z-index: 50;
 }

 .page {
     width: min(1200px, 94vw);
     margin: 24px auto 80px;
 }

 /* Breadcrumbs */
 .crumbs {
     display: flex;
     align-items: center;
     gap: 8px;
     color: var(--muted);
     font-size: 14px;
 }

 .crumbs a {
     color: var(--muted);
     text-decoration: none;
 }

 .crumbs a:hover {
     color: var(--ink);
 }

 .page-title {
     margin: 18px 0 22px;
     font-size: clamp(20px, 2.6vw, 28px);
     font-weight: 700;
     letter-spacing: .2px;
 }

 /* Layout cards */
 .cards {
     display: grid;
     gap: 18px;
 }

 @media (min-width: 920px) {
     .cards {
         grid-template-columns: 1fr;
     }
 }

 .card {
     background: var(--panel);
     border: 1px solid var(--stroke);
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     padding: clamp(16px, 2.2vw, 24px);
 }

 .card h2 {
     margin: 0;
     font-size: 18px;
     letter-spacing: .2px;
 }

 /* Grid rows */
 .row {
     display: grid;
     gap: 12px;
     margin-top: 14px;
 }

 @media (min-width: 700px) {
     .row.cols-2 {
         grid-template-columns: 1fr 1fr;
     }

     .row.cols-3 {
         grid-template-columns: 1fr 1fr 1fr;
     }
 }

 /* Fields */
 label.field {
     display: grid;
     gap: 8px;
     font-weight: 500;
 }

 .req {
     color: var(--warning);
     font-size: 12px;
     margin-left: 6px;
 }

 .hint {
     color: var(--muted);
     font-size: 12px;
 }

 input[type="text"],
 input[type="email"],
 input[type="tel"],
 input[type="number"],
 input[type="date"],
 select,
 textarea {
     width: 100%;
     background: #ffffff;
     border: 1px solid var(--stroke);
     border-radius: var(--radius-xs);
     color: var(--ink);
     padding: 12px 12px;
     outline: none;
     transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
 }

 textarea {
     min-height: 120px;
     resize: vertical;
 }

 input:focus,
 select:focus,
 textarea:focus {
     box-shadow: var(--focus);
     border-color: #c7d2fe;
 }

 /* Disabled state */
 .disabled-input {
     opacity: .6;
     pointer-events: none;
     background: #f0f0f0 !important;
 }

 /* Inline helpers */
 .inline {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
 }

 /* Switch */
 .switch {
     position: relative;
     display: inline-block;
     width: 46px;
     height: 28px;
 }

 .switch input {
     opacity: 0;
     width: 0;
     height: 0;
 }

 .slider {
     position: absolute;
     cursor: pointer;
     inset: 0;
     background-color: #e5e7eb;
     transition: .2s;
     border-radius: 999px;
     border: 1px solid var(--stroke);
 }

 .slider:before {
     position: absolute;
     content: "";
     height: 20px;
     width: 20px;
     left: 4px;
     top: 3px;
     background: #9ca3af;
     transition: .2s;
     border-radius: 50%;
 }

 .switch input:checked+.slider {
     background: #dcfce7;
     border-color: #bbf7d0;
 }

 .switch input:checked+.slider:before {
     transform: translateX(18px);
     background: var(--brand);
 }

 /* Chips / readouts */
 .chip {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: var(--chip);
     border: 1px solid var(--stroke);
     border-radius: 999px;
     padding: 8px 12px;
     color: var(--ink);
 }

 /* Alerts & errors */
 .alert {
     background: #fff7ed;
     /* orange-50 */
     border: 1px solid #fed7aa;
     /* orange-200 */
     color: #7c2d12;
     /* orange-900 */
     padding: 12px 14px;
     border-radius: var(--radius-sm);
     font-size: 14px;
     display: none;
 }

 .field-error {
     border-color: var(--danger) !important;
 }

 .error-text {
     color: var(--danger);
     font-size: 12px;
     margin-top: 6px;
     display: none;
 }

 .error-banner {
     display: none;
     align-items: center;
     gap: 10px;
     margin: 8px 0 0;
     padding: 12px 14px;
     border-radius: var(--radius-sm);
     border: 1px solid #fecaca;
     /* rose-200 */
     background: #fff1f2;
     /* rose-50 */
     color: #7f1d1d;
     /* rose-900 */
 }

 /* Actions / buttons */
 .actions {
     display: flex;
     gap: 12px;
     justify-content: flex-end;
     margin-top: 20px;
 }

 .btn {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     border: 1px solid #e5e7eb;
     border-radius: 999px;
     padding: 12px 16px;
     font-weight: 600;
     cursor: pointer;
     background: var(--chip);
     color: var(--ink);
     transition: transform .08s ease, background .2s ease, opacity .2s ease, border-color .2s ease;
 }

 .btn:hover {
     background: #eaecef;
     border-color: #d1d5db;
 }

 .btn:active {
     transform: translateY(1px);
 }

 .btn.primary {
     background: var(--brand);
     color: var(--brand-ink);
     border-color: var(--brand);
 }

 .btn.primary:hover {
     filter: brightness(0.95);
 }

 .btn[disabled] {
     opacity: .6;
     cursor: not-allowed;
 }

 /* Uploader */
 .uploader {
     border: 1px dashed var(--stroke);
     border-radius: var(--radius);
     padding: 16px;
     background: #ffffff;
 }

 /* Progress overlay */
 .saving-popup {
     position: fixed;
     inset: 0;
     display: none;
     place-items: center;
     background: rgba(2, 6, 23, 0.25);
 }

 .popup-content {
     background: var(--elev);
     padding: 20px 24px;
     border: 1px solid var(--stroke);
     border-radius: var(--radius);
     min-width: 300px;
     text-align: center;
     box-shadow: var(--shadow);
 }

 progress {
     width: 100%;
     height: 10px;
     border-radius: 999px;
     overflow: hidden;
 }

 /* Small utility */
 .material-symbols-outlined {
     font-variation-settings: 'wght' 500;
 }