/* Inherit the app's color-scheme and semantic colors. System preference is the
 * host's decision: a light-only app must stay light on a dark OS. */
.jz-directory { --jzd-bg:var(--surface,var(--paper,light-dark(#fff,#192b36))); --jzd-text:var(--text,var(--ink,light-dark(#192d3c,#e9f0f3))); --jzd-muted:var(--text-muted,var(--muted,light-dark(#667782,#b0c0c9))); --jzd-line:var(--border,var(--line,light-dark(#dbe3e7,#435b68))); --jzd-accent:var(--accent,var(--teal,light-dark(#244e68,#77afd0))); --jzd-danger:light-dark(#a62424,#ffb4ab); color:var(--jzd-text); font:400 14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; min-width:0; }
.jz-directory *, .jz-directory *::before, .jz-directory *::after { box-sizing:border-box; }
.jz-directory header { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; margin-bottom:24px; }
.jz-directory h1 { font-size:28px; line-height:1.2; margin:4px 0 10px; font-weight:650; letter-spacing:-.025em; }
.jz-directory h2 { font-size:23px; line-height:1.25; margin:0 0 8px; }
.jzd-eyebrow { font-size:11px; letter-spacing:.12em; font-weight:700; text-transform:uppercase; color:var(--jzd-muted); margin:0; }
.jzd-description { color:var(--jzd-muted); margin:0; max-width:640px; }
.jzd-actions,.jzd-row-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.jz-directory button,.jz-directory a { font:inherit; }
.jz-directory button { border:1px solid var(--jzd-line); border-radius:7px; min-height:38px; padding:8px 13px; background:var(--jzd-bg); color:var(--jzd-text); cursor:pointer; }
.jz-directory button:hover { border-color:var(--jzd-accent); }
.jz-directory button:disabled { opacity:.5; cursor:default; }
.jz-directory a { color:var(--jzd-accent); padding:8px; text-decoration:underline; text-underline-offset:3px; }
.jz-directory :focus-visible { outline:2px solid var(--jzd-accent); outline-offset:3px; }
.jzd-filters { display:flex; gap:12px; align-items:center; margin-bottom:20px; }
.jzd-filters input { width:min(320px,100%); }
.jzd-filters span { margin-left:auto; color:var(--jzd-muted); white-space:nowrap; }
.jz-directory input,.jz-directory select,.jz-directory textarea { font:inherit; min-width:0; border:1px solid var(--jzd-line); background:var(--jzd-bg); color:var(--jzd-text); border-radius:6px; padding:10px 12px; min-height:42px; }
.jz-directory textarea { resize:vertical; min-height:88px; }
.jzd-table-wrap { border:1px solid var(--jzd-line); border-radius:10px; overflow:auto; background:var(--jzd-bg); }
.jz-directory table { border-collapse:collapse; width:100%; min-width:640px; text-align:left; }
.jz-directory th { font-size:11px; color:var(--jzd-muted); font-weight:650; background:color-mix(in srgb,var(--jzd-bg) 96%,var(--jzd-text)); }
.jz-directory th,.jz-directory td { padding:16px 18px; border-bottom:1px solid var(--jzd-line); vertical-align:middle; }
.jz-directory tbody tr:last-child td { border-bottom:0; }
.jz-directory strong { font-weight:600; }
.jzd-sub { display:block; color:var(--jzd-muted); font-size:12px; margin-top:3px; }
.jzd-row-actions { display:table-cell; white-space:nowrap; text-align:right; }
.jzd-row-actions button + button { margin-left:6px; }
.jzd-empty,.jzd-message { padding:20px; border:1px solid var(--jzd-line); border-radius:8px; }
.jzd-message[hidden],.jzd-error[hidden] { display:none; }
.jzd-dialog { position:fixed; width:min(640px,calc(100% - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:28px; border:1px solid var(--jzd-line); border-radius:14px; background:var(--jzd-bg); color:var(--jzd-text); box-shadow:0 16px 80px #0003; overflow:auto; }
.jzd-dialog::backdrop { background:#0e1c2990; }
.jzd-fields { display:grid; gap:18px; margin-top:24px; }
.jzd-fields label { display:grid; gap:7px; font-weight:600; }
.jzd-fields input,.jzd-fields select,.jzd-fields textarea { width:100%; font-weight:400; }
.jzd-children { border-top:1px solid var(--jzd-line); padding-top:4px; }
.jzd-children h3 { font-size:16px; }
.jzd-children fieldset { border:1px solid var(--jzd-line); border-radius:8px; padding:16px; margin:0 0 14px; display:grid; gap:14px; min-width:0; }
.jzd-children legend { padding:0 6px; color:var(--jzd-muted); }
.jzd-dialog footer { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; padding-top:20px; border-top:1px solid var(--jzd-line); }
.jzd-dialog button[type=submit] { background:var(--jzd-accent); color:var(--jzd-bg); border-color:var(--jzd-accent); }
.jzd-error { color:var(--jzd-danger); border:1px solid currentColor; padding:12px; border-radius:6px; }
.jzd-two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.jzd-number-control { display:flex; gap:8px; }
.jzd-number-control input { flex:1; width:0; }
.jzd-number-control button { flex-shrink:0; }
.jzd-number { font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
.jz-directory th button { display:flex; gap:8px; align-items:center; width:100%; border:0; padding:0; background:transparent; font-size:12px; font-weight:650; text-align:left; white-space:nowrap; }
.jzd-icon-button,.jzd-more summary { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; padding:8px!important; border:1px solid var(--jzd-line); border-radius:7px; background:var(--jzd-bg); cursor:pointer; vertical-align:middle; }
.jzd-more { display:inline-block; margin-left:6px; }
.jzd-more summary { list-style:none; }
.jzd-more summary::-webkit-details-marker { display:none; }
.jzd-icon-button svg,.jzd-more svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.jzd-menu { position:fixed; z-index:50; min-width:180px; padding:6px; background:var(--jzd-bg); border:1px solid var(--jzd-line); border-radius:8px; box-shadow:0 8px 30px #0003; }
.jzd-menu button { display:block; width:100%; text-align:left; margin:0!important; border:0; }
.jzd-fields [hidden] { display:none!important; }
@media(max-width:500px) { .jzd-two { grid-template-columns:1fr; } }
[data-theme=dark] .jz-directory,.dark .jz-directory,.jz-directory[data-theme=dark] { --jzd-bg:#192b36; --jzd-text:#e9f0f3; --jzd-muted:#b0c0c9; --jzd-line:#435b68; --jzd-accent:#77afd0; color-scheme:dark; }
@media(max-width:700px) { .jz-directory header { flex-direction:column; gap:16px; } .jzd-filters { flex-wrap:wrap; } .jzd-filters input { flex:1; width:160px; } .jzd-filters span { width:100%; margin-left:0; } .jzd-dialog { padding:20px; } .jzd-fields input,.jzd-fields select,.jzd-fields textarea { font-size:16px; } }

.jzd-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:18px;margin:18px 0;}
.jzd-card {border:1px solid var(--jzd-line);border-radius:12px;padding:20px;background:var(--jzd-bg);overflow-wrap:anywhere;}
.jzd-card h3 {margin:0 0 12px;font-size:17px;}
.jzd-address {white-space:pre-line;}
.jzd-detail-section {margin-top:28px;}
.jzd-actions[role=group] {justify-content:flex-end;margin:0 0 16px;}
.jzd-actions button[aria-pressed=true] {background:var(--jzd-accent);color:var(--jzd-bg);}

.jzd-customer-options {max-height:230px;overflow:auto;border:1px solid var(--jzd-line);border-radius:8px;padding:6px;}
.jzd-customer-options button {display:block;width:100%;border:0;text-align:left;}
.jzd-customer-options button[aria-selected=true] {background:var(--jzd-accent);color:var(--jzd-bg);}
.jzd-address-options {max-height:240px;overflow:auto;border:1px solid var(--jzd-line);border-radius:8px;padding:6px;}
.jzd-address-options button {display:block;width:100%;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere;}
.jzd-address-options button[aria-selected=true],.jzd-address-options button:hover {background:var(--jzd-accent);color:var(--jzd-bg);}

.jzd-row-actions .jzd-actions {flex-wrap:nowrap;justify-content:flex-end;}
.jzd-tabs {display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--jzd-line);margin:0 0 20px;padding-bottom:12px;}
.jzd-tabs button[aria-pressed=true] {background:var(--jzd-accent);color:var(--jzd-bg);}
