/* Tajwal Links, admin. Light only: it is a work tool used at a desk. */

:root {
  --primary: #0010FF;
  --primary-ink: #000BB3;
  --primary-soft: #E8EAFF;
  --ink: #12162B;
  --muted: #667085;
  --border: #E3E6EE;
  --surface: #FFFFFF;
  --background: #F5F6FA;
  --danger: #D93B30;
  --danger-soft: #FBE6E3;
  --ok: #0E7C4A;
  --ok-soft: #E3F5EC;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Rubik Admin', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@font-face { font-family: 'Rubik Admin'; src: url('../fonts/rubik-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; font-display: swap; }
@font-face { font-family: 'Rubik Admin'; src: url('../fonts/rubik-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
body.adm { margin: 0; background: var(--background); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 10px; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.adm-muted { color: var(--muted); }
small.adm-muted, .adm-field small { font-size: 12.5px; }

/* ---------------------------------------------------------------- Chrome */

.adm-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.adm-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.adm-brand img { width: 28px; height: 28px; object-fit: contain; }
.adm-nav { display: flex; align-items: center; gap: 4px; }
.adm-nav a, .adm-link-btn { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
.adm-nav a:hover, .adm-link-btn:hover { background: var(--background); }
.adm-nav form { margin: 0; }

.adm-main { padding: 28px 24px 64px; }
.adm-wide .adm-main { padding: 0; }
.adm-bare .adm-main { padding: 0; }

.adm-container { max-width: 1120px; margin: 0 auto; }
.adm-container.is-narrow { max-width: 640px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.adm-back { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-size: 14px; }
.adm-back::before { content: "\2039  "; }
.adm-back:hover { color: var(--ink); }

.adm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.adm-card + .adm-card { margin-top: 16px; }
.adm-empty { text-align: center; padding: 48px 20px; }

/* ---------------------------------------------------------------- Buttons & fields */

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.adm-btn:hover { border-color: #C9CEDB; background: #FAFBFD; }
.adm-btn:disabled { opacity: .6; cursor: default; }
.adm-btn.is-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.adm-btn.is-primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.adm-btn.is-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.adm-btn.is-danger-text { color: var(--danger); }
.adm-btn.is-danger-text:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.adm-btn.is-small { min-height: 32px; padding: 0 12px; font-size: 13.5px; }
.adm-btn.is-block { width: 100%; }
.adm-btn:focus-visible, .ed-tabs button:focus-visible, .ed-grip:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }

.adm-form { display: flex; flex-direction: column; gap: 16px; }
.adm-form h2 { margin: 0; }
.adm-field { display: flex; flex-direction: column; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.adm-field > span, .adm-field legend, .ed-field-label { font-size: 13.5px; font-weight: 600; color: #344054; padding: 0; }
.adm-field legend { margin-bottom: 6px; }
.adm input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
.adm select,
.adm textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.adm textarea { resize: vertical; min-height: 80px; }
.adm input:focus, .adm select:focus, .adm textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.adm-error { color: var(--danger); font-size: 13px; }
.adm-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.adm-prefixed { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.adm-prefixed span { display: flex; align-items: center; padding: 0 10px; background: var(--background); color: var(--muted); font-size: 14px; border-inline-end: 1px solid var(--border); white-space: nowrap; }
.adm .adm-prefixed input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.adm-prefixed:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.adm-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); align-self: flex-start; }
.adm-segmented label { position: relative; }
.adm-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.adm-segmented span { display: block; padding: 6px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.adm-segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.adm-segmented input:focus-visible + span { outline: 2px solid var(--primary); }

.adm-alert { padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; font-size: 14px; }
.adm-alert.is-error { background: var(--danger-soft); color: #8F1F17; }
.adm-alert.is-ok { background: var(--ok-soft); color: var(--ok); }

.adm-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--background); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.adm-pill.is-green { background: var(--ok-soft); color: var(--ok); }
.adm-pill.is-blue { background: var(--primary-soft); color: var(--primary); }

.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: start; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.adm-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table .nowrap { white-space: nowrap; }
.adm-cell-actions { text-align: end; }
.adm-cell-actions form { margin: 0; }

/* ---------------------------------------------------------------- Toasts */

.adm-toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.adm-toast { padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(16, 24, 40, .2); animation: adm-in .2s ease; transition: opacity .3s, transform .3s; }
.adm-toast.is-error { background: var(--danger); }
.adm-toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes adm-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- Login */

.adm-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #E3E6FF, var(--background) 60%); }
.adm-auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(16, 24, 40, .08); }
.adm-auth-card h1 { font-size: 22px; margin: 4px 0 0; }
.adm-auth-card p { margin: 0 0 6px; }
.adm-auth-logo { width: 44px; height: 44px; object-fit: contain; }
.adm-auth-card .adm-auth-lang { margin: 0; text-align: center; font-size: 13px; }

/* ---------------------------------------------------------------- Pages list */

.adm-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.adm-page-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.adm-page-card + .adm-page-card { margin-top: 0; }
.adm-page-swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 150px; padding: 22px 40px 0; overflow: hidden; }
.adm-page-swatch img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 4px; }
.adm-swatch-btn { display: block; width: 100%; height: 26px; flex: none; }
.adm-page-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.adm-page-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-page-title h2 { margin: 0; font-size: 17px; }
.adm-page-url { font-size: 14px; color: var(--muted); text-decoration: none; }
.adm-page-url:hover { color: var(--primary); }
.adm-page-stats { display: flex; gap: 24px; margin: 8px 0; }
.adm-page-stats dt { font-size: 12px; color: var(--muted); }
.adm-page-stats dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-page-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-page-actions .adm-btn { min-height: 34px; padding: 0 12px; font-size: 14px; }

/* ---------------------------------------------------------------- Theme presets */

.adm-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.adm-preset { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; background: none; border: 0; cursor: pointer; text-align: center; }
.adm-preset input { position: absolute; opacity: 0; }
.adm-preset-swatch { display: flex; flex-direction: column; justify-content: center; gap: 6px; height: 118px; padding: 12px; border-radius: 12px; border: 2px solid var(--border); transition: border-color .12s, transform .12s; }
.adm-preset-swatch i { display: block; height: 16px; }
.adm-preset:hover .adm-preset-swatch { transform: translateY(-2px); }
.adm-preset input:checked + .adm-preset-swatch { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.adm-preset input:focus-visible + .adm-preset-swatch { outline: 2px solid var(--primary); }
.adm-preset-name { font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------------- Editor layout */

.ed-top {
  position: sticky;
  top: 60px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ed-top .adm-back { margin: 0; }
.ed-top-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.ed-top-title strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-url { font-size: 13px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-top-actions { display: flex; align-items: center; gap: 10px; }
.ed-save { font-size: 13px; color: var(--muted); min-width: 64px; text-align: end; }
.ed-save.is-saving { color: var(--primary); }
.ed-save.is-error { color: var(--danger); font-weight: 600; }

.ed-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 420px;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  align-items: start;
}

.ed-tabs { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 2px; }
.ed-tabs button { text-align: start; padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font-weight: 500; cursor: pointer; }
.ed-tabs button:hover { background: var(--surface); color: var(--ink); }
.ed-tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }

.ed-panel { min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 16px; }

.ed-preview { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ed-preview-toolbar { display: flex; align-items: center; justify-content: space-between; width: 380px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ed-phone { width: 380px; height: min(780px, calc(100vh - 200px)); padding: 10px; border-radius: 44px; background: #11131A; box-shadow: 0 24px 60px rgba(16, 24, 40, .18); }
.ed-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #fff; }
.ed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ed-frame.is-loading { visibility: hidden; }
.ed-preview-fab { display: none; }

@media (max-width: 1280px) {
  .ed-body { grid-template-columns: 170px minmax(0, 1fr); }
  .ed-preview { display: none; }
  .ed-preview-fab {
    display: block;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .3);
    cursor: pointer;
  }
  .ed-show-preview .ed-preview {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 25;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 19, 26, .6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .ed-show-preview .ed-preview-toolbar { color: #fff; }
  .ed-show-preview .ed-phone { height: min(780px, calc(100vh - 100px)); }
}

@media (max-width: 820px) {
  .ed-top { flex-wrap: wrap; padding: 10px 16px; top: 60px; }
  .ed-top-actions { width: 100%; flex-wrap: wrap; }
  .ed-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .ed-tabs { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .ed-tabs button { white-space: nowrap; }
  .ed-phone { width: min(380px, 100%); }
  .ed-preview-toolbar { width: min(380px, 100%); }
  .adm-bar { padding: 0 16px; }
  .adm-main { padding: 20px 16px 64px; }
}

/* ---------------------------------------------------------------- Editor sections */

.ed-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ed-section h2 { margin: 0; }
.ed-section.is-danger { border-color: #F3C9C4; }
.ed-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-sub { margin: 4px 0 0; font-size: 14px; color: #344054; }
.ed-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ed-empty { text-align: center; color: var(--muted); padding: 32px 16px; background: var(--surface); border: 1px dashed #CDD2DE; border-radius: var(--radius); margin: 0; }

/* Links */
.ed-quick { display: flex; gap: 8px; }
.ed-quick-input { flex: 1; }
.ed-type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.ed-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.ed-link-list, .ed-social-list { display: flex; flex-direction: column; gap: 10px; }
.ed-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 12px 8px; transition: box-shadow .15s, opacity .15s; }
.ed-link.is-off { opacity: .6; }
.ed-link.is-dragging, .ed-social-row.is-dragging { box-shadow: 0 16px 40px rgba(16, 24, 40, .16); position: relative; z-index: 2; }
.ed-link-row { display: flex; align-items: flex-start; gap: 8px; }
.ed-grip { flex: none; display: grid; place-items: center; width: 30px; height: 36px; border: 0; background: none; color: #98A2B3; border-radius: 8px; cursor: grab; touch-action: none; }
.ed-grip:hover { background: var(--background); color: var(--ink); }
.ed-grip:active { cursor: grabbing; }
.ed-link-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-link-type { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.ed-link-main { display: flex; flex-direction: column; gap: 6px; }
.adm .ed-link-title { font-weight: 600; }
.adm .ed-link-url { color: #475467; font-size: 14px; }
.ed-link-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-inline-start: 38px; }
.ed-link-details { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 4px 38px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Switch */
.ed-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.ed-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ed-switch-track { position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; background: #D0D5DD; transition: background .15s; }
.ed-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.ed-switch input:checked + .ed-switch-track { background: var(--primary); }
.ed-switch input:checked + .ed-switch-track::after { transform: translateX(16px); }
.ed-switch input:focus-visible + .ed-switch-track { outline: 3px solid var(--primary-soft); }

/* Image */
.ed-image { display: flex; align-items: center; gap: 14px; }
.ed-image-thumb { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--background) repeating-conic-gradient(#EEF0F5 0 25%, transparent 0 50%) 0 0 / 14px 14px; border: 1px solid var(--border); overflow: hidden; font-size: 11px; color: var(--muted); }
.ed-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ed-image-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Design */
.ed-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ed-group summary { padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.ed-group summary::-webkit-details-marker { display: none; }
.ed-group summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; }
.ed-group[open] summary::after { content: "\2212"; }
.ed-group[open] summary { border-bottom: 1px solid var(--border); }
.ed-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 20px; padding: 18px 20px 20px; }
.ed-field.is-font, .ed-field.is-css, .ed-field.is-textarea, .ed-field.is-image { grid-column: 1 / -1; }

.ed-color { display: flex; align-items: center; gap: 8px; }
.ed-color input[type="color"] { width: 40px; height: 40px; flex: none; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.adm .ed-hex { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; text-transform: uppercase; }

.ed-range { display: flex; align-items: center; gap: 10px; }
.ed-range input[type="range"] { flex: 1; accent-color: var(--primary); }
.adm .ed-range-num { width: 72px; flex: none; text-align: end; }
.ed-range .adm-muted { width: 26px; font-size: 12.5px; }

.ed-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ed-font { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: start; }
.ed-font b { font-size: 22px; line-height: 1.1; font-weight: 600; }
.ed-font span { font-size: 12.5px; color: var(--muted); font-family: var(--font); }
.ed-font:hover { border-color: #C9CEDB; }
.ed-font[aria-checked="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.adm .ed-code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; }

/* Social */
.ed-social-row { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ed-social-row select { width: 150px; flex: none; }
.ed-social-row input { flex: 1; min-width: 0; }
.ed-social-icon { display: grid; place-items: center; width: 32px; flex: none; color: var(--ink); }
.ed-social-icon svg, .ed-platform svg { width: 20px; height: 20px; }
.ed-platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.ed-platform { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.ed-platform:hover { border-color: var(--primary); color: var(--primary); }
.ed-platform small { font-size: 12px; }

/* Settings QR */
.ed-qr { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ed-qr-img svg { width: 150px; height: 150px; display: block; border: 1px solid var(--border); border-radius: 12px; }
.ed-qr-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ed-qr-url { margin: 0; font-weight: 600; word-break: break-all; }

/* Analytics */
.ed-analytics { display: flex; flex-direction: column; gap: 16px; }
.ed-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ed-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.ed-tile span { font-size: 13px; color: var(--muted); font-weight: 500; }
.ed-tile strong { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ed-tile small { font-size: 12px; color: var(--muted); }
.ed-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.ed-card h3 { margin: 0 0 10px; }
.ed-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ed-card-head h3 { margin: 0; }
.ed-legend { display: flex; gap: 16px; font-size: 13px; color: #344054; margin-bottom: 6px; }
.ed-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ed-legend i, .ed-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.ed-chart-inner { position: relative; }
.ed-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ed-chart-svg .grid { stroke: #EEF0F4; stroke-width: 1; }
.ed-chart-svg .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ed-chart-svg .crosshair { stroke: #98A2B3; stroke-width: 1; stroke-dasharray: 3 3; }
.ed-tip { position: absolute; top: 8px; min-width: 140px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); font-size: 13px; pointer-events: none; }
.ed-tip strong { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ed-tip div { display: flex; align-items: center; gap: 6px; }
.ed-tip b { font-variant-numeric: tabular-nums; }
.ed-table-wrap { overflow-x: auto; }
.ed-bar-cell { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.ed-bar-cell span { overflow-wrap: anywhere; }
.ed-bar-cell i { display: block; height: 4px; border-radius: 4px; background: var(--primary); min-width: 2px; }
.ed-msg { max-width: 280px; white-space: pre-wrap; overflow-wrap: anywhere; }
