:root {
    --accent: #635bff;
    --accent-dark: #5249df;
    --ink: #202236;
    --muted: #7d8093;
    --line: #ececf2;
    --surface: #f8f9fc;
    --radius: 15px;
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    color: var(--ink);
    background: var(--surface);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}
button,
a {
    touch-action: manipulation;
}
button {
    cursor: pointer;
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    color: inherit;
}
button,
input,
textarea,
select {
    outline-offset: 3px;
}
:focus-visible {
    outline: 3px solid #9e99ff;
}
button svg,
a svg {
    flex-shrink: 0;
}
[hidden] {
    display: none !important;
}
h1,
h2,
h3,
p {
    margin: 0;
}
h1,
h2,
h3 {
    letter-spacing: -0.035em;
}
h2 {
    font-size: 22px;
    font-weight: 650;
}
label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 19px 0 8px;
}
input:not([type='checkbox']):not([type='color']),
textarea,
select {
    width: 100%;
    border: 1px solid #e0e1eb;
    border-radius: 8px;
    background: white;
    padding: 9px 12px;
    color: var(--ink);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder {
    color: #63636e;
}
input:focus,
textarea:focus,
select:focus {
    border-color: #9890ff;
    box-shadow: 0 0 0 3px #635bff0d;
}
textarea {
    resize: vertical;
}
input[type='checkbox'] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 35px;
    line-height: 1;
    font-weight: 760;
    letter-spacing: -2px;
    width: fit-content;
}
.brand-dot {
    color: var(--accent);
    margin-left: -8px;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: block;
    flex-shrink: 0;
    border-radius: 12px;
}
.eyebrow {
    color: #636371;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.8px;
}
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background 0.18s,
        transform 0.18s,
        box-shadow 0.18s;
    min-height: 44px;
}
.button:hover:not(:disabled) {
    transform: translateY(-1px);
}
.button.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 8px #635bff15;
}
.button.primary:hover:not(:disabled) {
    background: var(--accent-dark);
    box-shadow: 0 5px 12px #635bff25;
}
.button.secondary {
    background: white;
    border-color: #e3e3ee;
    color: #585b70;
}
.button.secondary:hover {
    background: #f8f8fc;
}
.button.light {
    background: white;
    color: #5b4aba;
    box-shadow: 0 4px 13px #6e55c70d;
}
.button.danger {
    background: #e34d62;
    color: white;
}
.button.small {
    padding: 7px 12px;
    min-height: 40px;
    font-size: 14px;
}
.wide {
    width: 100%;
}
.icon-button {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #626370;
    border-radius: 7px;
    padding: 0;
}
.icon-button:hover {
    background: #f0eefb;
    color: var(--accent);
}
.text-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    padding: 0;
    background: none;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
}
.text-button:hover {
    color: var(--accent-dark);
}
.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.7px;
    background: #f1f1f7;
    color: #656476;
}
.purple {
    background: #eeeaff;
    color: #6955c2;
}
.muted {
    color: var(--muted);
}
.centered {
    text-align: center;
}
.boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: var(--muted);
    padding: 30px;
}
.boot h1 {
    color: var(--ink);
}

/* Sign-in */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 53% 47%;
    background: white;
}
.auth-story {
    background: #f0edfb;
    position: relative;
    min-height: 820px;
    overflow: hidden;
    padding: 44px 10%;
    display: flex;
    flex-direction: column;
}
.auth-story::after {
    content: '';
    position: absolute;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, #ded8fa 0, transparent 68%);
    right: -220px;
    top: 200px;
    pointer-events: none;
}
.story-content {
    padding-top: 80px;
    z-index: 1;
}
.story-content .eyebrow {
    color: #6d5e9a;
    font-size: 14px;
}
.story-content h1 {
    font-size: clamp(48px, 4.8vw, 74px);
    line-height: 1.07;
    font-weight: 650;
    margin: 25px 0 24px;
    color: #30294e;
    letter-spacing: -4px;
}
.story-content h1 em {
    font-style: normal;
    color: #6e5bac;
}
.story-content p {
    font-size: 15px;
    color: #6c657d;
    line-height: 1.85;
}
.story-tags {
    display: flex;
    gap: 17px;
    margin-top: 26px;
}
.story-tags span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #69607e;
}
.connection-art {
    min-height: 270px;
    position: relative;
    max-width: 490px;
    width: 100%;
    margin: 28px auto 0;
}
.art-orbit {
    position: absolute;
    border: 1px dashed #d1c7ed;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
}
.orbit-one {
    width: 92%;
    height: 67%;
}
.orbit-two {
    width: 60%;
    height: 96%;
    transform: translate(-50%, -50%) rotate(53deg);
}
.art-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-6deg);
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 22px 32px;
    border-radius: 17px;
    background: #ffffffeb;
    border: 1px solid white;
    box-shadow: 0 20px 45px #8971c51b;
    color: #44375f;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -1px;
}
.art-core .brand-mark {
    width: 42px;
    height: 42px;
}
.art-cursor {
    color: #6c5d95;
    margin-left: 3px;
}
.art-node {
    position: absolute;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #fff9;
    color: #6d5d8e;
    box-shadow: 0 8px 20px #8971c50a;
    border: 1px solid #fffd;
}
.node-top {
    top: 9%;
    left: 63%;
    transform: rotate(10deg);
}
.node-left {
    top: 51%;
    left: 2%;
    transform: rotate(-12deg);
}
.node-right {
    top: 61%;
    right: 2%;
    transform: rotate(12deg);
}
.art-caption {
    position: absolute;
    bottom: -3px;
    text-align: center;
    width: 100%;
    color: #6a607a;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.auth-story footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #686171;
    margin-top: auto;
    padding-top: 40px;
}
.auth-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.auth-footer-links a {
    color: var(--accent-dark);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: #635bff66;
    text-underline-offset: 4px;
}
.auth-footer-links a:hover {
    text-decoration-color: currentColor;
}
.auth-form-side {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 70px 40px;
    position: relative;
}
.auth-form-wrap {
    width: 100%;
    max-width: 360px;
}
.auth-form-wrap .pill {
    margin-bottom: 22px;
    padding: 6px 9px;
}
.auth-form-wrap h2 {
    font-size: 33px;
    letter-spacing: -1.3px;
    margin-bottom: 10px;
}
.auth-form-wrap > p {
    color: #64636f;
    font-size: 16px;
    line-height: 1.75;
}
.auth-form-wrap form {
    margin-top: 32px;
}
.auth-form-wrap label {
    color: #606073;
}
.auth-form-wrap input {
    font-size: 16px;
    padding: 10px 12px !important;
}
.auth-form-wrap .button {
    padding: 14px 16px;
    margin-top: 8px;
}
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 65px !important;
}
.password-field button {
    position: absolute;
    right: 14px;
    top: 15px;
    border: none;
    background: none;
    font-size: 14px;
    color: #656270;
}
.closed-notice {
    display: flex;
    gap: 11px;
    color: #676178;
    padding: 17px;
    background: #f8f7fc;
    border: 1px solid #f0edf7;
    border-radius: 9px;
    margin-top: 28px;
}
.closed-notice > svg {
    flex-shrink: 0;
    margin-top: 3px;
}
.closed-notice strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #6c6078;
    margin-bottom: 4px;
}
.closed-notice span {
    font-size: 15px;
    line-height: 1.7;
    display: block;
}
.auth-privacy {
    margin-top: 28px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px !important;
    color: #65636e !important;
}
.auth-privacy a {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-switch {
    text-align: center;
    margin-top: 25px !important;
    font-size: 16px;
}
.auth-switch button {
    margin-left: 5px;
}
.auth-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: absolute;
    bottom: 40px;
    letter-spacing: 2px;
    font-size: 14px;
    color: #65636b;
}
.auth-mobile-footer {
    display: none;
    letter-spacing: normal;
}
.auth-mobile-brand {
    display: none;
}

/* Workspace */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 256px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    background: white;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 30px 18px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 30;
}
.sidebar .brand {
    margin-left: 16px;
    margin-bottom: 32px;
    font-size: 34px;
}
.nav-label {
    font-size: 13px;
    font-weight: 650;
    color: #65636e;
    letter-spacing: 1.2px;
    margin: 0 14px 12px;
}
.nav-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    padding: 13px 15px;
    color: #646371;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: left;
}
.nav-item svg {
    width: 20px;
    height: 20px;
}
.nav-item:hover {
    background: #f9f8fd;
    color: #6a617c;
}
.nav-item.selected {
    background: #f0ecff;
    color: #6a55b4;
    font-weight: 600;
}
.nav-count {
    margin-left: auto;
    background: #e7dffc;
    border-radius: 4px;
    font-size: 14px;
    padding: 0 5px;
    color: #6f59a2;
}
.admin-label {
    margin-top: 28px;
}
.sidebar-bottom {
    margin-top: auto;
    padding-top: 32px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    border-top: 1px solid #f0edf5;
    padding: 20px 3px 0;
    margin-top: 12px;
    width: 100%;
    text-align: left;
}
.user-avatar,
.top-avatar {
    display: grid;
    place-items: center;
    background: #eee6e2;
    color: #766058;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    border: 2px solid white;
}
.user-profile > span:nth-child(2) {
    min-width: 0;
}
.user-profile strong {
    font-size: 15px;
    font-weight: 600;
    display: block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}
.user-profile small {
    display: block;
    font-size: 14px;
    color: #68626d;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-profile > svg {
    color: #67626d;
    margin-left: auto;
}
.main-shell {
    margin-left: 256px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    height: 77px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    color: #64636e;
}
.breadcrumb strong {
    color: #686478;
    font-weight: 500;
}
.crumb-divider {
    color: #65636a;
}
.topbar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}
.topbar-create {
    flex-shrink: 0;
}
.top-avatar {
    border: 0;
    width: 36px;
    height: 36px;
    font-size: 16px;
}
.mobile-menu {
    display: none;
}
.main-content {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 38px 40px 30px;
    flex: 1;
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.page-heading .eyebrow {
    font-size: 13px;
    letter-spacing: 1.7px;
    margin-bottom: 9px;
    color: #67626f;
}
.page-heading h1 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 630;
    letter-spacing: -1.1px;
}
.page-heading p {
    margin-top: 8px;
    color: #66626e;
    font-size: 16px;
}
.greeting-spark {
    font-size: 24px;
    margin-left: 11px;
    color: #6f634f;
}
.heading-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #e9e6ef;
    border-radius: 8px;
    padding: 0 12px;
    margin: 0;
    height: 44px;
    font-weight: 500;
    color: #686273;
}
.select-wrap select {
    appearance: none;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 15px;
    width: 100px;
    color: #686273;
}
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 30px 32px;
    border-radius: 13px;
    background: #efeafa;
    border: 1px solid #e8e0f6;
    min-height: 230px;
    position: relative;
    margin-bottom: 25px;
}
.welcome-banner .eyebrow {
    font-size: 14px;
    color: #6e5f7e;
    letter-spacing: 1.5px;
}
.welcome-banner h2 {
    font-size: 34px;
    line-height: 1.2;
    color: #64527e;
    margin: 12px 0;
    letter-spacing: -0.9px;
}
.welcome-banner p {
    color: #6d6079;
    font-size: 16px;
    margin-bottom: 18px;
    max-width: none;
}
.welcome-banner .button {
    font-size: 15px;
    min-height: 44px;
    padding: 8px 12px;
}
.banner-art {
    position: relative;
    width: 49%;
    height: 200px;
}
.banner-circle {
    width: 230px;
    height: 230px;
    border: 1px solid #dcd1ef;
    border-radius: 50%;
    position: absolute;
    left: 15%;
    top: -10px;
}
.banner-circle::after {
    content: '';
    width: 275px;
    height: 150px;
    border: 1px dashed #dcd1ef;
    border-radius: 50%;
    position: absolute;
    left: -23px;
    top: 39px;
    transform: rotate(-18deg);
}
.mini-link-card {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    transform: rotate(-7deg);
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 19px;
    border-radius: 11px;
    border: 1px solid #fff;
    box-shadow: 0 18px 35px #b5a2d22b;
}
.mini-icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    background: #f0eafc;
    color: #6d5e87;
    border-radius: 9px;
}
.mini-link-card small {
    color: #696170;
    font-size: 14px;
    letter-spacing: 1.3px;
    display: none;
    margin-bottom: 4px;
}
.mini-link-card strong {
    font-size: 16px;
    font-weight: 550;
    color: #705e7f;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-arrow {
    margin-left: auto;
    font-size: 22px;
    color: #6c6078;
}
.art-spark {
    position: absolute;
    color: #6d607b;
}
.spark-one {
    right: 25px;
    top: 19px;
    font-size: 35px;
}
.spark-two {
    left: 38px;
    bottom: 17px;
    font-size: 20px;
}
.floating-label {
    display: flex;
    align-items: center;
    gap: 13px;
    position: absolute;
    right: 14px;
    bottom: 19px;
    background: #f9f5ff;
    border: 1px solid white;
    padding: 10px 15px;
    transform: rotate(5deg);
    color: #6d6078;
    font-size: 14px;
    border-radius: 7px;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 25px;
}
.metric-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 24px;
    box-shadow: 0 2px 5px #28224101;
}
.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #676271;
    gap: 10px;
}
.metric-icon {
    display: grid;
    place-items: center;
    height: 38px;
    width: 38px;
    border-radius: 8px;
    flex-shrink: 0;
}
.metric-icon.purple {
    background: #f2ecfc;
    color: #6e5e87;
}
.metric-icon.blue {
    background: #edf0fb;
    color: #596483;
}
.metric-icon.mint {
    background: #edf8f3;
    color: #4f6c5f;
}
.metric-icon.peach {
    background: #fcf1e8;
    color: #726252;
}
.metric-value {
    display: block;
    font-size: 40px;
    font-weight: 650;
    letter-spacing: -1px;
    margin: 8px 0 6px;
}
.metric-note {
    font-size: 14px;
    color: #67626e;
    min-height: 22px;
}
.positive {
    color: #4d6d5c;
    margin-right: 4px;
}
.negative {
    color: #7c5d62;
    margin-right: 4px;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 24px 15px;
}
.panel-heading h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #696177;
    letter-spacing: -0.2px;
}
.panel-heading p {
    font-size: 15px;
    color: #68626f;
    margin-top: 4px;
}
.chart-panel {
    margin-bottom: 25px;
}
.live-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ae9ed2;
    margin-left: 2px;
}
.chart-key {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #68626f;
}
.chart-key > span {
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background: #b7a4db;
}
.chart-container {
    position: relative;
    padding: 10px 20px 0 12px;
}
.activity-chart {
    width: 100%;
    height: auto;
    display: block;
}
.chart-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffffed;
    padding: 13px 22px;
    border-radius: 15px;
    white-space: normal;
    text-align: center;
    width: min(360px, 80%);
}
.chart-empty-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: #f7f4fd;
    color: #6a607a;
    border-radius: 10px;
    margin-bottom: 8px;
}
.chart-empty strong {
    font-size: 16px;
    color: #6a6076;
    font-weight: 500;
}
.chart-empty > span:last-child {
    color: #68626e;
    font-size: 14px;
    margin-top: 3px;
}
.chart-caption {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 24px 16px;
    font-size: 14px;
    color: #68626e;
}
.recent-panel .panel-heading {
    padding-bottom: 20px;
}
.recent-panel .text-button {
    font-size: 14px;
    color: #6e5f7f;
}
.link-row {
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    border-top: 1px solid #f3f0f7;
}
.link-avatar {
    background: #f0f0fa;
    color: #69607d;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.link-avatar.lavender {
    background: #f6edf9;
    color: #715e79;
}
.link-info {
    flex: 1;
    min-width: 0;
}
.link-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #686171;
    flex-wrap: wrap;
}
.link-title {
    border: 0;
    padding: 0;
    background: none;
    font-size: 18px;
    font-weight: 600;
    color: #6e617a;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 65%;
    line-height: 1.5;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.status-pill.active {
    color: #566a60;
    background: #f0f7f3;
}
.status-pill.active > span {
    width: 3px;
    height: 3px;
    background: #9ec8b0;
    border-radius: 50%;
}
.status-pill.paused {
    color: #6b6077;
    background: #f5f1fa;
}
.status-pill.expired {
    color: #755f64;
    background: #fcf1f3;
}
.link-url-line {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    margin-top: 5px;
    overflow: hidden;
    flex-wrap: wrap;
    row-gap: 4px;
}
.link-url-line a {
    color: #6e5f81;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.destination-arrow {
    color: #68626e;
}
.destination {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    color: #68626e;
}
.link-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-top: 10px;
    color: #68626e;
    flex-wrap: wrap;
}
.tag {
    background: #f7f5fa;
    padding: 2px 7px;
    border-radius: 3px;
    color: #6b6075;
}
.ad-label {
    color: #6e6075;
}
.link-clicks {
    display: flex;
    flex-direction: column;
    text-align: right;
    padding: 0 20px;
}
.link-clicks strong {
    font-size: 24px;
    color: #6d6077;
    font-weight: 600;
}
.link-clicks > span {
    color: #68626d;
    font-size: 14px;
}
.link-actions {
    display: flex;
    gap: 3px;
}
.link-actions .icon-button {
    color: #6a6170;
    width: 40px;
    height: 40px;
}
.overview-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #69616e;
    font-size: 14px;
    margin: 26px 0 0;
}
.app-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    border-top: 1px solid var(--line);
    color: #69616f;
    font-size: 14px;
}
.footer-dot {
    padding: 0 10px;
    color: #69626e;
}
.empty-state {
    text-align: center;
    padding: 45px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.empty-illustration {
    width: 70px;
    height: 65px;
    display: grid;
    place-items: center;
    background: #f8f5fe;
    border: 1px solid #eee8f9;
    border-radius: 17px;
    color: #6b607a;
    position: relative;
    transform: rotate(-5deg);
    margin-bottom: 22px;
}
.empty-illustration > span {
    position: absolute;
    right: -8px;
    top: -12px;
    font-size: 24px;
    background: white;
}
.empty-state h3 {
    color: #70617e;
    font-size: 17px;
    font-weight: 500;
}
.empty-state p {
    color: #6a6172;
    font-size: 14px;
    margin: 8px 0 20px;
    max-width: 420px;
    line-height: 1.8;
}
.empty-state .button {
    font-size: 14px;
}
.links-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 23px;
}
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
}
.filter-tab {
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: #6a6073;
    border-radius: 6px;
    font-size: 15px;
    min-height: 44px;
}
.filter-tab.selected {
    color: #6f5e86;
    background: #f4effb;
    font-weight: 600;
}
.search-field {
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    border: 1px solid #eae6ef;
    background: #fff;
    border-radius: 7px;
    color: #68626e;
}
.search-field input {
    border: none !important;
    padding: 9px 0 !important;
    font-size: 16px;
    max-width: 200px;
    box-shadow: none !important;
    min-height: 44px;
}
.list-labels {
    display: flex;
    gap: 25px;
    padding: 12px 40px;
    font-size: 13px;
    letter-spacing: 1px;
    color: #68626e;
    background: #fcfbfe;
    border-top: 1px solid #f5f1f9;
}
.list-labels > span:first-child {
    flex: 1;
}
.list-labels > span:last-child {
    width: 160px;
    text-align: center;
}
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    color: #6b6073;
    font-size: 14px;
    border-top: 1px solid #f4f0f8;
}
.pagination > div {
    display: flex;
    gap: 7px;
}
.pagination .button {
    font-size: 14px;
    color: #6e5f79;
}
.info-strip {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #f0edf9;
    padding: 16px 20px;
    color: #6e5f7f;
    font-size: 15px;
    border: 1px solid #eae3f5;
    border-radius: 9px;
    margin-bottom: 25px;
}
.info-strip > svg {
    flex-shrink: 0;
}
.qr-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.qr-card {
    padding: 18px 22px 22px;
    text-align: center;
}
.qr-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qr-card-heading .pill {
    font-size: 14px;
    background: #f4f0fb;
    color: #6e5f7d;
}
.qr-image-button {
    border: none;
    background: transparent;
    display: block;
    margin: 22px auto;
    padding: 0;
}
.qr-image-button img {
    max-width: 100%;
}
.qr-card h3 {
    font-size: 20px;
    font-weight: 550;
    color: #73627e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qr-slug {
    color: #6e607a;
    font-size: 15px;
    display: block;
    overflow-wrap: anywhere;
    margin-top: 5px;
}
.qr-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3edf9;
    padding: 15px 0;
    margin-top: 20px;
}
.qr-card-stats > span:first-child {
    display: flex;
    gap: 5px;
    align-items: center;
    color: #6d6076;
    font-size: 14px;
}
.qr-card .button {
    font-size: 15px;
    color: #6f5e81;
}
.ad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.ad-card-preview {
    padding: 25px;
    min-height: 220px;
    text-align: center;
    background: #faf7ff;
}
.ad-card-preview > img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 8px;
}
.ad-card-preview .pill {
    display: block;
    width: fit-content;
    margin: 0 auto 15px;
    background: white;
}
.ad-preview-symbol {
    color: var(--ad-accent);
    margin: 10px;
    opacity: 0.5;
}
.ad-card-preview h3 {
    color: #726080;
    font-size: 23px;
    margin: 13px 0 7px;
    overflow-wrap: anywhere;
}
.ad-card-preview p {
    color: #6b6074;
    font-size: 14px;
    max-height: 65px;
    overflow: hidden;
}
.ad-preview-button {
    display: inline-block;
    background: var(--ad-accent);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}
.ad-card-detail {
    padding: 18px 22px;
}
.ad-card-detail > strong,
.ad-card-detail > span {
    display: block;
}
.ad-card-detail strong {
    font-size: 15px;
    color: #766084;
}
.ad-card-detail > span {
    font-size: 14px;
    color: #6d6075;
    margin-top: 5px;
}
.ad-card-detail > div {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f4edf9;
    margin-top: 15px;
    padding-top: 15px;
    font-size: 14px;
    color: #6d6074;
}
.breakdown-grid,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 25px;
}
.breakdown-panel .panel-heading {
    padding-bottom: 0;
}
.breakdown-list {
    padding: 8px 24px 22px;
}
.breakdown-row {
    margin-top: 18px;
}
.breakdown-row > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 7px;
}
.breakdown-name {
    color: #715e80;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank {
    color: #6b6073;
    font-size: 14px;
    margin-right: 10px;
}
.breakdown-row strong {
    white-space: nowrap;
    color: #705e7d;
    font-weight: 500;
}
.breakdown-row small {
    color: #6c6073;
    margin-left: 6px;
    font-size: 14px;
}
.breakdown-track {
    height: 4px;
    border-radius: 5px;
    background: #f8f3fc;
    margin-left: 22px;
    overflow: hidden;
}
.breakdown-track > span {
    display: block;
    height: 100%;
    background: #d5c1eb;
    border-radius: 5px;
}
.breakdown-empty {
    padding: 35px 24px;
    color: #6e6078;
    font-size: 16px;
    text-align: center;
}
.breakdown-empty > span {
    display: inline-block;
    color: #6b6071;
    font-size: 14px;
    margin-top: 6px;
}
.analytics-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #6e6079;
    margin-bottom: 25px;
}
.analytics-filter select {
    width: auto;
    max-width: 280px;
    font-size: 15px;
    padding: 8px;
    color: #705e81;
}
.analytics-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6e6077;
    font-size: 14px;
    line-height: 1.7;
}
.registration-control {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #f2edf9;
    border: 1px solid #e9dff4;
    padding: 20px 24px;
    border-radius: 11px;
    margin-bottom: 25px;
}
.registration-icon {
    width: 42px;
    height: 42px;
    background: #e8def4;
    color: #735c86;
    border-radius: 10px;
    display: grid;
    place-items: center;
}
.registration-control strong {
    font-size: 18px;
    color: #735c84;
}
.registration-control p {
    font-size: 15px;
    color: #6f5f78;
    margin-top: 3px;
}
.registration-control .switch {
    margin-left: auto;
}
.switch {
    display: inline-flex;
    margin: 0;
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}
.switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    z-index: 1;
    cursor: pointer;
}
.switch > span {
    background: #d5c5e2;
    border-radius: 20px;
    width: 100%;
    height: 100%;
    transition: background 0.2s;
}
.switch > span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px #0001;
    transition: transform 0.2s;
}
.switch input:checked + span {
    background: var(--accent);
}
.switch input:checked + span::after {
    transform: translateX(16px);
}
.switch input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.admin-tabs {
    margin-bottom: 23px;
    border-bottom: 1px solid #eae1f3;
    padding-bottom: 12px;
}
.table-scroll {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}
th {
    font-size: 14px;
    letter-spacing: 1px;
    background: #fcf9fe;
    color: #6e6076;
    padding: 12px 20px;
    font-weight: 600;
}
td {
    font-size: 16px;
    padding: 17px 20px;
    color: #715e7e;
    border-top: 1px solid #f4edf9;
}
td > strong {
    font-size: 17px;
    font-weight: 600;
    color: #745c84;
}
.table-sub {
    display: block;
    font-size: 14px;
    color: #6e6078;
    margin-top: 3px;
}
.table-destination {
    display: block;
    max-width: 390px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #6c6073;
    margin-top: 4px;
}
td .text-button {
    font-size: 15px;
    margin-right: 10px;
}
.table-empty {
    text-align: center;
    padding: 45px;
}
.settings-panel {
    padding: 0 24px 25px;
}
.settings-panel .panel-heading {
    padding-left: 0;
    padding-right: 0;
}
.account-details {
    margin: 5px 0 27px;
}
.account-details > div {
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f3ecf8;
    font-size: 16px;
}
.account-details dt {
    color: #6e5f78;
}
.account-details dd {
    color: #755f86;
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
}
.settings-copy {
    font-size: 16px;
    color: #705e7d;
    line-height: 1.9;
}
.settings-panel label {
    color: #715e7d;
}
.loading-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    min-height: 400px;
    color: #6f5f7d;
    font-size: 14px;
}
.loading-spinner {
    width: 27px;
    height: 27px;
    border: 2px solid #eaddf4;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.error-retry {
    text-align: center;
    padding: 0 25px 30px;
}
.preview-banner {
    font-size: 14px;
    padding: 10px 30px;
    text-align: center;
    background: #fff5d5;
    color: #786432;
}
/* Dialogs and link editor */
.modal {
    border: 1px solid #e9e3f0;
    border-radius: 17px;
    padding: 0;
    width: min(500px, calc(100% - 32px));
    max-height: calc(100vh - 50px);
    background: white;
    box-shadow: 0 30px 100px #30254528;
}
.modal::backdrop {
    background: #28213955;
    backdrop-filter: blur(5px);
}
.modal-wide {
    width: min(860px, calc(100% - 32px));
}
.modal-inner {
    padding: 28px;
}
.modal-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.modal-heading h2 {
    font-size: 28px;
    line-height: 1.2;
    color: #51425f;
    font-weight: 600;
    margin-top: 8px;
}
.modal-heading p {
    font-size: 16px;
    color: #71637c;
    margin-top: 8px;
}
.modal-heading .eyebrow {
    font-size: 14px;
    color: #6f5f7b;
}
.modal-heading > button {
    flex-shrink: 0;
}
.editor-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee7f5;
    margin-bottom: 23px;
}
.editor-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    padding: 0 0 13px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #6e6078;
    background: transparent;
    white-space: nowrap;
    min-height: 44px;
}
.editor-tab.selected {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.modal label {
    color: #71617f;
}
.modal input,
.modal textarea {
    font-size: 14px;
}
.field-hint {
    font-size: 14px;
    color: #6b6171;
    margin-top: 7px;
    line-height: 1.8;
}
.slug-field {
    display: flex;
    align-items: center;
    border: 1px solid #e0d9eb;
    border-radius: 8px;
    overflow: hidden;
}
.slug-field:focus-within {
    border-color: #9890ff;
    box-shadow: 0 0 0 3px #635bff0d;
    outline: 3px solid #9e99ff;
    outline-offset: 3px;
}
.slug-field > span {
    padding-left: 13px;
    color: #72627e;
    font-size: 16px;
    white-space: nowrap;
}
.slug-field input {
    border: 0 !important;
    padding-left: 4px !important;
}
.slug-field input:focus {
    outline: none;
    box-shadow: none;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 400;
    margin-top: 20px;
}
.checkbox-label > input {
    flex-shrink: 0;
}
.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-error {
    font-size: 15px;
    color: #ab3f54;
    margin-top: 14px;
    line-height: 1.8;
}
.form-error:empty {
    margin-top: 8px;
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid #eee7f5;
    padding-top: 21px;
    margin-top: 23px;
}
.modal-footer > span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #6e6075;
}
.modal-footer > div {
    display: flex;
    gap: 9px;
}
.modal-footer .button {
    font-size: 16px;
}
.editor-notice {
    display: flex;
    gap: 13px;
    padding: 17px;
    background: #f5f0fb;
    border-radius: 8px;
    color: #705e80;
}
.editor-notice > svg {
    flex-shrink: 0;
}
.editor-notice strong {
    font-size: 16px;
    font-weight: 550;
    display: block;
    color: #735c84;
}
.editor-notice span {
    font-size: 15px;
    color: #6e5f7a;
    display: block;
    margin-top: 4px;
}
.color-field {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6f5f7a;
}
.color-field input {
    appearance: none;
    width: 39px;
    height: 37px;
    border: 1px solid #dfd3e9;
    border-radius: 7px;
    padding: 3px;
    cursor: pointer;
    background: white;
}
.color-field img {
    margin-left: auto;
}
.ad-enable-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: #f8f3fc;
    padding: 16px;
    border: 1px solid #eee2f7;
    border-radius: 8px;
}
.ad-enable-row strong {
    font-size: 17px;
    color: #735c85;
}
.ad-enable-row p {
    font-size: 15px;
    color: #6f5f7a;
    margin-top: 3px;
}
.live-ad-preview {
    --preview-accent: #635bff;
    background: #f9f6fc;
    border: 1px solid #f0e8f7;
    border-radius: 10px;
    margin-top: 20px;
    padding: 17px 15px;
    text-align: center;
    min-width: 0;
    overflow-wrap: anywhere;
}
.live-ad-preview .pill {
    font-size: 14px;
}
.live-preview-icon {
    color: var(--preview-accent);
    opacity: 0.5;
    margin: 8px;
}
.live-ad-preview h3 {
    font-size: 17px;
    color: #755a89;
    margin: 8px 0;
}
.live-ad-preview p {
    font-size: 14px;
    color: #6f5f7a;
    max-height: 80px;
    overflow: hidden;
}
.preview-cta {
    display: inline-block;
    padding: 7px 13px;
    background: var(--preview-accent);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    margin-top: 15px;
}
.live-ad-preview small {
    display: block;
    margin-top: 18px;
    font-size: 14px;
    letter-spacing: 1px;
    color: #6d6074;
}
.created-success {
    display: grid;
    place-items: center;
    margin: 26px auto 16px;
    height: 52px;
    width: 52px;
    background: #eef8f1;
    color: #4e6c5c;
    border-radius: 50%;
}
.created-title {
    font-size: 19px;
    text-align: center;
    color: #78588b;
    margin-bottom: 20px;
}
.copy-url {
    display: flex;
    align-items: center;
    gap: 10px;
}
.copy-url input {
    color: var(--accent);
    font-size: 14px;
    min-width: 0;
}
.created-qr {
    margin: 25px auto;
    text-align: center;
}
.download-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.created-qr img {
    max-width: 100%;
}
.created-qr + .download-row {
    margin-bottom: 15px;
}
.confirm-message {
    color: #72617c;
    font-size: 15px;
    line-height: 1.9;
}
.action-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.action-menu button {
    display: flex;
    gap: 15px;
    align-items: center;
    border: 0;
    background: #fcf9fe;
    padding: 16px;
    font-size: 14px;
    border-radius: 8px;
    color: #735e84;
}
.action-menu button > svg:last-child {
    margin-left: auto;
}
.danger-text {
    color: #8c5862 !important;
}
.credential-box {
    padding: 17px;
    background: #f8f3fc;
    border: 1px solid #ede0f6;
    border-radius: 8px;
}
.credential-box label {
    margin-top: 8px;
    font-size: 14px;
}
.credential-box p {
    color: #765b88;
    font-size: 14px;
}
.credential-box input {
    color: #7a598e;
}
.toast {
    position: fixed;
    bottom: 27px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    background: #342943;
    color: white;
    border: 1px solid #ffffff20;
    box-shadow: 0 8px 25px #32213a22;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 14px;
    max-width: calc(100% - 32px);
    transition:
        opacity 0.2s,
        transform 0.2s;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Visitor redirect pages */
.gate-body {
    min-height: 100vh;
    background: #f6f3fb;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 45px 20px;
}
.gate-body > .brand {
    margin-bottom: 45px;
}
.gate-card {
    width: 100%;
    max-width: 480px;
    padding: 35px;
    border: 1px solid #eae2f2;
    border-radius: 18px;
    background: white;
    box-shadow: 0 14px 45px #9175aa0d;
    text-align: center;
}
.gate-card h1 {
    font-size: 30px;
    line-height: 1.2;
    margin: 17px 0 14px;
    color: #5f4471;
}
.gate-card p {
    color: #71607e;
    font-size: 16px;
    line-height: 1.9;
}
.gate-card label {
    text-align: left;
    color: #736083;
}
.gate-card input {
    margin-bottom: 13px;
}
.gate-card .eyebrow {
    color: #6e5f79;
    font-size: 14px;
}
.gate-card .pill {
    color: #6f5f7c;
    background: #f6f0fb;
    font-size: 14px;
}
.gate-card .button.primary {
    background: var(--accent);
    margin-top: 10px;
}
.gate-card .button.secondary {
    margin-top: 15px;
}
.gate-destination {
    font-size: 15px;
    color: #705e7b;
    padding: 20px 0 10px;
    overflow-wrap: anywhere;
}
.gate-destination strong {
    color: #785e8a;
    font-weight: 500;
}
.gate-note {
    color: #6d6076 !important;
    font-size: 14px !important;
    margin-top: 20px;
}
.ad-image {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 9px;
    margin-top: 20px;
}
.ad-description {
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.countdown-track {
    background: #f2edf8;
    height: 3px;
    margin-top: 12px;
    border-radius: 4px;
    overflow: hidden;
}
#countdown-progress {
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 0.2s linear;
}
.gate-footer {
    max-width: 480px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6c6074;
    padding: 23px 8px;
}
.privacy-card {
    max-width: 700px;
    text-align: left;
}
.privacy-card h2 {
    color: #755d87;
    margin-top: 25px;
    font-size: 18px;
}
.privacy-card p {
    margin-top: 13px;
    color: #746082;
    font-size: 15px;
}
.privacy-card .button {
    margin-top: 30px !important;
}

@media (min-width: 1600px) {
    .main-content {
        padding-top: 45px;
    }
    .welcome-banner {
        min-height: 255px;
    }
    .activity-chart {
        max-height: 260px;
    }
}

@media (max-width: 1150px) {
    .sidebar {
        width: 256px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .main-shell {
        margin-left: 256px;
    }
    .main-content {
        padding: 28px;
    }
    .topbar {
        padding: 0 28px;
    }
    .metric-card {
        padding: 24px;
    }
    .metrics-grid {
        gap: 12px;
    }
    .metric-note {
        font-size: 14px;
        min-height: 22px;
    }
    .link-actions {
        gap: 0;
    }
    .link-clicks {
        padding: 0 5px;
    }
    .page-heading h1 {
        font-size: 34px;
        line-height: 1.25;
    }
    .qr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .banner-art {
        width: 45%;
    }
    .floating-label {
        right: -10px;
        font-size: 14px;
    }
    .auth-story {
        padding: 35px 10%;
    }
    .story-tags {
        gap: 11px;
    }
    .story-tags span {
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .topbar-create.button {
        width: 40px;
        padding: 0;
    }
    .topbar-create span {
        display: none;
    }
    .sidebar {
        width: 256px;
        padding: 25px 10px 15px;
    }
    .main-shell {
        margin-left: 256px;
    }
    .nav-item {
        font-size: 16px;
        gap: 8px;
        padding: 13px 15px;
    }
    .page-heading {
        flex-wrap: wrap;
        gap: 18px;
    }
    .main-content {
        padding: 25px 22px;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .metric-value {
        font-size: 40px;
        font-weight: 650;
    }
    .metric-note {
        font-size: 14px;
        min-height: 22px;
    }
    .banner-art {
        width: 44%;
    }
    .banner-circle {
        left: 0;
        width: 170px;
        height: 170px;
        top: 10px;
    }
    .banner-circle::after {
        width: 200px;
        height: 110px;
        top: 28px;
        left: -15px;
    }
    .mini-link-card {
        padding: 11px;
        gap: 7px;
    }
    .mini-icon {
        width: 26px;
        height: 26px;
    }
    .mini-arrow {
        display: none;
    }
    .mini-link-card strong {
        font-size: 16px;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .floating-label {
        bottom: 40px;
        right: -10px;
    }
    .welcome-banner {
        padding: 25px;
    }
    .welcome-banner h2 {
        font-size: 34px;
    }
    .welcome-banner p {
        max-width: none;
        font-size: 16px;
    }
    .link-row {
        flex-wrap: wrap;
        padding: 24px;
        gap: 16px;
    }
    .link-info {
        min-width: calc(100% - 100px);
    }
    .link-actions {
        margin-left: auto;
    }
    .link-clicks {
        flex-direction: row;
        align-items: center;
        gap: 5px;
        margin-left: 49px;
    }
    .links-toolbar {
        flex-wrap: wrap;
        padding: 17px;
    }
    .search-field {
        width: 100%;
    }
    .search-field input {
        max-width: 100%;
        font-size: 16px;
        min-height: 44px;
    }
    .list-labels {
        display: none;
        font-size: 13px;
    }
    .breakdown-grid,
    .settings-grid {
        gap: 17px;
    }
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .qr-card {
        padding: 16px;
    }
    .ad-grid {
        grid-template-columns: 1fr;
    }
    .auth-story {
        padding: 35px 8%;
    }
    .story-content {
        padding-top: 80px;
    }
    .story-content h1 {
        font-size: 50px;
    }
    .story-tags {
        flex-wrap: wrap;
        gap: 12px;
    }
    .art-core {
        padding: 17px;
        font-size: 23px;
    }
    .connection-art {
        margin-top: 30px;
        min-height: 220px;
    }
    .art-node {
        width: 37px;
        height: 37px;
    }
    .node-left {
        left: -8px;
    }
    .node-right {
        right: -8px;
    }
    .auth-form-side {
        padding: 45px 30px;
    }
    .auth-form-wrap h2 {
        font-size: 28px;
    }
}

@media (max-width: 650px) {
    .auth-layout {
        display: block;
        min-height: 100vh;
        background: #faf8fe;
    }
    .auth-story {
        display: none;
    }
    .auth-mobile-brand {
        display: block;
        margin-bottom: 45px;
        align-self: flex-start;
    }
    .auth-form-side {
        min-height: 100vh;
        padding: 30px 30px 110px;
        justify-content: flex-start;
    }
    .auth-form-wrap {
        margin: auto 0;
        max-width: 400px;
    }
    .auth-form-wrap h2 {
        font-size: 32px;
    }
    .auth-form-wrap > p {
        font-size: 16px;
    }
    .auth-bottom {
        bottom: 25px;
        left: 30px;
        right: 30px;
    }
    .auth-mobile-footer {
        display: flex;
        justify-content: center;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
        width: 256px;
        box-shadow: 5px 0 20px #30254510;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-shell {
        margin-left: 256px;
    }
    .mobile-menu {
        display: inline-flex;
    }
    .topbar {
        height: 65px;
        padding: 0 17px;
    }
    .topbar-right {
        gap: 8px;
    }
    .breadcrumb {
        gap: 9px;
        font-size: 15px;
    }
    .breadcrumb > span:first-of-type {
        display: none;
    }
    .crumb-divider {
        display: none;
    }
    .topbar-right > a {
        display: none;
    }
    .main-content {
        padding: 27px 17px;
    }
    .page-heading h1 {
        font-size: 34px;
        line-height: 1.25;
    }
    .page-heading p {
        font-size: 16px;
        line-height: 1.8;
    }
    .page-heading .eyebrow {
        font-size: 13px;
    }
    .heading-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .heading-actions .button {
        font-size: 14px;
    }
    .welcome-banner {
        padding: 24px;
        min-height: 240px;
    }
    .welcome-banner h2 {
        font-size: 34px;
    }
    .welcome-banner p {
        max-width: none;
        font-size: 16px;
    }
    .banner-art {
        width: 40%;
        margin-left: -20px;
        opacity: 0.8;
    }
    .mini-link-card {
        left: -18px;
        top: 85px;
        right: -40px;
        padding: 12px;
    }
    .mini-link-card strong {
        font-size: 16px;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mini-link-card small {
        font-size: 14px;
        display: none;
    }
    .banner-circle {
        left: -30px;
    }
    .floating-label {
        display: none;
    }
    .spark-one {
        top: 45px;
        right: 2px;
    }
    .spark-two {
        bottom: 25px;
        left: 5px;
    }
    .metrics-grid {
        gap: 11px;
    }
    .metric-card {
        padding: 24px;
    }
    .metric-top {
        font-size: 16px;
        gap: 10px;
    }
    .metric-icon {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
    .metric-value {
        font-size: 40px;
        font-weight: 650;
    }
    .metric-note {
        font-size: 14px;
        min-height: 22px;
    }
    .panel-heading {
        padding: 20px 18px 15px;
    }
    .panel-heading p {
        font-size: 15px;
    }
    .activity-chart {
        min-height: 155px;
    }
    .chart-key {
        display: none;
        font-size: 14px;
    }
    .chart-container {
        padding: 5px 12px;
    }
    .chart-empty {
        padding: 10px;
        white-space: normal;
        width: min(360px, 80%);
    }
    .chart-caption {
        padding: 10px 18px 15px;
        font-size: 14px;
    }
    .recent-panel .panel-heading {
        padding: 20px 18px;
    }
    .recent-panel .text-button {
        font-size: 14px;
    }
    .link-row {
        gap: 16px;
        padding: 24px;
    }
    .link-title {
        font-size: 18px;
        line-height: 1.5;
        font-weight: 600;
    }
    .link-url-line {
        font-size: 16px;
        flex-wrap: wrap;
        row-gap: 4px;
    }
    .link-meta {
        font-size: 14px;
        gap: 10px;
        margin-top: 10px;
    }
    .qr-grid {
        gap: 12px;
    }
    .qr-card {
        padding: 14px 12px;
    }
    .qr-image-button {
        margin: 15px auto;
    }
    .qr-image-button img {
        width: 120px;
        height: 120px;
    }
    .qr-card h3 {
        font-size: 20px;
    }
    .qr-slug {
        font-size: 15px;
    }
    .qr-card .button {
        font-size: 15px;
        padding: 9px 7px;
        gap: 4px;
    }
    .qr-card-stats {
        font-size: 14px;
    }
    .qr-card-stats > span:first-child {
        font-size: 14px;
    }
    .qr-card .pill {
        font-size: 14px;
        padding: 4px;
    }
    .qr-card-heading .icon-button {
        width: 22px;
        height: 22px;
    }
    .analytics-filter {
        flex-wrap: wrap;
        gap: 9px;
        font-size: 15px;
    }
    .analytics-filter .muted {
        display: none;
    }
    .analytics-note {
        align-items: flex-start;
        font-size: 14px;
        line-height: 1.7;
    }
    .analytics-note svg {
        flex-shrink: 0;
        margin-top: 3px;
    }
    .registration-control {
        padding: 16px;
        gap: 12px;
    }
    .registration-control strong {
        font-size: 18px;
    }
    .registration-control p {
        font-size: 15px;
    }
    .registration-icon {
        display: none;
    }
    .admin-tabs {
        gap: 3px;
    }
    .admin-tabs button {
        font-size: 14px;
        padding: 7px 9px;
    }
    .app-footer {
        padding: 20px 17px;
        font-size: 14px;
    }
    .modal {
        max-height: calc(100dvh - 24px);
        width: calc(100% - 20px);
    }
    .modal-inner {
        padding: 23px 19px;
    }
    .modal-heading h2 {
        font-size: 28px;
    }
    .modal-heading p {
        font-size: 16px;
    }
    .editor-tabs {
        gap: 20px;
    }
    .editor-tab {
        font-size: 15px;
        gap: 5px;
        white-space: nowrap;
        min-height: 44px;
    }
    .editor-tab svg {
        width: 14px;
    }
    .form-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .live-ad-preview {
        min-height: 180px;
    }
    .modal-footer > span {
        display: none;
    }
    .modal-footer {
        justify-content: flex-end;
    }
    .modal-footer .button {
        font-size: 16px;
        padding: 10px 13px;
    }
    .copy-url {
        gap: 6px;
    }
    .copy-url .button {
        padding: 10px;
        font-size: 14px;
    }
    .gate-body {
        padding: 30px 15px;
    }
    .gate-body > .brand {
        margin-bottom: 30px;
    }
    .gate-card {
        padding: 28px 23px;
    }
    .gate-card h1 {
        font-size: 27px;
    }
    .gate-footer {
        gap: 15px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.period-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 16px 22px;
    margin-bottom: 20px;
    border: 1px solid #eae4f3;
    background: white;
    border-radius: 10px;
    color: #71627c;
    font-size: 14px;
}

.period-summary strong {
    color: #63527a;
    font-weight: 600;
}

/* Readable controls and link availability details. */
.modal input,
.modal textarea,
.auth-form-wrap input {
    font-size: 16px;
}
.link-constraints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    color: #5e536d;
    font-size: 14px;
}
.link-constraint {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.link-constraint svg {
    flex-shrink: 0;
}
.expiry-presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}
.expiry-presets > span {
    font-size: 14px;
    font-weight: 600;
    color: #5e536d;
    margin-right: 6px;
}
.limits-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #4f4263;
    padding: 16px 18px;
    background: #f4f0fb;
    border-radius: 8px;
    margin-top: 20px;
}
.mini-link-card > div {
    min-width: 0;
}
.sidebar .nav-item {
    flex-shrink: 0;
}
@media (max-width: 1150px) {
    .page-heading {
        flex-wrap: wrap;
    }
    .heading-actions {
        flex-wrap: wrap;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .link-row {
        flex-wrap: wrap;
    }
    .link-info {
        min-width: calc(100% - 80px);
    }
    .link-clicks {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-left: 64px;
    }
    .link-actions {
        margin-left: auto;
    }
}
@media (max-width: 900px) {
    .banner-art {
        display: none;
    }
    .welcome-banner > div:first-child {
        width: 100%;
    }
    .form-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .editor-tabs {
        gap: 12px;
    }
}
@media (max-width: 650px) {
    .main-shell {
        margin-left: 0;
    }
    .qr-grid {
        grid-template-columns: 1fr;
    }
    .qr-image-button img {
        width: 200px;
        height: 200px;
    }
    .editor-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
    }
    .editor-tab {
        justify-content: center;
        font-size: 15px;
    }
    .editor-tab svg {
        width: 18px;
    }
    .metric-card {
        padding: 18px;
    }
    .metric-top {
        flex-wrap: wrap;
    }
    .link-clicks {
        margin-left: 0;
    }
    .link-title {
        max-width: 100%;
    }
    .link-info {
        min-width: calc(100% - 80px);
    }
    .link-actions {
        gap: 2px;
    }
    .panel-heading {
        flex-wrap: wrap;
    }
    .user-profile strong {
        max-width: 160px;
    }
    .heading-actions {
        justify-content: flex-start;
    }
}

@media (max-height: 900px) {
    .sidebar-bottom {
        padding-top: 18px;
    }
    .sidebar .nav-item {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .user-profile {
        padding-top: 16px;
    }
}

/* Compact forms, distinct editor tabs, and moderation views. */
#password-form {
    max-width: 420px;
}
#password-form > button[type='submit'] {
    margin-top: 20px;
}
#password-form .form-error:empty {
    display: none;
}
.editor-tabs,
.admin-tabs {
    flex-wrap: wrap;
}
.qr-design-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 24px;
}
.qr-live-preview {
    align-self: start;
    margin-top: 22px;
    padding: 16px 10px;
    background: #f7f5fb;
    border-radius: 12px;
    text-align: center;
}
.qr-live-preview img {
    display: block;
    margin: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}
.qr-live-preview img[hidden] {
    display: none;
}
.qr-design-grid input[type='color'] {
    width: 100%;
    height: 40px;
    padding: 3px;
    border: 1px solid #e0e1eb;
    border-radius: 8px;
    background: white;
}
.qr-design-grid input[type='file'] {
    font-size: 13px;
}
.audit-context-dialog {
    width: min(1120px, calc(100% - 32px));
}
.audit-context-dialog .modal-inner {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 52px);
}
.audit-context-dialog .modal-heading,
.audit-context-dialog .audit-context {
    flex-shrink: 0;
}
.audit-context-dialog .modal-heading p {
    overflow-wrap: anywhere;
}
.audit-context-json {
    flex: 1 1 auto;
    min-height: 120px;
    margin: 0;
    white-space: pre;
    overflow-wrap: normal;
    tab-size: 2;
    font-size: 13px;
    line-height: 1.65;
    padding: 20px;
    background: #f7f5fb;
    border: 1px solid #e9e3f0;
    border-radius: 10px;
    max-height: min(60vh, 650px);
    overflow: auto;
}
.report-item {
    padding: 22px 26px;
    border-top: 1px solid #eeeaf3;
}
.report-heading,
.report-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.report-heading {
    justify-content: space-between;
}
.report-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
    font-size: 15px;
    margin: 18px 0;
}
#report-status {
    width: auto;
    max-width: 100%;
}
.public-page {
    width: min(100% - 32px, 640px);
    margin: 40px auto;
}
.public-card {
    margin: 32px 0 20px;
    padding: 28px;
}
.public-card h1 {
    margin: 10px 0;
}
.public-card > p {
    line-height: 1.7;
    color: #6e6078;
}
.public-page footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    text-align: center;
    line-height: 1.8;
    font-size: 14px;
}
.public-page footer a {
    position: relative;
    white-space: nowrap;
}
.public-page footer a + a::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 1px;
    height: 12px;
    background: #cec7dd;
    transform: translateY(-50%);
    pointer-events: none;
}
.report-success {
    padding: 18px;
    background: #e9f8ef;
    color: #216346 !important;
    border-radius: 8px;
}
.app-footer {
    flex-wrap: wrap;
    gap: 12px;
    line-height: 1.8;
}
@media (max-width: 900px) {
    .qr-design-grid {
        grid-template-columns: 1fr;
    }
    .qr-live-preview {
        width: min(100%, 260px);
        justify-self: center;
    }
}
@media (max-width: 650px) {
    .public-card {
        padding: 22px;
    }
    .report-item {
        padding: 18px;
    }
}

.public-card a,
.public-page footer a {
    color: var(--accent);
}
.public-card a:hover,
.public-page footer a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.audit-context {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px 18px;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 22px;
}
.audit-context dt {
    color: #6e6078;
    font-weight: 600;
}
.audit-context dd {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.auth-recovery-link {
    margin-top: 20px;
    font-size: 14px;
}
.auth-recovery-link a,
.auth-form-wrap .form-error a {
    color: #6554c0;
    text-underline-offset: 3px;
}
.recovery-success {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #d7ebdf;
    border-radius: 10px;
    background: #f2faf5;
    color: #255c3b;
    line-height: 1.6;
}
.recovery-success svg {
    flex-shrink: 0;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .audit-context {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }
    .audit-context dt:not(:first-child) {
        margin-top: 9px;
    }
    .audit-context-json {
        padding: 12px;
    }
}

.report-heading > div {
    min-width: 0;
    flex: 1;
}
.report-heading strong {
    overflow-wrap: anywhere;
}
