/* VinDevs shared product design system. Loaded after legacy page styles. */
:root {
    color-scheme: dark;
    --font-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
    --ds-canvas: oklch(15% 0.012 205);
    --ds-canvas-raised: oklch(18% 0.014 205);
    --ds-surface: oklch(20.5% 0.014 205);
    --ds-surface-hover: oklch(23.5% 0.016 205);
    --ds-surface-selected: oklch(27% 0.035 174);
    --ds-border: oklch(34% 0.016 205 / 0.68);
    --ds-border-strong: oklch(48% 0.022 205 / 0.72);
    --ds-text: oklch(95% 0.008 185);
    --ds-text-muted: oklch(76% 0.012 195);
    --ds-text-subtle: oklch(64% 0.012 195);
    --ds-accent: oklch(78% 0.12 174);
    --ds-accent-hover: oklch(84% 0.115 174);
    --ds-accent-ink: oklch(19% 0.03 174);
    --ds-danger: oklch(72% 0.15 25);
    --ds-radius-sm: 0.5rem;
    --ds-radius-md: 0.75rem;
    --ds-radius-lg: 1rem;
    --ds-radius-xl: 1.25rem;
    --bg-primary: var(--ds-canvas);
    --bg-panel: var(--ds-surface);
    --bg-surface: var(--ds-canvas-raised);
    --bg-glass: var(--ds-surface);
    --border-soft: var(--ds-border);
    --border-strong: var(--ds-border-strong);
    --text-strong: var(--ds-text);
    --text-muted: var(--ds-text-muted);
    --text-subtle: var(--ds-text-subtle);
    --accent-primary: var(--ds-accent);
    --button-primary-start: var(--ds-accent);
    --button-primary-end: var(--ds-accent);
    --button-primary-ink: var(--ds-accent-ink);
    --button-primary-border: oklch(88% 0.09 174 / 0.58);
    --button-primary-shadow: none;
    --button-primary-shadow-hover: 0 8px 22px oklch(10% 0.04 174 / 0.3);
    --button-focus-ring: oklch(82% 0.12 174 / 0.7);
    --button-radius-pill: var(--ds-radius-md);
    --radius-sm: var(--ds-radius-sm);
    --radius-md: var(--ds-radius-md);
    --radius-lg: var(--ds-radius-lg);
    --radius-xl: var(--ds-radius-xl);
    --surface-padding: clamp(1rem, 1.6vw, 1.5rem);
    --surface-gap: clamp(0.875rem, 1.2vw, 1.25rem);
    --shadow-soft: 0 1px 0 oklch(100% 0 0 / 0.025), 0 12px 28px oklch(7% 0.02 205 / 0.22);
    --shadow-strong: 0 1px 0 oklch(100% 0 0 / 0.035), 0 22px 60px oklch(7% 0.02 205 / 0.34);
    --motion-duration-short: 150ms;
    --motion-duration-medium: 220ms;
    --motion-duration-long: 320ms;
    --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --motion-ease-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
    --motion-ease-overshoot: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    background: var(--ds-canvas);
}

body {
    min-height: 100dvh;
    background: var(--ds-canvas);
    color: var(--ds-text);
    font-size: 0.9375rem;
    line-height: 1.55;
}

body::before {
    background:
        radial-gradient(70rem 34rem at 50% -18rem, oklch(60% 0.055 190 / 0.13), transparent 72%),
        var(--ds-canvas);
}

body::after,
.category-glow,
.global-overlay,
.ui-spotlight {
    display: none;
}

.skip-link {
    position: fixed;
    inset-block-start: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    border-radius: var(--ds-radius-md);
    background: var(--ds-accent);
    color: var(--ds-accent-ink);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform var(--motion-duration-short) var(--motion-ease-decelerate);
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 3px;
}

:where(button, input, textarea, select):disabled,
[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.52;
}

.container {
    max-width: 1280px;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

main {
    padding-block: clamp(2rem, 4vw, 3.5rem) clamp(4rem, 7vw, 7rem);
}

main::before {
    display: none;
}

main > .container {
    min-width: 0;
}

h1,
h2,
h3,
h4,
.section-title {
    color: var(--ds-text);
    font-family: var(--font-display);
    font-weight: 750;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

h1,
.hero h1 {
    max-width: 22ch;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.03;
}

h2 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.15;
}

h3 {
    font-size: 1.125rem;
    line-height: 1.25;
}

p,
li,
.hero-description,
.section-lede {
    text-wrap: pretty;
}

.hero-description,
.section-lede,
.policy-section p {
    max-width: 68ch;
}

.subtle,
.hero-eyebrow,
.verification-kicker,
.case-room-eyebrow {
    color: var(--ds-text-subtle);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero {
    gap: 2rem;
    margin-block-end: 2.5rem;
}

.hero-content {
    gap: 1rem;
}

.hero.decorated,
.hero-surface {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-xl);
    background: var(--ds-canvas-raised);
    box-shadow: var(--shadow-soft);
}

.hero-eyebrow {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.hero-aside,
.panel,
.card,
.section-block,
.verification-card,
.asset-panel {
    gap: var(--surface-gap);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-surface);
    box-shadow: var(--shadow-soft);
}

.panel:hover,
.card:hover,
.section-block:hover {
    transform: none;
    border-color: var(--ds-border-strong);
    box-shadow: var(--shadow-soft);
}

.panel:focus-within,
.card:focus-within,
.section-block:focus-within {
    border-color: var(--ds-border-strong);
}

.section-group {
    gap: 2.5rem;
    margin-block-end: 3rem;
}

.section-header {
    gap: 0.5rem;
    margin-block-end: 1rem;
}

.section-icon,
.card-icon,
.stat-card-icon {
    border: 1px solid oklch(78% 0.12 174 / 0.24);
    border-radius: var(--ds-radius-md);
    background: oklch(78% 0.12 174 / 0.09);
    color: var(--ds-accent);
    box-shadow: none;
}

.card-grid,
.panel-grid {
    gap: clamp(0.875rem, 2vw, 1.25rem);
}

.card-actions,
.hero-actions,
.section-actions {
    gap: 0.5rem;
}

.stat-cards,
.ticket-management-stats,
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 0.75rem;
    margin-block-end: 2rem;
}

.stat-card,
.panel-stat {
    position: relative;
    min-width: 0;
    min-height: 7.25rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-canvas-raised);
    box-shadow: none;
}

.stat-card::after,
.panel-stat::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--ds-accent), transparent 62%);
    opacity: 0.72;
}

.stat-card > strong,
.stat-card > .stat-card-value,
.panel-stat > strong {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    color: var(--ds-text);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.045em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.stat-card > span:not(.stat-card-icon),
.stat-card > p,
.panel-stat > span {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    color: var(--ds-text-subtle);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.35;
    text-transform: uppercase;
}

.stat-card-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 2.25rem;
    height: 2.25rem;
}

.button,
.apply-button,
.search-button,
.ghost-button,
.btn {
    min-height: 2.75rem;
    padding: 0.6875rem 1rem;
    border-radius: var(--ds-radius-md);
    font-size: 0.875rem;
    font-weight: 750;
    letter-spacing: -0.005em;
    box-shadow: none;
    transition:
        transform var(--motion-duration-short) var(--motion-ease-decelerate),
        color var(--motion-duration-short) var(--motion-ease-standard),
        background-color var(--motion-duration-short) var(--motion-ease-standard),
        border-color var(--motion-duration-short) var(--motion-ease-standard),
        opacity var(--motion-duration-short) var(--motion-ease-standard);
}

.button-primary,
.apply-button {
    border: 1px solid var(--button-primary-border);
    background: var(--ds-accent);
    color: var(--ds-accent-ink);
}

.button-secondary,
.search-button,
.ghost-button {
    border: 1px solid var(--ds-border);
    background: var(--ds-canvas-raised);
    color: var(--ds-text);
}

.button:hover,
.apply-button:hover,
.search-button:hover,
.ghost-button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.apply-button:hover,
.button-primary:hover {
    background: var(--ds-accent-hover);
}

.search-button:hover,
.ghost-button:hover,
.button-secondary:hover {
    border-color: var(--ds-border-strong);
    background: var(--ds-surface-hover);
}

.button:active,
.apply-button:active,
.search-button:active,
.ghost-button:active,
.btn:active {
    transform: translateY(0) scale(0.98);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    min-height: 2.75rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-canvas-raised);
    color: var(--ds-text);
    box-shadow: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--ds-text-subtle);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--ds-border-strong);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--ds-accent);
    outline: 2px solid oklch(78% 0.12 174 / 0.2);
    outline-offset: 1px;
}

.form-status:not(:empty),
.wiz-error:not(:empty),
[data-tone="error"]:not(:empty),
[data-tone="success"]:not(:empty) {
    padding: 0.75rem 1rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-canvas-raised);
    color: var(--ds-text-muted) !important;
    line-height: 1.45;
}

.form-status[data-tone="error"],
.wiz-error:not(:empty),
[data-tone="error"]:not(:empty) {
    border-color: oklch(72% 0.15 25 / 0.42);
    background: oklch(35% 0.08 25 / 0.24);
    color: oklch(85% 0.08 25) !important;
}

.form-status[data-tone="success"],
[data-tone="success"]:not(:empty) {
    border-color: oklch(78% 0.12 154 / 0.36);
    background: oklch(35% 0.065 154 / 0.22);
    color: oklch(86% 0.08 154) !important;
}

:where(
    .support-empty,
    .asset-empty,
    .builder-empty,
    .bookmark-empty,
    .middleman-queue-empty,
    .class-empty-state,
    .skill-portfolio-empty,
    .disc-empty,
    .feed__empty,
    .vindb-empty-state,
    .select-panel-empty,
    .custom-asset-empty
) {
    min-height: 8rem;
    padding: 1.5rem;
    display: grid;
    place-content: center;
    gap: 0.5rem;
    border: 1px dashed var(--ds-border-strong);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-canvas-raised);
    color: var(--ds-text-muted);
    text-align: center;
}

.table-wrap,
.table-shell,
.staff-table-wrap,
.data-table-wrap {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-surface);
}

table {
    font-variant-numeric: tabular-nums;
}

th {
    color: var(--ds-text-subtle);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: var(--ds-surface-hover);
}

.status-pill,
.badge,
.decoration-pill,
.skill-role-badge {
    border-radius: 0.375rem;
    font-weight: 750;
}

.page-menu,
.profile-tabs,
.guild-tabs,
.staff-centers__nav {
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-canvas-raised);
    box-shadow: none;
}

.page-menu a,
.profile-tabs a,
.guild-tab,
.staff-centers__nav a {
    min-height: 2.5rem;
    border-radius: var(--ds-radius-sm);
    text-transform: none;
    letter-spacing: 0;
}

.vd-top {
    border-block-end: 1px solid var(--ds-border);
    background: oklch(16% 0.012 205 / 0.96);
    backdrop-filter: none;
}

.vd-top__inner {
    max-width: 1440px;
}

.vd-top__link,
.vd-top__more-btn,
.vd-top__brand,
.vd-top__burger {
    border-radius: var(--ds-radius-md);
}

.vd-top__link.is-active,
.vd-top__mega-link.is-active {
    background: var(--ds-surface-selected);
    color: var(--ds-text);
}

.vd-top__surface {
    color: var(--ds-text-subtle);
}

.vd-top__mega,
.vd-top__drawer,
.vd-top__drawer-account,
.vd-top__drawer-group {
    border-color: var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-canvas-raised);
    box-shadow: var(--shadow-strong);
}

.app-loading {
    background: var(--ds-canvas);
}

.route-skeleton {
    max-width: 1280px;
}

.ui-skeleton,
.ui-skeleton-card::before {
    background: linear-gradient(100deg, var(--ds-surface) 20%, var(--ds-surface-hover) 38%, var(--ds-surface) 56%);
    background-size: 240% 100%;
}

.ui-skeleton-card,
.ui-skeleton-row,
.route-skeleton__profile,
.route-skeleton__table {
    border-color: var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-canvas-raised);
}

footer {
    border-block-start: 1px solid var(--ds-border);
    background: var(--ds-canvas-raised);
}

.footer-content {
    gap: 1rem;
    color: var(--ds-text-subtle);
}

.footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-link:hover {
    color: var(--ds-text);
}

@media (max-width: 900px) {
    .hero.hero-with-aside,
    .verification-flow,
    .verification-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        padding-inline: 0.875rem;
    }

    main {
        padding-block: 1.5rem 4rem;
    }

    h1,
    .hero h1 {
        font-size: 1.85rem;
    }

    .hero {
        gap: 1.25rem;
        margin-block-end: 2rem;
    }

    .hero.decorated,
    .hero-surface,
    .panel,
    .card,
    .section-block,
    .verification-card,
    .asset-panel {
        padding: 1rem;
        border-radius: var(--ds-radius-lg);
    }

    .stat-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        min-height: 6.5rem;
    }

    .hero-actions,
    .section-actions,
    .card-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .hero-actions > *,
    .section-actions > *,
    .card-actions > * {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

@media (forced-colors: active) {
    :where(.panel, .card, .section-block, .stat-card, .hero-surface) {
        border: 1px solid CanvasText;
    }
}
