:root {
    --bg: #f5f1e8;
    --surface: rgba(255, 252, 245, 0.78);
    --surface-strong: #fffdf9;
    --text: #171512;
    --muted: #6e665c;
    --accent: #183f34;
    --accent-dark: #102d25;
    --border: rgba(112, 101, 89, 0.18);
    --shadow: 0 24px 60px rgba(23, 21, 18, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Palatino Linotype", Georgia, serif;
    background:
        radial-gradient(circle at top left, rgba(24, 63, 52, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(120, 96, 68, 0.08), transparent 24%),
        linear-gradient(180deg, #faf7f0 0%, var(--bg) 100%);
    color: var(--text);
}

.site-frame {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
}

.header-shell {
    width: min(1520px, calc(100% - 1rem));
}

.container-wide {
    width: min(1360px, calc(100% - 2rem));
}

main.container {
    flex: 1;
}

.shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(255, 250, 244, 0.72);
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.brand-rich {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.nav-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 52, 99, 0.12);
}

.brand-stack {
    display: grid;
    gap: 0.05rem;
    line-height: 1.05;
}

.brand-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #155db6;
}

.brand-text {
    color: #263547;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
}

.brand-placeholder {
    visibility: hidden;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(15, 102, 208, 0.05);
    border: 1px solid rgba(21, 93, 182, 0.1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-size: 0.94rem;
    color: #38516e;
    transition: background-color 160ms ease, color 160ms ease;
}

.nav-link:hover {
    background: rgba(15, 102, 208, 0.08);
    color: #155db6;
}

.nav-link-cta {
    background: #ffffff;
    color: #155db6;
    box-shadow: 0 10px 22px rgba(15, 52, 99, 0.08);
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.8rem 0.35rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(21, 93, 182, 0.12);
    box-shadow: 0 12px 24px rgba(15, 52, 99, 0.08);
}

.profile-chip-button {
    cursor: pointer;
}

.profile-menu {
    position: relative;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f66d0 0%, #56c2f5 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

.profile-copy {
    display: grid;
    gap: 0.08rem;
    line-height: 1.1;
}

.profile-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.profile-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #263547;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 200px;
    max-width: min(22rem, calc(100vw - 1.5rem));
    padding: 0.45rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(21, 93, 182, 0.12);
    box-shadow: 0 18px 36px rgba(15, 52, 99, 0.12);
    backdrop-filter: blur(10px);
    z-index: 20;
}

.profile-dropdown-link,
.profile-dropdown-button {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #263547;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-dropdown-link:hover,
.profile-dropdown-button:hover {
    background: rgba(15, 102, 208, 0.08);
    color: #155db6;
}

.profile-dropdown-form {
    margin: 0;
}

.nav-copy,
.muted {
    color: var(--muted);
}

.hero,
.auth-panel,
.create-layout,
.status-panel {
    padding: 4.5rem 0 5.5rem;
}

.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 3rem 0 1.5rem;
}

.page-header h1 {
    margin: 0;
}

.page-header .eyebrow {
    margin-bottom: 0.45rem;
}

.page-header .muted {
    margin: 0.35rem 0 0;
}

.page-header-compact {
    padding-top: 1.45rem;
    padding-bottom: 0.95rem;
}

.hero h1,
.auth-card h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.9rem, 6vw, 5.4rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
}

.lede {
    max-width: 48rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--accent);
}

.card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.auth-card {
    max-width: 29rem;
}

.status-card {
    max-width: 40rem;
}

.auth-form,
.stacked-form {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.auth-form input,
.stacked-form input {
    width: 100%;
    min-height: 52px;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
}

.auth-form label,
.stacked-form label {
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-form ul.errorlist,
.stacked-form ul.errorlist {
    margin: 0;
    padding-left: 1.25rem;
    color: #8a1f11;
}

.hero-minimal {
    display: grid;
    align-content: center;
    min-height: calc(100vh - 88px);
    max-width: 44rem;
}

.home-dashboard {
    padding: 2.5rem 0 4rem;
}

.hero-dashboard {
    padding: 1.5rem 0 2rem;
    min-height: auto;
    max-width: 52rem;
}

.dashboard-links {
    margin-top: 1rem;
    padding: 1.6rem;
    position: relative;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 102, 208, 0.12);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 52, 99, 0.08);
    backdrop-filter: blur(10px);
}

.dashboard-links::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(90deg, #0f66d0 0%, #56c2f5 58%, #f43e51 100%);
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #155db6;
}

.dashboard-link-list {
    display: grid;
    gap: 0.9rem;
}

.dashboard-link-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.dashboard-link-item:first-child {
    border-top: 0;
    padding-top: 0.2rem;
}

.dashboard-link-item h3 {
    margin: 0;
    font-size: 1.05rem;
}

.dashboard-link-code,
.dashboard-link-target {
    margin: 0.3rem 0 0;
}

.dashboard-link-code {
    color: var(--muted);
}

.dashboard-link-target {
    color: var(--muted);
    font-size: 0.95rem;
    word-break: break-word;
}

.dashboard-link-meta {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
    white-space: nowrap;
}

.empty-mini {
    padding: 0.5rem 0 0.2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.auth-shell {
    min-height: calc(100vh - 88px);
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    pointer-events: none;
}

.auth-shell::before {
    width: 320px;
    height: 320px;
    top: 6%;
    left: 10%;
    background: radial-gradient(circle, rgba(15, 102, 208, 0.12), transparent 68%);
    animation: ambient-float 12s ease-in-out infinite;
}

.auth-shell::after {
    width: 260px;
    height: 260px;
    right: 12%;
    bottom: 10%;
    background: radial-gradient(circle, rgba(244, 62, 81, 0.12), transparent 70%);
    animation: ambient-float 14s ease-in-out infinite reverse;
}

.auth-card-minimal {
    width: 100%;
    margin-top: 0;
    padding: 1.9rem;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 102, 208, 0.12);
    box-shadow: 0 28px 80px rgba(15, 52, 99, 0.12);
    position: relative;
    overflow: hidden;
    animation: card-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card-minimal::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #0f66d0 0%, #56c2f5 55%, #f43e51 100%);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    animation: fade-up 650ms ease-out 120ms both;
}

.login-logo {
    width: 168px;
    max-width: 100%;
    height: auto;
    display: block;
}

.auth-form-minimal {
    gap: 0.95rem;
    margin-top: 0.35rem;
    position: relative;
    z-index: 1;
}

.auth-form-minimal > * {
    animation: fade-up 560ms ease-out both;
}

.auth-form-minimal > *:nth-child(1) { animation-delay: 180ms; }
.auth-form-minimal > *:nth-child(2) { animation-delay: 220ms; }
.auth-form-minimal > *:nth-child(3) { animation-delay: 260ms; }
.auth-form-minimal > *:nth-child(4) { animation-delay: 300ms; }
.auth-form-minimal > *:nth-child(5) { animation-delay: 340ms; }

.auth-form-minimal label {
    color: #155db6;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-form-minimal input {
    background: #edf3fe;
    border-color: rgba(21, 93, 182, 0.22);
    color: #12304a;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.auth-form-minimal input:focus {
    outline: none;
    border-color: rgba(15, 102, 208, 0.5);
    box-shadow: 0 0 0 4px rgba(15, 102, 208, 0.1);
    transform: translateY(-1px);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 5rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.7rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #155db6;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    font-weight: 700;
    transition: color 160ms ease, transform 160ms ease;
}

.password-toggle:hover {
    color: #0f4f9a;
    transform: translateY(-50%) scale(1.03);
}

.create-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 1.5rem;
}

.create-shell {
    max-width: 54rem;
    padding: 3rem 0 4.5rem;
    margin: 0 auto;
}

.create-shell-compact {
    max-width: 32.4rem;
}

.create-shell-compact .form-card-branded {
    padding: 1.35rem;
}

.create-shell-compact .create-head {
    margin-bottom: 0.7rem;
}

.create-shell-compact .create-head h1 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.create-shell-compact .create-prefix {
    margin-bottom: 0.9rem;
    padding: 0.45rem 0.7rem;
}

.create-shell-compact .stacked-form-branded {
    gap: 0.65rem;
}

.create-shell-compact .stacked-form-branded label {
    font-size: 0.84rem;
}

.create-shell-compact .stacked-form-branded input {
    min-height: 46px;
    padding: 0.78rem 0.9rem;
}

.create-shell-compact .alias-prefix {
    padding: 0 0.75rem;
}

.create-shell-compact .stacked-form-branded .button {
    min-height: 44px;
    margin-top: 0.2rem;
}

.create-card {
    animation: card-rise 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.form-card-branded {
    margin-top: 0;
    padding: 1.9rem;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 102, 208, 0.12);
    box-shadow: 0 28px 80px rgba(15, 52, 99, 0.12);
    position: relative;
    overflow: hidden;
}

.form-card-branded::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #0f66d0 0%, #56c2f5 55%, #f43e51 100%);
}

.create-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.create-title-block,
.create-meta-row,
.stacked-form-branded > * {
    animation: fade-up 520ms ease-out both;
}

.create-title-block { animation-delay: 80ms; }
.create-meta-row { animation-delay: 140ms; }
.stacked-form-branded > *:nth-child(1) { animation-delay: 180ms; }
.stacked-form-branded > *:nth-child(2) { animation-delay: 220ms; }
.stacked-form-branded > *:nth-child(3) { animation-delay: 260ms; }
.stacked-form-branded > *:nth-child(4) { animation-delay: 300ms; }
.stacked-form-branded > *:nth-child(5) { animation-delay: 340ms; }

.create-head h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.3rem);
    line-height: 0.96;
    letter-spacing: -0.03em;
}

.create-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.create-prefix {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    background: rgba(15, 102, 208, 0.05);
    border: 1px solid rgba(21, 93, 182, 0.12);
    color: #38516e;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.create-prefix-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #155db6;
}

.profile-summary {
    margin-bottom: 1.15rem;
    position: relative;
    z-index: 1;
}

.profile-summary-item {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: rgba(15, 102, 208, 0.05);
    border: 1px solid rgba(21, 93, 182, 0.12);
}

.profile-summary-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #155db6;
}

.created-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    margin-bottom: 1.2rem;
    border-radius: 18px;
    background: rgba(15, 102, 208, 0.06);
    border: 1px solid rgba(21, 93, 182, 0.14);
    position: relative;
    z-index: 1;
}

.created-link-label {
    margin: 0 0 0.28rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #155db6;
}

.created-link-url {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #12304a;
    word-break: break-all;
}

.copy-link-button {
    white-space: nowrap;
}

.stacked-form-branded {
    position: relative;
    z-index: 1;
    gap: 0.95rem;
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.field-optional {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8a97a7;
}

.stacked-form-branded label {
    color: #155db6;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.stacked-form-branded input {
    background: #edf3fe;
    border-color: rgba(21, 93, 182, 0.22);
    color: #12304a;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.stacked-form-branded input:focus {
    outline: none;
    border-color: rgba(15, 102, 208, 0.5);
    box-shadow: 0 0 0 4px rgba(15, 102, 208, 0.1);
    transform: translateY(-1px);
}

.alias-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

.alias-prefix {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 0.9rem;
    border-radius: 14px;
    background: rgba(15, 102, 208, 0.07);
    border: 1px solid rgba(21, 93, 182, 0.14);
    color: #38516e;
    white-space: nowrap;
}

.stacked-form-branded .button {
    width: 100%;
    margin-top: 0.4rem;
    background: linear-gradient(180deg, #f84d5a 0%, #ef384d 100%);
    box-shadow: 0 14px 28px rgba(239, 56, 77, 0.18);
}

.stacked-form-branded .button:hover {
    background: linear-gradient(180deg, #ef4454 0%, #da2940 100%);
}

.create-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.create-form-actions .button {
    flex: 1 1 0;
}

.form-card h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.98;
}

.detail-card h2 {
    margin-top: 0;
}

.help {
    margin: -0.25rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.table-card {
    padding-bottom: 4rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 1rem;
}

.pagination-summary {
    color: var(--muted);
    font-size: 0.95rem;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.links-table {
    width: 100%;
    border-collapse: collapse;
}

.links-table th,
.links-table td {
    padding: 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(223, 212, 195, 0.8);
}

.links-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #155db6;
    background: rgba(15, 102, 208, 0.04);
}

.links-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-meta {
    margin-top: 0.35rem;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.status-on {
    background: rgba(17, 97, 73, 0.12);
    color: var(--accent-dark);
}

.status-off {
    background: rgba(138, 31, 17, 0.12);
    color: #8a1f11;
}

.field-error ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #8a1f11;
}

.example-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.action-row form {
    margin: 0;
}

.empty-state {
    max-width: 38rem;
    margin-bottom: 4rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 46px;
    padding: 0.85rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-dark);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.42);
    color: var(--text);
    border: 1px solid var(--border);
}

.button-secondary:hover {
    background: rgba(17, 97, 73, 0.08);
}

.button-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.copy-inline-button {
    min-width: 72px;
}

.hero-dashboard .button,
.hero-minimal .button {
    background: linear-gradient(180deg, #f84d5a 0%, #ef384d 100%);
    box-shadow: 0 14px 28px rgba(239, 56, 77, 0.18);
}

.hero-dashboard .button:hover,
.hero-minimal .button:hover {
    background: linear-gradient(180deg, #ef4454 0%, #da2940 100%);
}

.hero-dashboard .button-secondary {
    background: rgba(15, 102, 208, 0.06);
    border-color: rgba(21, 93, 182, 0.18);
    color: #155db6;
}

.hero-dashboard .button-secondary:hover {
    background: rgba(15, 102, 208, 0.12);
}

.auth-form-minimal .button {
    width: 100%;
    margin-top: 0.35rem;
    background: linear-gradient(180deg, #f84d5a 0%, #ef384d 100%);
    box-shadow: 0 14px 28px rgba(239, 56, 77, 0.18);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.auth-form-minimal .button:hover {
    background: linear-gradient(180deg, #ef4454 0%, #da2940 100%);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(239, 56, 77, 0.22);
}

.auth-form-minimal .button:active {
    transform: translateY(0);
}

.auth-helper-link {
    display: inline-flex;
    justify-content: center;
    margin-top: 0.15rem;
    color: #155db6;
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-helper-link:hover {
    color: #0f4f9a;
}

.auth-card-status {
    text-align: center;
}

.auth-status-copy {
    display: grid;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.auth-status-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 0.96;
    letter-spacing: -0.03em;
}

.auth-status-copy .muted {
    margin: 0;
    line-height: 1.6;
}

.auth-status-copy .button {
    width: 100%;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.message {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(17, 97, 73, 0.08);
}

.site-footer {
    padding: 1rem 0 1.4rem;
}

.site-footer p {
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.links-table td::before {
    display: none;
}

@keyframes card-rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ambient-float {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -10px, 0) scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell::before,
    .auth-shell::after,
    .auth-card-minimal,
    .login-brand,
    .auth-form-minimal > *,
    .create-card,
    .create-title-block,
    .create-meta-row,
    .stacked-form-branded > * {
        animation: none !important;
    }

    .auth-form-minimal input,
    .password-toggle,
    .auth-form-minimal .button,
    .stacked-form-branded input {
        transition: none;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100%, calc(100% - 1.1rem));
    }

    .container-wide {
        width: min(100%, calc(100% - 1rem));
    }

    .header-shell {
        width: min(100%, calc(100% - 0.75rem));
    }

    .shell {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .hero,
    .auth-panel,
    .create-layout,
    .status-panel {
        padding: 2.4rem 0 3.4rem;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 2rem 0 1.25rem;
    }

    .create-head {
        flex-direction: column;
        margin-bottom: 0.85rem;
    }

    .create-meta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .alias-field {
        grid-template-columns: 1fr;
    }

    .created-link-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .alias-prefix {
        width: 100%;
        justify-content: flex-start;
        padding: 0.8rem 0.9rem;
    }

    .section-head,
    .dashboard-link-item {
        flex-direction: column;
    }

    .section-head {
        margin-bottom: 0.85rem;
    }

    .dashboard-link-meta {
        justify-items: start;
        white-space: normal;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.65rem;
    }

    .brand-rich {
        gap: 0.55rem;
        max-width: calc(100vw - 9rem);
    }

    .nav-logo {
        width: 38px;
        height: 38px;
    }

    .brand-stack {
        gap: 0.1rem;
    }

    .brand-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .brand-text {
        font-size: 0.96rem;
    }

    .nav-links {
        order: 2;
        width: 100%;
        justify-content: stretch;
        gap: 0.3rem;
        padding: 0.2rem;
    }

    .nav-links {
        display: none;
    }

    .nav-link {
        flex: 1 1 0;
        min-height: 42px;
        padding: 0.65rem 0.8rem;
    }

    .profile-chip {
        order: 1;
        padding-right: 0.65rem;
        gap: 0.55rem;
        max-width: calc(100vw - 1rem);
    }

    .profile-copy {
        max-width: 8.5rem;
    }

    .profile-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile-dropdown {
        left: auto;
        right: 0;
        width: min(18rem, calc(100vw - 1rem));
    }

    .hero-minimal,
    .auth-shell {
        min-height: auto;
    }

    .auth-shell {
        padding: 1.5rem 0 3rem;
    }

    .create-layout {
        grid-template-columns: 1fr;
    }

    .create-shell {
        max-width: 100%;
        padding: 1.75rem 0 3.2rem;
    }

    .create-shell-compact {
        max-width: 100%;
    }

    .auth-card-minimal,
    .form-card-branded,
    .dashboard-links,
    .table-wrap,
    .status-card,
    .empty-state {
        border-radius: 20px;
    }

    .auth-card-minimal,
    .form-card-branded,
    .dashboard-links,
    .status-card,
    .empty-state,
    .table-card .table-wrap {
        box-shadow: 0 18px 40px rgba(15, 52, 99, 0.1);
    }

    .auth-card-minimal,
    .form-card-branded,
    .status-card {
        padding: 1.35rem;
    }

    .dashboard-links {
        padding: 1.1rem;
    }

    .login-brand {
        margin-bottom: 0.9rem;
    }

    .login-logo {
        width: 138px;
    }

    .auth-form-minimal,
    .stacked-form-branded {
        gap: 0.75rem;
    }

    .create-prefix,
    .profile-summary-item,
    .created-link-card {
        width: 100%;
    }

    .create-prefix,
    .profile-summary-item {
        justify-content: flex-start;
    }

    .created-link-card {
        padding: 0.9rem;
    }

    .created-link-url,
    .table-meta code {
        font-size: 0.94rem;
    }

    .copy-link-button,
    .page-header .button,
    .create-head .button,
    .section-head .button,
    .status-card .action-row .button,
    .create-form-actions .button {
        width: 100%;
    }

    .create-form-actions {
        flex-direction: column;
    }

    .empty-state {
        margin-bottom: 3rem;
    }

    .table-card {
        padding-bottom: 3rem;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-summary {
        text-align: center;
    }

    .table-wrap-responsive {
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .links-table {
        display: block;
        width: 100%;
    }

    .links-table thead {
        display: none;
    }

    .links-table tbody {
        display: grid;
        gap: 0.9rem;
    }

    .links-table tr {
        display: block;
        padding: 1rem;
        border: 1px solid rgba(21, 93, 182, 0.12);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 16px 32px rgba(15, 52, 99, 0.08);
    }

    .links-table td {
        display: grid;
        gap: 0.4rem;
        padding: 0.72rem 0;
        border-bottom: 1px solid rgba(223, 212, 195, 0.8);
    }

    .links-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .links-table td:first-child {
        padding-top: 0;
    }

    .links-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #155db6;
    }

    .links-table td[data-label="Actions"]::before {
        margin-bottom: 0.1rem;
    }

    .links-table td a {
        word-break: break-word;
    }

    .action-row {
        align-items: stretch;
        gap: 0.65rem;
    }

    .action-row > *,
    .action-row form {
        width: 100%;
    }

    .action-row .button {
        width: 100%;
    }

    .status-card .action-row {
        flex-direction: column;
    }

    .site-footer {
        padding: 0.85rem 0 1.1rem;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding: 0.9rem 0;
    }

    .nav-logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-rich {
        max-width: calc(100vw - 7rem);
    }

    .brand-text {
        font-size: 0.9rem;
    }

    .profile-chip {
        padding: 0.28rem 0.55rem 0.28rem 0.32rem;
    }

    .profile-label {
        display: none;
    }

    .profile-copy {
        max-width: 6.75rem;
    }

    .auth-card-minimal,
    .form-card-branded,
    .status-card {
        padding: 1.1rem;
    }

    .dashboard-links {
        padding: 0.95rem;
    }

    .create-head h1,
    .form-card h1 {
        font-size: clamp(1.85rem, 9vw, 2.3rem);
    }

    .section-head h2 {
        font-size: 1.45rem;
    }

    .create-prefix,
    .profile-summary-item,
    .created-link-card,
    .links-table tr {
        border-radius: 16px;
    }

    .password-field input {
        padding-right: 4.3rem;
    }

    .password-toggle {
        right: 0.55rem;
        font-size: 0.84rem;
    }

    .alias-prefix {
        padding: 0.72rem 0.85rem;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .created-link-url {
        font-size: 0.9rem;
    }

    .links-table td {
        padding: 0.65rem 0;
    }
}
