:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --sidebar: #0d1220;
  --sidebar-soft: #171d2d;
  --text: #151927;
  --muted: #7b8499;
  --line: #e7eaf1;
  --line-2: #eff1f5;
  --primary: #6d4aff;
  --primary-2: #8b6cff;
  --primary-soft: #f0ecff;
  --cyan: #26bfd0;
  --green: #23ad75;
  --red: #e25263;
  --orange: #f39b4a;
  --shadow: 0 14px 38px rgba(31, 38, 68, .07);
  --shadow-lg: 0 28px 80px rgba(7, 11, 24, .24);
  --radius: 18px;
  --sidebar-width: 236px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.dashboard-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 27px 17px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 3%, rgba(117, 82, 255, .22), transparent 28%),
    linear-gradient(180deg, #101625 0%, #0b101b 100%);
  border-right: 1px solid rgba(255,255,255,.045);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 29px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  font-size: 19px; font-weight: 900; background: linear-gradient(145deg, #7656ff, #a48cff);
  box-shadow: 0 8px 24px rgba(109,74,255,.34);
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 17px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 5px; color: #808ba5; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.side-nav { display: grid; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 9px 11px;
  color: #8f99ae; border-radius: 11px; text-decoration: none; font-size: 13px; font-weight: 650;
  transition: .18s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(109,74,255,.23), rgba(109,74,255,.08)); box-shadow: inset 3px 0 #7959ff; }
.nav-icon { width: 25px; height: 25px; display: grid; place-items: center; color: #b9c1d2; font-size: 17px; }
.sidebar-spacer { flex: 1; min-height: 30px; }
.session-card {
  display: flex; gap: 10px; padding: 13px; margin: 0 3px 15px; border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; background: rgba(255,255,255,.035);
}
.session-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #a895ff; background: rgba(109,74,255,.16); }
.session-card span { display: block; color: #778197; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.session-card strong { display: block; margin: 3px 0 5px; font-size: 11px; }
.session-card small { display: block; color: #6e788f; font-size: 9px; line-height: 1.5; }
.sidebar-footer { padding: 0 8px; color: #4d566a; font-size: 8px; letter-spacing: .18em; }

.main-content { width: 100%; margin-left: 0; padding: 30px 34px 24px; }
.main-header {
  max-width: 1500px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.breadcrumb { color: #a0a7b6; font-size: 11px; font-weight: 650; }
.breadcrumb span { padding: 0 5px; color: #c5cad5; }
.main-header h1 { margin: 6px 0 4px; font-size: clamp(27px, 3vw, 34px); line-height: 1.05; letter-spacing: -.04em; }
.main-header p { margin: 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border: 1px solid #dcefe6;
  border-radius: 10px; color: #187354; background: #f5fbf8; font-size: 11px; font-weight: 750; white-space: nowrap;
}
.status-pill span { width: 7px; height: 7px; background: #2bb17b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(43,177,123,.10); }
.status-pill.bad { color: #aa3c4b; border-color: #f2d8dc; background: #fff8f9; }
.status-pill.bad span { background: var(--red); box-shadow: 0 0 0 4px rgba(226,82,99,.10); }
.header-refresh {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #69728a; font-size: 18px;
  box-shadow: 0 4px 14px rgba(25,32,57,.04); transition: .18s;
}
.header-refresh:hover { color: var(--primary); border-color: #d7d0ff; transform: translateY(-1px); }
.header-refresh:disabled { opacity: .55; cursor: wait; }

.create-card {
  max-width: 1500px; min-height: 344px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(320px, .86fr);
  overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow);
}
.create-form-side { padding: 30px 32px 31px; }
.section-kicker { color: var(--primary); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.create-form-side h2, .links-header h2 { margin: 7px 0 5px; font-size: 22px; letter-spacing: -.025em; }
.section-desc { max-width: 620px; margin: 0 0 25px; color: var(--muted); font-size: 12px; line-height: 1.6; }
#createForm { display: grid; gap: 18px; }
.field label { display: block; margin-bottom: 7px; color: #4c5569; font-size: 11px; font-weight: 760; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.label-row label { margin-bottom: 7px; }
.text-button { margin-bottom: 6px; padding: 0; border: 0; color: var(--primary); background: transparent; font-size: 10px; font-weight: 750; }
.input-shell, .suffix-input {
  height: 47px; display: flex; align-items: center; border: 1px solid #dfe3eb; border-radius: 11px; background: #fff;
  box-shadow: 0 1px 2px rgba(20,25,40,.02); transition: .18s ease;
}
.input-shell:focus-within, .suffix-input:focus-within { border-color: #a995ff; box-shadow: 0 0 0 3px rgba(109,74,255,.09); }
.field-icon { width: 43px; text-align: center; color: #9aa3b7; font-size: 18px; }
.input-shell input, .suffix-input input { min-width: 0; flex: 1; height: 100%; padding: 0 12px 0 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 13px; }
.input-shell input::placeholder, .suffix-input input::placeholder, .search-box input::placeholder { color: #b1b8c7; }
.suffix-input { background: #fafbfc; }
.domain-prefix { padding: 0 0 0 13px; color: #727b8f; font-size: 12px; white-space: nowrap; }
.suffix-input input { padding-left: 2px; }
.dice-btn { width: 39px; height: 37px; margin-right: 5px; border: 0; border-radius: 8px; color: #866bff; background: var(--primary-soft); pointer-events: none; }
.field-help { display: block; margin-top: 7px; color: #9aa2b2; font-size: 9.5px; line-height: 1.45; }
.primary-btn {
  width: fit-content; min-width: 156px; height: 45px; display: inline-grid; place-items: center; padding: 0 19px; border: 0; border-radius: 10px;
  color: #fff; background: linear-gradient(135deg, #6844ff, #7b5aff); font-size: 11px; font-weight: 800;
  box-shadow: 0 10px 22px rgba(109,74,255,.23); transition: .18s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(109,74,255,.28); }
.primary-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.primary-btn b { margin-left: 12px; font-size: 16px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.preview-side {
  position: relative; isolation: isolate; min-height: 344px; display: flex; flex-direction: column; padding: 23px 25px;
  overflow: hidden; color: #fff; background:
    radial-gradient(circle at 68% 20%, rgba(163,132,255,.26), transparent 25%),
    linear-gradient(145deg, #211941 0%, #18152d 55%, #131728 100%);
}
.preview-glow { position: absolute; z-index: -1; width: 290px; height: 290px; right: -110px; bottom: -115px; border-radius: 50%; background: rgba(109,74,255,.27); filter: blur(2px); }
.preview-head { display: flex; justify-content: space-between; align-items: center; color: #827d9c; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: #8e8aa2; }
.live-dot i { width: 6px; height: 6px; border-radius: 50%; background: #34c48a; box-shadow: 0 0 0 4px rgba(52,196,138,.10); }
.preview-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 17px 8px 5px; }
.preview-logo { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 12px; font-weight: 900; background: linear-gradient(145deg, #7451ff, #9e85ff); box-shadow: 0 12px 25px rgba(109,74,255,.26); }
.preview-content > p { margin: 0 0 7px; color: #8d87a4; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.preview-link { width: 100%; color: #fff; font-size: clamp(17px, 1.8vw, 24px); font-weight: 760; letter-spacing: -.025em; word-break: break-all; }
.preview-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 27px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.035); }
.preview-note > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: #65dcaa; background: rgba(52,196,138,.12); font-size: 10px; }
.preview-note strong { display: block; font-size: 10px; }
.preview-note small { display: block; margin-top: 3px; color: #7e7893; font-size: 8.5px; line-height: 1.45; }
.preview-grid { position: absolute; z-index: -1; inset: auto -20px -45px auto; width: 240px; height: 160px; opacity: .12; transform: rotate(-8deg); background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to top, #000, transparent); }

.metrics { max-width: 1500px; margin: 16px auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card {
  position: relative; min-width: 0; padding: 17px 18px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff;
  box-shadow: 0 5px 18px rgba(31,38,68,.035); overflow: hidden;
}
.metric-card::after { content: ""; position: absolute; width: 62px; height: 62px; right: -21px; top: -23px; border-radius: 50%; opacity: .08; background: currentColor; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; float: left; margin: 1px 11px 0 0; border-radius: 9px; font-size: 14px; font-weight: 800; }
.metric-main { min-width: 0; }
.metric-main span { display: block; color: #7e8799; font-size: 10px; font-weight: 650; }
.metric-main strong { display: block; margin-top: 2px; font-size: 24px; line-height: 1.05; letter-spacing: -.035em; }
.metric-card > small { display: block; clear: both; padding-top: 11px; color: #a0a7b5; font-size: 9px; }
.metric-links { color: #7050ef; }.metric-links .metric-icon { color: #7050ef; background: #f0ecff; }
.metric-clicks { color: #21a9bc; }.metric-clicks .metric-icon { color: #21a9bc; background: #eafafd; }
.metric-today { color: #f18d38; }.metric-today .metric-icon { color: #e88939; background: #fff4e9; }
.metric-ip { color: #31a56e; }.metric-ip .metric-icon { color: #2b9c67; background: #eaf8f1; }
.metric-card .metric-main, .metric-card > small { color: initial; }

.links-card { max-width: 1500px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.links-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 24px 18px; }
.links-header h2 { margin-top: 5px; font-size: 19px; }
.links-header p { margin: 0; color: #9aa2b2; font-size: 9.5px; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.search-box { width: 260px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #e0e4ec; border-radius: 10px; background: #fafbfc; transition: .18s; }
.search-box:focus-within { border-color: #b2a2ff; box-shadow: 0 0 0 3px rgba(109,74,255,.07); background: #fff; }
.search-box span { color: #9ba3b3; font-size: 16px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 10.5px; }
.danger-ghost-btn { height: 38px; padding: 0 12px; border: 1px solid #f0dfe2; border-radius: 10px; color: #c95867; background: #fffafa; font-size: 10px; font-weight: 750; }
.danger-ghost-btn:hover { background: #fff2f4; border-color: #eccbd0; }
.table-shell { min-height: 250px; overflow-x: auto; border-top: 1px solid var(--line-2); }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 13px; color: #969dad; background: #fafbfc; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
td { padding: 13px; border-bottom: 1px solid var(--line-2); color: #4c5568; font-size: 10.5px; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfbfe; }
tbody tr:last-child td { border-bottom: 0; }
.col-index { width: 44px; }.col-actions { width: 186px; }
.num { width: 44px; color: #aab0bd; font-size: 9px; }
.link-cell { min-width: 270px; max-width: 390px; }
.link-cell a { display: block; overflow: hidden; color: #4c3dc5; font-size: 11px; font-weight: 760; text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.link-cell a:hover { text-decoration: underline; }
.link-cell span { display: block; margin-top: 4px; overflow: hidden; color: #a1a8b6; font-size: 8.5px; white-space: nowrap; text-overflow: ellipsis; }
.fake-code { display: inline-block; max-width: 180px; overflow: hidden; padding: 5px 7px; border: 1px solid #e8e5f7; border-radius: 7px; color: #6b58c8; background: #f8f6ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; vertical-align: middle; }
.click-count { color: #202534; font-size: 12px; }
.today-badge { display: inline-block; margin-left: 5px; padding: 2px 5px; border-radius: 5px; color: #248760; background: #eff9f4; font-size: 7.5px; }
.device-pill { display: inline-flex; gap: 6px; align-items: center; padding: 5px 7px; border: 1px solid #e4e9f1; border-radius: 7px; color: #617088; background: #fafbfc; font-size: 8.5px; white-space: nowrap; }
.device-pill b { color: #343c4d; }
.row-actions { display: flex; gap: 5px; white-space: nowrap; }
.row-actions button { height: 29px; padding: 0 8px; border: 1px solid #e3e6ee; border-radius: 8px; color: #667087; background: #fff; font-size: 8.5px; font-weight: 750; transition: .15s; }
.row-actions button:hover { color: #5f49d6; border-color: #cabfff; background: #faf8ff; }
.row-actions .delete:hover { color: #cb5362; border-color: #efc7cd; background: #fff8f9; }
.nowrap { white-space: nowrap; }.muted { color: #9da5b5; }.center { text-align: center; }
.empty-state { padding: 57px 20px 65px; text-align: center; }
.empty-illustration { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 14px; border: 1px solid #e2dcff; border-radius: 17px; color: #7052ea; background: #f4f1ff; box-shadow: 0 8px 24px rgba(109,74,255,.08); }
.empty-illustration span { font-size: 23px; }
.empty-state h3 { margin: 0 0 5px; font-size: 15px; }
.empty-state p { margin: 0 0 13px; color: #949cad; font-size: 10px; }
.empty-state a { color: var(--primary); font-size: 10px; font-weight: 750; text-decoration: none; }
.page-footer { max-width: 1500px; margin: 18px auto 0; color: #a9afbb; text-align: center; font-size: 8.5px; letter-spacing: .02em; }
.page-footer span { padding: 0 5px; }

.toast-wrap { position: fixed; z-index: 100; top: 18px; right: 18px; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 430px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 11px; color: #fff; background: #171d2c; box-shadow: 0 18px 42px rgba(8,12,22,.24); opacity: 0; transform: translateY(-8px); transition: .2s ease; font-size: 10.5px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: #fff; background: rgba(255,255,255,.12); font-weight: 850; }
.toast.error { background: #9b3544; }.toast.info { background: #315f91; }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7,10,18,.64); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(1180px, 96vw); max-height: 92vh; overflow: auto; border: 1px solid rgba(255,255,255,.55); border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); }
.modal-head { position: sticky; z-index: 3; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 5px 0 3px; font-size: 20px; letter-spacing: -.025em; }
.modal-head p { max-width: 760px; margin: 0; color: #9299a9; font-size: 9.5px; word-break: break-all; }
.close-btn { width: 34px; height: 34px; border: 1px solid #e5e8ee; border-radius: 10px; color: #778094; background: #fafbfc; font-size: 21px; line-height: 1; }
.close-btn:hover { color: #222938; background: #f2f4f7; }
.modal-body { padding: 18px 23px 24px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 11px; }
.mini-metrics > div { padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfc; }
.mini-metrics span, .mini-metrics small { display: block; color: #969dad; font-size: 8.5px; }
.mini-metrics strong { display: block; margin: 3px 0 2px; color: #212737; font-size: 23px; letter-spacing: -.03em; }
.distribution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subpanel { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.subpanel.wide { grid-column: 1 / -1; }
.subpanel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.subpanel h3 { margin: 0; font-size: 11.5px; }
.sub-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #6e56db; background: #f2efff; font-size: 10px; }
.bar-row { margin-bottom: 10px; }.bar-row:last-child { margin-bottom: 0; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; color: #6f788d; font-size: 9px; }
.bar-label b { color: #3e4658; }
.bar-track { height: 5px; overflow: hidden; border-radius: 999px; background: #eff1f5; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7252f1, #9a83ff); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 8px; border: 1px solid #e8eaf0; border-radius: 7px; color: #687186; background: #fafbfc; font-size: 8.5px; }
.chips b { color: #3e4658; margin-left: 3px; }
.recent-panel { margin-top: 10px; padding: 0; overflow: hidden; }
.subpanel-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; padding: 14px 15px 11px; }
.subpanel-title h3 { margin: 4px 0 0; }
.subpanel-title > span { color: #9da4b3; font-size: 8px; }
.recent-wrap { max-height: 390px; overflow: auto; border-top: 1px solid var(--line-2); }
.recent-table { min-width: 950px; }
.recent-table th { position: sticky; z-index: 1; top: 0; height: 36px; }
.recent-table td { padding: 9px 11px; font-size: 9px; }
.ua { max-width: 330px; overflow: hidden; color: #9199aa; white-space: nowrap; text-overflow: ellipsis; }
.modal-open { overflow: hidden; }.hidden { display: none !important; }

@media (max-width: 1120px) {
  .main-content { padding-left: 25px; padding-right: 25px; }
  .create-card { grid-template-columns: 1fr .8fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .main-content { padding: 22px 18px; }
  .create-card { grid-template-columns: 1fr; }
  .preview-side { min-height: 240px; }
  .links-header { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; }.search-box { flex: 1; width: auto; }
}
@media (max-width: 620px) {
  .main-content { margin-left: 0; padding: 17px 10px; }
  .main-header { padding: 0 3px; align-items: flex-start; }
  .main-header p { max-width: 230px; }.breadcrumb { display: none; }
  .status-pill { display: none; }.header-refresh { width: 36px; height: 36px; }
  .create-form-side { padding: 23px 18px; }
  .preview-side { min-height: 215px; padding: 19px; }
  .preview-content { padding-left: 2px; padding-right: 2px; }
  .preview-note { margin-top: 18px; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .metric-card { padding: 14px 12px 12px; }.metric-icon { margin-right: 8px; }.metric-main strong { font-size: 21px; }
  .links-header { padding: 18px 15px 14px; }
  .toolbar { align-items: stretch; flex-direction: column; }.search-box { width: 100%; flex: auto; }.danger-ghost-btn { width: 100%; }
  .modal { padding: 6px; }.modal-card { width: 100%; max-height: 97vh; border-radius: 15px; }
  .modal-head, .modal-body { padding-left: 14px; padding-right: 14px; }
  .mini-metrics { grid-template-columns: 1fr 1fr; }.mini-metrics > div:last-child { grid-column: 1 / -1; }
  .distribution-grid { grid-template-columns: 1fr; }.subpanel.wide { grid-column: auto; }
}

/* Protected all-links view */
.all-links-btn { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid #ded8ff; border-radius: 10px; color: #654bd5; background: #f8f6ff; font-size: 10px; font-weight: 780; transition: .16s ease; white-space: nowrap; }
.all-links-btn:hover { border-color: #c8bdff; background: #f2efff; transform: translateY(-1px); }
.all-links-btn.active { color: #315f91; border-color: #d5e4f2; background: #f2f7fb; }
.password-modal { z-index: 95; }
.password-card { width: min(475px, 94vw); max-height: none; overflow: visible; border-radius: 18px; }
.password-head { display: grid; grid-template-columns: 44px minmax(0,1fr) 34px; gap: 12px; align-items: start; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.password-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #e3dcff; border-radius: 13px; background: #f5f2ff; font-size: 18px; }
.password-head h2 { margin: 4px 0 4px; font-size: 18px; letter-spacing: -.025em; }
.password-head p { margin: 0; color: #9299a9; font-size: 9.5px; line-height: 1.55; }
.password-body { padding: 18px 22px 22px; }
.password-body > label { display: block; margin-bottom: 7px; color: #4d5568; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.password-input-shell { height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 10px 0 12px; border: 1px solid #dfe3eb; border-radius: 11px; background: #fafbfc; transition: .18s; }
.password-input-shell:focus-within { border-color: #ae9cff; box-shadow: 0 0 0 3px rgba(109,74,255,.08); background: #fff; }
.password-input-shell > span { color: #a1a8b7; font-size: 8px; letter-spacing: 2px; }
.password-input-shell input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: #252b3a; font-size: 12px; }
.password-input-shell button { height: 28px; padding: 0 8px; border: 0; border-radius: 7px; color: #7162bb; background: #f1eeff; font-size: 8.5px; font-weight: 780; }
.password-actions { display: grid; grid-template-columns: 105px 1fr; gap: 8px; margin-top: 15px; }
.password-cancel { height: 42px; border: 1px solid #e1e5ec; border-radius: 10px; color: #6d7587; background: #fff; font-size: 10px; font-weight: 750; }
.password-submit { height: 42px; margin: 0; }

@media (max-width: 620px) {
  .toolbar .all-links-btn { width: 100%; }
  .password-head { padding: 18px 16px 14px; grid-template-columns: 40px minmax(0,1fr) 32px; }
  .password-icon { width: 40px; height: 40px; }
  .password-body { padding: 15px 16px 18px; }
}
