:root {
    --bg: #f3f6fb;
    --bg-accent: #e9f0ff;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --ink: #162033;
    --muted: #64748b;
    --line: #dbe5f0;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --success: #138a52;
    --warning: #c27a12;
    --danger: #c63d3d;
    --shadow-lg: 0 24px 60px rgba(18, 32, 51, 0.08);
    --shadow-md: 0 10px 30px rgba(18, 32, 51, 0.06);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --content-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
    line-height: 1.6;
}

body.global-quick-create-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.site-shell {
    width: min(var(--content-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border: 1px solid rgba(219, 229, 240, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    color: white;
    font-weight: 800;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 1.05rem;
    letter-spacing: -0.03em;
}

.brand-copy span {
    font-size: 0.82rem;
    color: var(--muted);
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.site-nav-link,
.site-nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--muted);
}

.site-nav-link:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.site-nav-pill {
    background: var(--primary);
    color: white;
}

.site-nav-pill:hover {
    background: var(--primary-strong);
}

.nav-menu {
    position: relative;
    display: inline-block;
    min-width: 0;
}

.nav-menu summary {
    list-style: none;
}

.nav-menu summary::-webkit-details-marker {
    display: none;
}

.nav-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 45%),
        linear-gradient(135deg, var(--primary), #4f8df8);
    color: white;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
    cursor: pointer;
}

.nav-menu-avatar {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-menu-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.nav-menu-label {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
}

.nav-menu-meta {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.nav-menu-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.nav-menu-toggle:hover,
.nav-menu[open] .nav-menu-toggle {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

.nav-menu-caret {
    font-size: 0.78rem;
    margin-left: 2px;
    transition: transform 0.18s ease;
}

.nav-menu[open] .nav-menu-caret {
    transform: rotate(180deg);
}

.nav-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: min(210px, calc(100vw - 40px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    gap: 6px;
    z-index: 20;
}

.nav-menu[open] .nav-menu-panel {
    display: grid;
}

.nav-menu-mobile {
    display: none;
}

.nav-menu-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 14px;
    background: white;
    color: var(--ink);
    cursor: pointer;
}

.nav-menu-mobile-icon {
    display: inline-grid;
    gap: 4px;
}

.nav-menu-mobile-icon span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.nav-menu-mobile-text {
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-menu-mobile-panel {
    width: min(320px, calc(100vw - 32px));
}

.nav-menu-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.nav-menu-avatar-panel {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    border-color: transparent;
}

.nav-menu-panel-header .nav-menu-label {
    color: var(--ink);
}

.nav-menu-panel-header .nav-menu-meta {
    color: var(--muted);
}

.nav-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-weight: 600;
    text-align: left;
}

.nav-menu-item:focus-visible {
    outline: none;
    background: var(--surface-soft);
}

.nav-menu-item:hover {
    background: var(--surface-soft);
}

.nav-menu-form {
    margin: 0;
}

.nav-menu-button {
    cursor: pointer;
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.flash-message {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.flash-message.alert-success {
    border-color: rgba(19, 138, 82, 0.2);
}

.flash-message.alert-danger,
.flash-message.alert-error {
    border-color: rgba(198, 61, 61, 0.22);
}

.page-grid {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}

.app-header {
    display: grid;
    gap: 18px;
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
}

.app-header h1 {
    margin: 6px 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

.app-header p {
    margin: 0;
    max-width: 68ch;
    color: var(--muted);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.dashboard-sidebar,
.sidebar-stack {
    display: grid;
    gap: 18px;
}

.dashboard-content {
    display: grid;
    gap: 18px;
}

.settings-stack {
    gap: 20px;
}

.dashboard-footer {
    display: grid;
    gap: 18px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.hero-panel,
.card,
.table-card,
.auth-card,
.empty-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-panel {
    padding: 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 28px;
    align-items: start;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-strong);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-title {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy {
    max-width: 64ch;
    color: var(--muted);
    font-size: 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.stat-card,
.note-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.stat-card {
    padding: 18px 20px;
}

.stat-card strong {
    display: block;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.stat-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.note-card {
    padding: 20px;
}

.note-card h3,
.card h2,
.auth-card h1,
.table-header h2 {
    margin: 0 0 10px;
    letter-spacing: -0.04em;
}

.note-card p,
.card p,
.table-header p,
.auth-card p {
    margin: 0;
    color: var(--muted);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    gap: 28px;
}

.card {
    padding: 30px;
}

.section-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-stack {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.form-stack-compact {
    gap: 15px;
}

.field-group {
    display: grid;
    gap: 8px;
}

.form-stack-compact .field-group {
    gap: 6px;
}

.field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 16px;
    align-items: stretch;
}

.field-grid > * {
    min-width: 0;
}

.field-group label {
    font-size: 0.95rem;
    font-weight: 600;
}

.inline-help {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.field-inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.expiry-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.expires-field-stack {
    min-width: 0;
}

.expires-field-stack .input-datetime,
.expires-field-stack .field-inline-actions,
.expires-field-stack .compact-button,
.expiry-actions .compact-button {
    width: 100%;
}

.compact-button {
    min-height: 40px;
    padding: 0 14px;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.field-hint-spaced {
    margin-top: 4px;
}

.quick-create-notice-card {
    display: grid;
    gap: 14px;
}

.short-url-preview-card {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 40%),
        var(--surface-soft);
}

.short-url-preview-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.short-url-preview-value {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--muted);
    word-break: break-word;
}

.short-url-preview-card.is-ready .short-url-preview-value {
    color: var(--primary-strong);
}

.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.field-separator {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-weight: 700;
}

.input,
.select {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    color: var(--ink);
}

.form-stack-compact .input,
.form-stack-compact .select {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 13px;
}

.input-datetime {
    display: block;
    inline-size: 100%;
    min-width: 0;
    max-width: 100%;
    padding-right: 12px;
}

.input:focus,
.select:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    min-width: 0;
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.toggle-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(18, 32, 51, 0.05);
}

.toggle-card.is-on {
    border-color: rgba(19, 138, 82, 0.24);
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 40%),
        #eefbf3;
}

.toggle-card.is-off {
    border-color: rgba(100, 116, 139, 0.18);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
}

.toggle-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.toggle-eyebrow {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toggle-copy small {
    color: var(--muted);
    font-size: 0.84rem;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch,
.toggle-switch-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 58px;
    height: 32px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.35);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-knob {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    transition: transform 0.18s ease;
}

.toggle-card.is-on .toggle-switch,
.toggle-input:checked + .toggle-switch {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.toggle-card.is-on .toggle-knob,
.toggle-input:checked + .toggle-switch .toggle-knob {
    transform: translateX(26px);
}

.toggle-input:disabled + .toggle-switch {
    opacity: 0.6;
}

.toggle-card-form {
    width: 100%;
    text-align: left;
    cursor: default;
}

.toggle-card-form p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.toggle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toggle-switch-control {
    cursor: pointer;
}

.button,
.button-secondary,
.button-danger,
.button-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.button {
    background: var(--primary);
    color: white;
}

.button:hover {
    background: var(--primary-strong);
}

.button-secondary {
    background: white;
    border: 1px solid var(--line);
    color: var(--ink);
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.button-danger {
    background: rgba(198, 61, 61, 0.12);
    color: var(--danger);
}

.button-warning {
    background: rgba(194, 122, 18, 0.14);
    color: var(--warning);
}

.recaptcha-shell {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    overflow-x: auto;
}

.recaptcha-shell > div {
    min-width: 304px;
}

.table-card {
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 30px 14px;
}

.table-header-copy {
    display: grid;
    gap: 4px;
}

.library-controls {
    padding: 0 30px 18px;
}

.table-meta {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.settings-card {
    display: grid;
    gap: 22px;
}

.settings-card-active {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.settings-card-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.settings-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-divider {
    height: 1px;
    background: var(--line);
}

.settings-fallback-grid {
    align-items: start;
}

.tabs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.tabs-nav {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 20px;
}

.tabs-nav-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tabs-nav-button:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.tabs-nav-button.is-active {
    border-color: rgba(37, 99, 235, 0.18);
    background:
        radial-gradient(circle at left top, rgba(37, 99, 235, 0.10), transparent 50%),
        #eef5ff;
    color: var(--primary-strong);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.tabs-content,
.tab-panel-stack {
    display: grid;
    gap: 18px;
}

.tab-panel[hidden] {
    display: none;
}

.compact-metrics-row {
    margin-top: 18px;
}

.policy-card {
    display: grid;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.policy-card + .policy-card {
    margin-top: 4px;
}

.policy-card-header h3 {
    margin: 0 0 6px;
    letter-spacing: -0.03em;
}

.policy-card-header p {
    margin: 0;
    color: var(--muted);
}

.policy-grid {
    align-items: start;
}

.library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.library-filter {
    display: grid;
    gap: 14px;
}

.library-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.library-field {
    display: grid;
    gap: 8px;
}

.library-filter-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.library-filter-select {
    min-height: 42px;
    border-radius: 12px;
    width: 100%;
}

.library-search-input {
    min-height: 42px;
    border-radius: 12px;
    width: 100%;
}

.library-filter-button {
    min-height: 42px;
}

.table-scroll {
    overflow-x: auto;
}

.link-card-list {
    display: none;
    padding: 0 24px 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 20px 22px;
    text-align: left;
    border-top: 1px solid #edf2f7;
    vertical-align: middle;
}

.data-table thead th {
    border-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 25%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 33%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 14%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 12%;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 16%;
}

.stats-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.stats-detail-text {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stats-detail-text + .stats-detail-text {
    margin-top: 14px;
}

.qr-preview-shell {
    display: grid;
    place-items: center;
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.92));
}

.qr-preview {
    display: block;
    width: min(100%, 220px);
    height: auto;
    padding: 14px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.timeline-chart {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-soft);
}

.timeline-line-shell {
    position: relative;
    height: 240px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16)),
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 47px,
            rgba(148, 163, 184, 0.12) 47px,
            rgba(148, 163, 184, 0.12) 48px
        );
}

.timeline-line-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.timeline-axis {
    stroke: rgba(100, 116, 139, 0.32);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.timeline-polyline {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.timeline-point {
    position: absolute;
    transform: translate(-50%, -50%);
}

.timeline-point-dot {
    width: 12px;
    height: 12px;
    border: 3px solid #2563eb;
    border-radius: 999px;
    background: white;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.timeline-point-value {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.timeline-labels {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 6px;
}

.timeline-label {
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.timeline-mobile-summary {
    display: none;
}

.timeline-mobile-summary p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.timeline-mobile-list {
    display: grid;
    gap: 10px;
}

.timeline-mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
}

.timeline-mobile-item strong {
    font-size: 0.88rem;
    letter-spacing: -0.02em;
}

.timeline-mobile-item span {
    color: var(--primary-strong);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.stats-table th:nth-child(1),
.stats-table td:nth-child(1) {
    width: 20%;
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2) {
    width: 16%;
}

.stats-table th:nth-child(3),
.stats-table td:nth-child(3) {
    width: 64%;
}

.stats-mobile-events {
    display: none;
}

.stats-mobile-event-card {
    display: grid;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid #edf2f7;
}

.stats-mobile-event-card:first-child {
    border-top: 0;
}

.stats-mobile-event-card strong {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
}

.stats-mobile-event-card span {
    color: var(--muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-strong);
    font-weight: 600;
}

.domain-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-chip.success {
    color: var(--success);
    background: #eefbf3;
}

.status-chip.warning {
    color: var(--warning);
    background: #fff7ed;
}

.domain-table th:nth-child(1),
.domain-table td:nth-child(1) {
    width: 28%;
}

.domain-table th:nth-child(2),
.domain-table td:nth-child(2) {
    width: 44%;
}

.domain-table th:nth-child(3),
.domain-table td:nth-child(3) {
    width: 28%;
}

.status-cell {
    min-width: 0;
}

.status-token {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
    color: var(--warning);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.link-muted {
    color: var(--muted);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.clickable-row:hover,
.clickable-row:focus-visible {
    background: rgba(37, 99, 235, 0.04);
}

.clickable-row:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    outline-offset: -2px;
}

.library-primary-cell,
.library-destination-cell {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.library-destination-cell strong {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-destination-cell span {
    color: var(--muted);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-library-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-top: 1px solid #edf2f7;
}

.link-library-card:first-child {
    border-top: 0;
}

.link-library-card-top,
.link-library-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.link-library-card-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.link-library-card-body strong {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-library-card-body span,
.link-library-card-meta span {
    color: var(--muted);
    font-size: 0.84rem;
}

.link-library-card:hover {
    background: rgba(37, 99, 235, 0.04);
}

.word-cloud-card {
    min-height: 100%;
}

.cloud-wrap {
    min-height: 180px;
    display: grid;
    align-items: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 8px;
}

.insight-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-soft);
    display: grid;
    gap: 12px;
}

.insight-card h3 {
    margin: 0;
    letter-spacing: -0.03em;
}

.insight-card p {
    margin: 0;
    color: var(--muted);
}

.insight-card-feature {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 38%),
        linear-gradient(180deg, #f8fbff, #eef5ff);
}

.leaderboard,
.mini-list,
.domain-bars {
    display: grid;
    gap: 10px;
}

.leaderboard-item,
.mini-list-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.leaderboard-item:hover,
.mini-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(18, 32, 51, 0.06);
}

.hover-detail-panel {
    position: absolute;
    left: 50%;
    width: min(320px, calc(100vw - 48px));
    bottom: calc(100% + 10px);
    z-index: 5;
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    color: white;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hover-detail-panel::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.96);
    transform: translateX(-50%) rotate(45deg);
}

.hover-detail-row {
    display: grid;
    gap: 4px;
}

.hover-detail-row strong {
    color: #93c5fd;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hover-detail-value {
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.leaderboard-item:hover .hover-detail-panel,
.leaderboard-item:focus-visible .hover-detail-panel,
.mini-list-item:hover .hover-detail-panel,
.mini-list-item:focus-visible .hover-detail-panel {
    opacity: 1;
    transform: translate(-50%, 0);
}

.leaderboard-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.leaderboard-main,
.mini-list-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.leaderboard-main strong,
.mini-list-copy strong {
    letter-spacing: -0.02em;
}

.leaderboard-main span,
.mini-list-copy span {
    color: var(--muted);
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-metric,
.mini-list-metric,
.domain-bar-metric {
    color: var(--primary-strong);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.mini-list-metric.positive {
    color: var(--success);
}

.domain-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 1.2fr) auto;
    align-items: center;
    gap: 12px;
}

.domain-bar-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.domain-bar-copy span {
    color: var(--muted);
    font-size: 0.82rem;
}

.domain-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #dfe9f7;
    overflow: hidden;
}

.domain-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.auth-shell {
    min-height: calc(100vh - 168px);
    display: grid;
    place-items: center;
    padding: 36px 0;
}

.auth-card {
    width: min(100%, 560px);
    padding: 36px;
}

.consent-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.consent-card h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
}

.consent-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 8px;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 500;
}

.checkbox-field input {
    margin-top: 3px;
}

.account-card {
    width: min(100%, 960px);
}

.account-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.account-settings-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-soft);
}

.account-status-card,
.account-subsection {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
}

.account-status-card {
    margin: 0 0 18px;
}

.account-status-card strong {
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.account-status-card p,
.account-subsection p {
    margin: 0;
    color: var(--muted);
}

.account-status-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-subsection {
    margin-top: 18px;
}

.account-subsection h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.account-settings-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.account-settings-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.account-settings-heading p {
    margin: 0;
    color: var(--muted);
}

.helptext,
.field-group ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

.field-group ul {
    display: grid;
    gap: 4px;
}

.auth-title {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.alert-box {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(198, 61, 61, 0.2);
    background: rgba(198, 61, 61, 0.06);
    color: var(--danger);
}

.empty-card {
    padding: 22px;
    color: var(--muted);
}

.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}

.inline-action-form,
.inline-actions form {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
}

.inline-actions .button-secondary,
.inline-actions .button-danger,
.inline-actions .button-warning {
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}

.action-cell {
    white-space: nowrap;
}

.help-list {
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--ink);
}

.help-list li + li {
    margin-top: 10px;
}

.code-block {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    display: grid;
    gap: 10px;
}

.link-inline {
    color: var(--primary-strong);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.support-actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.global-quick-create {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
}

.global-quick-create-launcher {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 45%),
        linear-gradient(135deg, var(--primary), #4f8df8);
    color: white;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
    cursor: pointer;
}

.global-quick-create-launcher-mark {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.15rem;
    font-weight: 700;
}

.global-quick-create-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(3px);
}

.global-quick-create-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(440px, 100vw);
    height: 100vh;
    border-left: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.global-quick-create-panel-inner {
    display: grid;
    gap: 22px;
    min-height: 100%;
    padding: 28px 24px 32px;
}

.global-quick-create-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.global-quick-create-header h2 {
    margin: 0 0 8px;
    letter-spacing: -0.04em;
}

.global-quick-create-header p {
    margin: 0;
    color: var(--muted);
}

.global-quick-create-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 980px) {
    .hero-grid,
    .dashboard-layout,
    .field-grid,
    .field-row,
    .help-grid,
    .insights-grid,
    .quick-actions-grid,
    .account-settings-grid,
    .dashboard-shell,
    .stats-layout,
    .main-layout,
    .tabs-layout {
        grid-template-columns: 1fr;
    }

    .hero-stats,
    .metrics-row {
        grid-template-columns: 1fr;
    }

    .table-header {
        align-items: start;
        flex-direction: column;
    }

    .library-controls {
        padding: 0 30px 16px;
    }

    .library-toolbar {
        width: 100%;
        justify-content: space-between;
    }

    .library-filter-grid {
        grid-template-columns: 1fr;
    }

    .inline-actions {
        flex-wrap: wrap;
    }

    .settings-card-header {
        flex-direction: column;
    }

    .settings-card-meta {
        justify-content: flex-start;
    }

    .tabs-nav {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .links-table-shell {
        display: none;
    }

    .link-card-list {
        display: grid;
    }

    .stats-table-shell {
        display: none;
    }

    .stats-mobile-events {
        display: grid;
    }
}

@media (max-width: 680px) {
    .site-shell {
        width: min(var(--content-width), calc(100% - 28px));
        padding-top: 20px;
    }

    .site-nav {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        padding: 16px;
    }

    .site-nav-links {
        display: none;
    }

    .nav-menu-mobile {
        display: inline-block;
        flex: 0 0 auto;
    }

    .nav-menu {
        width: 100%;
    }

    .nav-menu-mobile {
        width: auto;
        min-width: 0;
    }

    .nav-menu-mobile-toggle {
        width: auto;
        justify-content: center;
    }

    .nav-menu-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-menu-panel {
        left: 0;
        right: auto;
        width: min(280px, 100%);
    }

    .nav-menu-mobile-panel {
        left: auto;
        right: 0;
        width: min(320px, calc(100vw - 32px));
    }

    .brand-lockup {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-copy strong,
    .brand-copy span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .button-row {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .field-inline-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .expiry-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button-row > a,
    .button-row > button,
    .button-row > form,
    .button-row .inline-action-form {
        width: 100%;
    }

    .button-row .button,
    .button-row .button-secondary,
    .button-row .button-danger,
    .button-row .button-warning {
        width: 100%;
    }

    .hero-panel,
    .card,
    .auth-card {
        padding: 24px;
    }

    .table-header {
        padding: 24px 24px 10px;
    }

    .library-controls {
        padding: 0 24px 14px;
    }

    .link-card-list {
        padding: 0 20px 20px;
    }

    .data-table th,
    .data-table td {
        padding: 18px 16px;
    }

    .desktop-timeline-copy,
    .timeline-chart {
        display: none;
    }

    .timeline-mobile-summary {
        display: block;
    }

    .global-quick-create {
        right: 14px;
        left: 14px;
        bottom: 14px;
    }

    .global-quick-create-launcher {
        width: 58px;
        margin-left: auto;
    }
}
