/* =============================================================
   Compress Me — comprs.me
   Deep teal · charcoal · Bricolage Grotesque
   ============================================================= */

:root {
    /* Palette */
    --color-primary:        #0d4f4f;
    --color-primary-dark:   #0a3d3d;
    --color-accent:         #1a8585;
    --color-accent-light:   #2cb3a8;
    --color-bg:             #f6f8f9;
    --color-bg-alt:         #eef2f4;
    --color-surface:        #ffffff;
    --color-text:           #1a1f24;
    --color-muted:          #6b7785;
    --color-border:         #e3e8ec;
    --color-error:          #c0392b;
    --color-error-bg:       #fef0ef;
    --color-error-border:   #f5c6c2;
    --color-success:        #1a8585;
    --color-success-bg:     #e6f7f5;
    --color-success-border: #b3e6dd;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(13,79,79,.05);
    --shadow-md: 0 4px 14px rgba(13,79,79,.08);
    --shadow-lg: 0 14px 36px rgba(13,79,79,.12);

    /* Layout */
    --container: 1080px;

    /* Typography */
    --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-body:    "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    --font-mono:    ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}

img, svg { max-width: 100%; height: auto; display: block; }
svg { vertical-align: middle; }

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .15s;
}
a:hover { color: var(--color-primary); }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--color-text);
}

p { margin: 0 0 1rem; }

::selection { background: var(--color-primary); color: #fff; }

/* ---------- Utilities ---------- */
.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-primary);
    color: #fff;
    padding: .65rem 1rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { left: 1rem; color: #fff; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
    background-color: rgba(255,255,255,.85);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 0;
}

/* =====================================================
   Brand lockup — used in header, footer, error & admin
   ===================================================== */
.brand-lockup,
.logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-family: var(--font-display);
    text-decoration: none;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1;
}
.brand-lockup:hover { color: var(--color-primary); }

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(13,79,79,.18);
    flex-shrink: 0;
}
.logo-mark svg {
    width: 26px; height: 26px;
    display: block;
}
.logo-mark-dark { background: var(--color-text); }

.logo-words {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}
.logo-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: inherit;
}
.logo-url {
    font-size: .72rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.03em;
    text-transform: lowercase;
    font-family: var(--font-mono);
}

@media (max-width: 540px) {
    .logo-mark { width: 36px; height: 36px; }
    .logo-mark svg { width: 22px; height: 22px; }
    .logo-brand { font-size: 1.05rem; }
    .logo-url { font-size: .68rem; }
}

.site-nav {
    display: flex;
    gap: 1.6rem;
}
.site-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
}
.site-nav a:hover { color: var(--color-primary); }

@media (max-width: 540px) {
    .site-nav { gap: .9rem; font-size: .9rem; }
    .site-nav a { font-size: .9rem; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(26,133,133,.10), transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(13,79,79,.05), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner { position: relative; z-index: 1; }

.hero-title {
    font-size: clamp(2.4rem, 6vw + 1rem, 4.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 1.25rem;
    color: var(--color-text);
}
.hero-title .accent {
    color: var(--color-primary);
    font-style: italic;
    font-weight: 700;
}

.hero-sub {
    font-size: clamp(1rem, 1.4vw + .6rem, 1.2rem);
    color: var(--color-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.5;
}
.hero-sub strong { color: var(--color-primary); font-weight: 600; }

/* ---------- Form ---------- */
.shorten-form { max-width: 720px; margin: 0 auto; }

.input-row {
    display: flex;
    gap: .5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: .55rem .55rem .55rem 1rem;
    box-shadow: var(--shadow-md);
    transition: border-color .15s, box-shadow .15s;
    align-items: center;
}
.input-row:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(13,79,79,.10), var(--shadow-md);
}

#url-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    padding: .85rem .25rem;
    color: var(--color-text);
    min-width: 0;
}
#url-input::placeholder { color: var(--color-muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: none;
    border-radius: var(--radius-md);
    padding: .8rem 1.5rem;
    font: inherit;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, transform .05s, box-shadow .15s;
    line-height: 1.2;
}
.btn:focus-visible {
    outline: 3px solid var(--color-accent-light);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-bg-alt); color: var(--color-text); }

.btn-danger {
    background: var(--color-error);
    color: #fff;
}
.btn-danger:hover { background: #a93226; color: #fff; }

.btn-sm   { padding: .45rem .8rem; font-size: .88rem; }
.btn-block{ width: 100%; }

.btn-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .8; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn-link {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
    margin-top: 1rem;
}
.btn-link:hover { color: var(--color-primary); }

@media (max-width: 540px) {
    .input-row { flex-direction: column; padding: .75rem; gap: .5rem; }
    #url-input { padding: .75rem; text-align: center; width: 100%; }
    .btn-primary { width: 100%; }
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-top: 1.25rem;
    color: var(--color-muted);
    font-size: .95rem;
}
.form-options select {
    padding: .4rem .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: .92rem;
    cursor: pointer;
}
.form-options select:focus-visible { outline: 2px solid var(--color-accent); }

.h-captcha { margin-top: 1.5rem; display: flex; justify-content: center; }

/* ---------- Result panel ---------- */
.result-panel {
    max-width: 720px;
    margin: 2rem auto 0;
    padding: 1.5rem 1.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: left;
    animation: slideUp .3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-label {
    margin: 0 0 .85rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.result-row {
    display: flex;
    gap: .5rem;
}

#short-url-output {
    flex: 1;
    padding: .8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-size: 1.05rem;
    font-family: var(--font-mono);
    color: var(--color-primary);
    min-width: 0;
}
#short-url-output:focus { outline: 2px solid var(--color-accent); }

.result-meta {
    margin: 1rem 0 0;
    font-size: .9rem;
    color: var(--color-muted);
}

@media (max-width: 540px) {
    .result-row { flex-direction: column; }
    #short-url-output { text-align: center; }
}

/* ---------- Error panel (form errors) ---------- */
.error-panel {
    max-width: 720px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.25rem;
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    border-radius: var(--radius-md);
    color: var(--color-error);
    text-align: center;
    font-weight: 500;
}

/* ---------- Ad slots ---------- */
.ad-slot {
    margin: 1.5rem auto;
    width: min(100% - 2rem, var(--container));
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-muted);
    font-size: .8rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-slot:empty::before {
    content: "Advertisement";
    opacity: .4;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
}
.ad-leaderboard { min-height: 90px; }
.ad-rectangle   { min-height: 250px; max-width: 336px; margin-inline: auto; }
.ad-footer      { min-height: 90px; margin-top: 2rem; }

/* ---------- Features ---------- */
.features {
    padding: 5rem 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.features h2,
.faq h2,
.legal-section h2 {
    font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem);
    margin: 0 0 .5rem;
    letter-spacing: -0.02em;
}
.features h2,
.faq h2 { text-align: center; }
.features h2 { margin-bottom: .35rem; }

.section-sub {
    text-align: center;
    color: var(--color-muted);
    margin: 0 0 3rem;
    font-size: 1.05rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem 1rem;
}
.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 56px; height: 56px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(13,79,79,.08), rgba(26,133,133,.12));
    color: var(--color-primary);
    border-radius: var(--radius-md);
}
.feature-icon svg { width: 28px; height: 28px; }
.feature h3 {
    font-size: 1.2rem;
    margin: 0 0 .5rem;
    color: var(--color-text);
}
.feature p {
    color: var(--color-muted);
    margin: 0;
    font-size: .98rem;
    line-height: 1.55;
}

/* ---------- FAQ ---------- */
.faq {
    padding: 5rem 0;
}
.faq h2 { margin-bottom: 2.5rem; }

.faq details {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: .75rem;
    transition: box-shadow .15s, border-color .15s;
}
.faq details:hover { box-shadow: var(--shadow-sm); }
.faq details[open] { border-color: var(--color-accent-light); }

.faq summary {
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    font-weight: 600;
    list-style: none;
    position: relative;
    padding-right: 3rem;
    color: var(--color-text);
    font-family: var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.55rem;
    line-height: 1;
    color: var(--color-primary);
    transition: transform .2s;
    font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }

.faq details p {
    padding: 0 1.4rem 1.25rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.6;
}

/* ---------- Legal sections (about / privacy / terms) ---------- */
.legal-section {
    padding: 3.5rem 0;
    border-top: 1px solid var(--color-border);
}
.legal-section:first-of-type { border-top: none; }
.legal-section h2 {
    margin-bottom: 1rem;
}

.legal-section details {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.legal-section summary {
    cursor: pointer;
    padding: 1rem 1.4rem;
    font-weight: 500;
    color: var(--color-accent);
    list-style: none;
    font-size: .95rem;
}
.legal-section summary::-webkit-details-marker { display: none; }
.legal-section summary::before {
    content: "▸ ";
    color: var(--color-primary);
    transition: transform .2s;
    display: inline-block;
}
.legal-section details[open] summary::before {
    content: "▾ ";
}

.legal-content {
    padding: 0 1.4rem 1.4rem;
    color: var(--color-text);
    border-top: 1px solid var(--color-border);
    padding-top: 1.4rem;
}
.legal-content p { margin: .8rem 0; line-height: 1.65; }
.legal-content ol { padding-left: 1.5rem; }
.legal-content ol li { margin: .6rem 0; }
.legal-content strong { color: var(--color-primary); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-text);
    color: #c8d0d6;
    padding: 3.5rem 0 2rem;
    margin-top: 3rem;
}
.footer-cols {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.footer-brand .brand-lockup { color: #fff; }
.footer-brand .logo-mark {
    background: var(--color-accent);
}
.footer-brand .logo-url {
    color: var(--color-accent-light);
}
.footer-brand p {
    margin: .75rem 0 0;
    color: #95a5a8;
    font-size: .92rem;
}
.site-footer nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.site-footer nav a {
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    opacity: .75;
    transition: opacity .15s;
}
.site-footer nav a:hover { opacity: 1; }
.footer-copy {
    border-top: 1px solid #2c343b;
    padding-top: 1.5rem;
    color: #95a5a8;
    font-size: .85rem;
    text-align: center;
    margin: 0;
}

@media (max-width: 540px) {
    .footer-cols { flex-direction: column; gap: 1.5rem; }
}

/* =============================================================
   Error pages (404, expired, disabled)
   ============================================================= */
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(26,133,133,.07), transparent 60%),
        var(--color-bg);
    padding: 1rem;
}
.error-wrap { width: 100%; max-width: 520px; }
.error-card {
    background: var(--color-surface);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--color-border);
}
.error-card .brand-lockup,
.error-card .logo {
    justify-content: center;
    margin-bottom: 2rem;
}
.error-lockup { margin: 0 auto 2rem; }
.error-card h1 {
    font-size: clamp(1.6rem, 3vw + 1rem, 2.1rem);
    margin: 0 0 1rem;
}
.error-card p {
    color: var(--color-muted);
    margin: 0 0 2rem;
    line-height: 1.55;
}
.error-foot {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--color-muted);
    font-size: .85rem;
}

/* =============================================================
   Admin panel
   ============================================================= */
.admin-body {
    background: var(--color-bg);
    min-height: 100vh;
}
.admin-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}
.admin-shell-narrow {
    max-width: 480px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: .5rem;
}
.admin-header .brand-lockup,
.admin-header .logo { color: var(--color-text); text-decoration: none; }
.admin-header .logo-mark { background: var(--color-text); }
.admin-tag {
    display: inline-block;
    margin-left: .4rem;
    padding: .12rem .45rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 4px;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    vertical-align: 2px;
    font-family: var(--font-display);
}
.admin-meta { color: var(--color-muted); font-size: .92rem; }
.admin-meta a { font-weight: 500; }

.dash-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dash-toolbar h1 {
    margin: 0;
    font-size: 1.6rem;
}
.dash-count {
    color: var(--color-muted);
    font-weight: 400;
    font-size: 1rem;
}

.dash-search {
    display: flex;
    gap: .5rem;
}
.dash-search input {
    padding: .55rem .8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font: inherit;
    font-size: .92rem;
    min-width: 220px;
}
.dash-search input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13,79,79,.12);
}

.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

.admin-table {
    width: 100%;
    background: var(--color-surface);
    border-collapse: collapse;
    font-size: .92rem;
}
.admin-table th,
.admin-table td {
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.admin-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(13,79,79,.02); }

.cell-slug a { font-family: var(--font-mono); font-weight: 500; }
.url-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-muted);
    font-size: .88rem;
}
.cell-meta { color: var(--color-muted); font-size: .85rem; white-space: nowrap; }
.cell-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.muted { color: var(--color-muted); }

.status {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.status-active   { background: var(--color-success-bg); color: var(--color-success); }
.status-disabled { background: var(--color-error-bg);   color: var(--color-error); }
.status-expired  { background: var(--color-bg-alt);     color: var(--color-muted); }

.th-actions { width: 1%; white-space: nowrap; }
.admin-actions { white-space: nowrap; }
.admin-actions .btn { margin-right: .25rem; }
.inline-form { display: inline; }

.empty-row {
    text-align: center;
    padding: 3rem !important;
    color: var(--color-muted);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Admin forms (login, setup, edit) */
.admin-form {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 460px;
    margin: 4rem auto 0;
    border: 1px solid var(--color-border);
}
.admin-form-wide { max-width: 640px; margin-top: 0; }
.admin-form h1 {
    margin: 0 0 .5rem;
    font-size: 1.5rem;
}
.admin-form-intro {
    color: var(--color-muted);
    margin: 0 0 1.5rem;
    font-size: .95rem;
}
.admin-form-meta {
    color: var(--color-muted);
    margin: 0 0 1.5rem;
    font-size: .9rem;
}
.admin-form-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.field { margin-bottom: 1rem; }
.field label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 500;
    font-size: .92rem;
    color: var(--color-text);
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--color-bg);
    color: var(--color-text);
}
.field input:disabled { background: var(--color-bg-alt); color: var(--color-muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13,79,79,.12);
    background: var(--color-surface);
}
.field-check { font-weight: 400; }
.field-check label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-weight: 500;
}
.field-check input { width: auto; }

.form-actions {
    display: flex;
    gap: .5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.flash {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: .92rem;
}
.flash-success {
    background: var(--color-success-bg);
    color: #0d6e60;
    border: 1px solid var(--color-success-border);
}
.flash-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error-border);
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
}
.back-link:hover { color: var(--color-primary); }

@media (max-width: 720px) {
    .admin-table { font-size: .85rem; }
    .admin-table th, .admin-table td { padding: .6rem .65rem; }
    .url-cell { max-width: 140px; }
    .cell-meta { font-size: .78rem; }
    .admin-form { padding: 1.75rem; margin-top: 2rem; }
    .dash-search input { min-width: 140px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}
