/* Generated by scripts/build-css.js from src. */

/* ===== _variables.css ===== */

/* === Reztoria — Dark Theme === */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-hover: #242424;
    --bg-input: #141414;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-subtle: rgba(99, 102, 241, 0.1);
    --border: #2a2a2a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --success: #22c55e;
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --transition: 150ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
}

body.app-confirm-open {
    overflow: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.stack-xs {
    display: grid;
    gap: 0.35rem;
}

/* === Premium enhancements === */

/* === Premium site redesign === */

:root {
    --bg-tertiary: #0f1016;
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-strong: rgba(255, 255, 255, 0.12);
    --accent-strong: #8b5cf6;
    --surface-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --surface-glow: 0 0 0 1px rgba(99, 102, 241, 0.08), 0 18px 48px rgba(8, 10, 24, 0.42);
}

html {
    background: #06070b;
}

body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 18%),
        radial-gradient(circle at bottom center, rgba(139, 92, 246, 0.08), transparent 30%),
        linear-gradient(180deg, #07080c 0%, #0a0a0a 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
}

body::before {
    top: -100px;
    left: -40px;
    width: 260px;
    height: 260px;
    background: rgba(99, 102, 241, 0.15);
}

body::after {
    right: 6%;
    bottom: 8%;
    width: 240px;
    height: 240px;
    background: rgba(34, 197, 94, 0.08);
}

/* ===== _layout.css ===== */

/* === Sidebar === */

.sidebar {
    width: var(--sidebar-width);
    top: 0;
    bottom: 0;
    height: auto;
    min-height: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    z-index: 100;
    overflow: hidden;
    transition: width var(--transition), box-shadow var(--transition), background var(--transition);
}

.sidebar-content {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
}

.sidebar-nav,
.sidebar-footer {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.sidebar-nav::-webkit-scrollbar,
.sidebar-footer::-webkit-scrollbar {
    width: 10px;
}

.sidebar-nav::-webkit-scrollbar-track,
.sidebar-footer::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.sidebar-footer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .user-name {
    display: none;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: var(--text-primary);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 242, 255, 0.92));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.sidebar-brand-text {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
    color: var(--text-primary);
    transition: opacity var(--transition), width var(--transition);
}

.sidebar-brand-text strong,
.sidebar-brand-text small {
    white-space: nowrap;
}

.sidebar-brand-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-brand-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d7dbf8;
    cursor: pointer;
    padding: 0;
    border-radius: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.28), transparent 65%);
    opacity: 0.7;
    pointer-events: none;
}

.sidebar-toggle svg {
    position: relative;
    z-index: 1;
    transition: transform var(--transition);
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.24), rgba(255, 255, 255, 0.06));
    border-color: rgba(129, 140, 248, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 32px rgba(65, 55, 160, 0.2);
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .sidebar-toggle {
    width: 44px;
    height: 44px;
    border-radius: 16px;
}

.sidebar.collapsed .sidebar-brand-text {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0.85rem 0.5rem 0.75rem;
}

.sidebar.collapsed .sidebar-toggle {
    order: initial;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg) scale(1.02);
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.nav-section {
    display: grid;
    gap: 0.35rem;
}

.nav-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0 0.75rem;
}

.nav-section-title-row .nav-section-title {
    padding: 0.35rem 0 0.2rem;
}

.nav-section-title {
    padding: 0.35rem 0.75rem 0.2rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.nav-section-divider {
    margin: 0.65rem 0.75rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.nav-section-divider-admin {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.28), transparent);
}

.nav-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.16);
    background: rgba(139, 92, 246, 0.12);
    color: #d9dcff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-nav .nav-link,
.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
    overflow: hidden;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sidebar-nav .nav-link {
    position: relative;
}

.sidebar-nav .nav-link:hover,
.logout-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav .nav-link.active {
    background: var(--accent-subtle);
    color: var(--accent);
}

.sidebar-nav .nav-link svg,
.logout-btn svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.55rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.sidebar-footer-panel {
    display: grid;
    gap: 0.65rem;
}

.sidebar-footer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.sidebar-footer-summary:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
}

details.sidebar-footer-panel > summary {
    cursor: pointer;
    list-style: none;
}

details.sidebar-footer-panel > summary::-webkit-details-marker {
    display: none;
}

details.sidebar-footer-panel > summary::marker {
    display: none;
}

.sidebar-footer-summary-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-footer-summary-copy {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.sidebar-footer-summary-subtitle {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.sidebar-footer-summary-chevron {
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: transform var(--transition), color var(--transition);
}

details.sidebar-footer-panel[open] > .sidebar-footer-summary {
    border-color: rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.05);
}

details.sidebar-footer-panel[open] > .sidebar-footer-summary .sidebar-footer-summary-chevron {
    transform: rotate(180deg);
    color: var(--text-primary);
}

.sidebar-footer-expanded {
    display: grid;
    gap: 0.65rem;
}

.sidebar-footer-block {
    display: grid;
    gap: 0.55rem;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.018);
}

.sidebar-footer-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-footer-block-title {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-footer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #d6dbff;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer-block-context {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), rgba(255, 255, 255, 0.018));
    border-color: rgba(99, 102, 241, 0.12);
}

.sidebar-footer-block-account {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.018));
}

.sidebar-credit-balance-pinned {
    margin-bottom: 0;
}

.sidebar.collapsed .sidebar-nav {
    align-items: stretch;
    width: 100%;
    padding: 0.75rem 0.5rem;
    gap: 0.45rem;
}

.sidebar.collapsed .sidebar-content {
    align-items: stretch;
}

.sidebar.collapsed .nav-section {
    width: 100%;
    justify-items: center;
    gap: 0.45rem;
}

.sidebar.collapsed .nav-section-admin {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-section-divider {
    display: none;
}

.sidebar.collapsed .sidebar-nav .nav-link,
.sidebar.collapsed .logout-btn {
    width: 48px;
    min-height: 48px;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 16px;
}

.sidebar.collapsed .sidebar-switch-form {
    display: none;
}

.sidebar.collapsed .sidebar-context-panel,
.sidebar.collapsed .sidebar-context-summary-link {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    display: grid;
    width: 100%;
    justify-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.sidebar.collapsed .sidebar-footer-panel {
    width: 100%;
}

.sidebar.collapsed .sidebar-footer-expanded,
.sidebar.collapsed .sidebar-footer-summary-copy,
.sidebar.collapsed .sidebar-footer-summary-chevron,
.sidebar.collapsed .sidebar-footer-block-head,
.sidebar.collapsed .sidebar-account-actions {
    display: none;
}

.sidebar.collapsed .sidebar-credit-balance {
    width: 48px;
    min-height: 48px;
    margin-bottom: 0;
    padding: 0.35rem;
    justify-content: center;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.sidebar.collapsed .sidebar-credit-label {
    display: none;
}

.sidebar.collapsed .sidebar-credit-value {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.1;
}

.sidebar.collapsed .sidebar-footer-summary {
    width: 48px;
    min-height: 48px;
    justify-content: center;
    padding: 0;
    border-radius: 16px;
}

.sidebar.collapsed .sidebar-footer-summary-main {
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .sidebar-footer-summary .user-avatar {
    width: 36px;
    height: 36px;
}

.sidebar-credit-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 14px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.sidebar-credit-label {
    color: var(--text-muted);
}

.sidebar-credit-value {
    font-weight: 700;
    color: var(--accent);
}

.sidebar-context-panel {
    display: grid;
    gap: 0.55rem;
}

.sidebar-context-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary);
}

details.sidebar-context-panel > summary {
    cursor: pointer;
    list-style: none;
}

details.sidebar-context-panel > summary::-webkit-details-marker {
    display: none;
}

details.sidebar-context-panel > summary::marker {
    display: none;
}

.sidebar-context-summary-link:hover,
details.sidebar-context-panel[open] > .sidebar-context-summary,
details.sidebar-context-panel > .sidebar-context-summary:hover {
    border-color: rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.05);
    color: var(--text-primary);
}

.sidebar-context-summary-copy {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.sidebar-context-summary-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-context-summary-name {
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-context-summary-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.sidebar-context-summary-link {
    text-decoration: none;
}

.sidebar-context-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
    max-height: min(34dvh, 16rem);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.018);
}

.sidebar-current-company {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-current-company-copy {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.sidebar-current-company-name {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-current-company-meta {
    color: var(--text-secondary);
    font-size: 0.77rem;
    line-height: 1.4;
}

.sidebar-manage-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
}

.sidebar-manage-link:hover {
    color: var(--text-primary);
}

.sidebar-switch-form {
    display: grid;
    gap: 0.5rem;
}

.sidebar-switch-label {
    padding: 0 0.1rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.sidebar-switch-list {
    display: grid;
    gap: 0.45rem;
    max-height: min(18dvh, 8.5rem);
    overflow-y: auto;
    padding-right: 0.1rem;
}

.sidebar-switch-item {
    width: 100%;
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.sidebar-switch-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-switch-item-name {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-switch-item-meta,
.sidebar-empty-context {
    padding: 0;
    color: var(--text-muted);
    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
}

.user-avatar.has-image {
    background: var(--bg-secondary);
    color: transparent;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.user-avatar.has-image .user-avatar-fallback {
    display: none;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.user-copy {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.user-name {
    font-size: 0.84rem;
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-caption {
    color: var(--text-muted);
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-form {
    width: 100%;
}

.sidebar-account-actions {
    display: grid;
    gap: 0.45rem;
}

.sidebar-account-link,
.logout-btn {
    width: 100%;
}

.sidebar-account-link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}

.sidebar-account-link-primary {
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.05));
    color: #eef1ff;
}

.sidebar-account-link-primary:hover {
    border-color: rgba(99, 102, 241, 0.28);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.08));
}

.sidebar-account-link-copy {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.sidebar-account-link-title {
    color: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
}

.sidebar-account-link-caption {
    color: rgba(238, 241, 255, 0.7);
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: normal;
}

.sidebar-account-link-arrow {
    flex-shrink: 0;
    opacity: 0.72;
    justify-self: end;
    align-self: center;
}

.logout-btn {
    color: var(--text-muted);
    font-size: 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar.collapsed .logout-form {
    display: flex;
    justify-content: center;
    width: 100%;
}

.logout-btn:hover {
    color: var(--danger);
}

.sidebar.collapsed [data-sidebar-tooltip] {
    position: relative;
}

.sidebar.collapsed [data-sidebar-tooltip]::after {
    content: attr(data-sidebar-tooltip);
    position: absolute;
    top: 50%;
    left: calc(100% + 0.65rem);
    transform: translateY(-50%);
    min-width: max-content;
    max-width: 16rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: rgba(12, 14, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.35;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 130;
}

.sidebar.collapsed [data-sidebar-tooltip]:hover::after,
.sidebar.collapsed [data-sidebar-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

@media (max-height: 860px) {
    .sidebar-header {
        padding: 0.75rem;
    }

    .sidebar-nav {
        padding: 0.4rem;
    }

    .nav-section {
        gap: 0.2rem;
    }

    .nav-section-divider {
        margin: 0.45rem 0.75rem;
    }

    .sidebar-nav .nav-link,
    .logout-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.84rem;
    }

    .sidebar-footer {
        gap: 0.55rem;
        padding: 0.6rem;
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-footer-block {
        gap: 0.5rem;
        padding: 0.6rem;
    }

    .sidebar-context-summary {
        padding: 0.6rem 0.7rem;
    }

    .sidebar-context-card {
        gap: 0.55rem;
        padding: 0.7rem;
        max-height: min(28dvh, 12rem);
    }

    .sidebar-current-company-name {
        font-size: 0.84rem;
    }

    .sidebar-context-summary-name,
    .sidebar-current-company-meta,
    .sidebar-switch-item-meta,
    .sidebar-empty-context,
    .user-caption {
        font-size: 0.69rem;
    }

    .sidebar-switch-item {
        padding: 0.55rem 0.7rem;
    }

    .sidebar-current-company {
        gap: 0.5rem;
    }

    .sidebar-switch-list {
        max-height: min(12dvh, 5rem);
    }

    .sidebar-footer-summary {
        padding: 0.4rem;
    }
}

@media (max-height: 720px) {
    .sidebar-header {
        padding: 0.65rem;
    }

    .sidebar-brand {
        gap: 0.6rem;
    }

    .sidebar-logo {
        width: 36px;
        height: 36px;
    }

    .sidebar-logo-image {
        width: 22px;
        height: 22px;
    }

    .sidebar-nav {
        padding: 0.35rem;
    }

    .sidebar-nav .nav-link,
    .logout-btn {
        padding: 0.45rem 0.65rem;
        gap: 0.65rem;
    }

    .sidebar-footer {
        gap: 0.45rem;
        padding: 0.5rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-footer-block {
        gap: 0.45rem;
        padding: 0.55rem;
    }

    .sidebar-context-summary {
        padding: 0.55rem 0.65rem;
    }

    .sidebar-context-summary-action,
    .sidebar-manage-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .sidebar-context-card {
        max-height: min(24dvh, 9rem);
    }

    .sidebar-switch-item {
        padding: 0.5rem 0.65rem;
    }

    .sidebar-footer-summary {
        padding: 0.35rem;
    }

    .logout-btn {
        min-height: 40px;
    }
}

.user-list-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* === Main content === */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
}

.app-legal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
}

.app-legal-links {
    display: flex;
    gap: 1rem;
}

.app-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.app-legal-links a:hover {
    color: var(--text-secondary);
}

.mobile-bottom-nav {
    display: none;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* === Page header === */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* === Cards === */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: #333;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* === Premium layout === */

.sidebar {
    background: linear-gradient(180deg, rgba(10, 11, 17, 0.98), rgba(9, 10, 15, 0.98));
    border-right-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03), 12px 0 32px rgba(0, 0, 0, 0.18);
}

.sidebar.collapsed {
    background: linear-gradient(180deg, rgba(11, 12, 18, 0.99), rgba(9, 10, 15, 0.99));
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 10px 0 24px rgba(0, 0, 0, 0.16);
}

.sidebar-header,
.sidebar-footer {
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav {
    padding: 0.75rem;
    gap: 0.35rem;
}

.nav-section-admin .nav-section-title {
    color: #b7bcff;
}

.nav-section-admin {
    padding: 0.45rem;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.03));
}

.sidebar-logo {
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.sidebar-nav .nav-link,
.logout-btn {
    min-height: 46px;
    border-radius: 14px;
}

.sidebar-nav .nav-link:hover,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow: none;
    color: #eef1ff;
}

.nav-link-admin {
    color: #c8ccf2;
    border-color: rgba(139, 92, 246, 0.08);
}

.nav-link-admin:hover {
    color: #f3f4ff;
    background: rgba(139, 92, 246, 0.1);
}

.nav-link-admin.active {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.18);
    box-shadow: none;
}

.sidebar.collapsed .sidebar-nav .nav-link.active,
.sidebar.collapsed .logout-btn:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-switch-form {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.main-content {
    position: relative;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.008), transparent 28%);
}

.content-shell {
    flex: 1;
    max-width: 1680px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.page-stack {
    display: grid;
    gap: 1rem;
}

.page-shell-narrow,
.page-shell-medium {
    width: 100%;
    margin: 0 auto;
}

.page-shell-narrow {
    max-width: 880px;
}

.page-shell-medium {
    max-width: 1180px;
}

.center-stage {
    min-height: calc(100vh - 3rem);
    display: grid;
    place-items: center;
}

.page-header {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--panel-border);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(14, 16, 24, 0.95), rgba(9, 10, 16, 0.95));
    box-shadow: var(--surface-shadow), var(--surface-glow);
    align-items: flex-start;
}

.page-header::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 72%);
    opacity: 0.45;
    pointer-events: none;
}

.page-title {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.05;
}

.page-subtitle {
    margin-top: 0.45rem;
    font-size: 0.98rem;
    line-height: 1.65;
}

.page-header-actions,
.dashboard-header-actions,
.action-row,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* === Layout responsive 768px === */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .content-shell {
        gap: 0.85rem;
    }

    .main-content {
        margin-left: 0;
        padding-bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar.collapsed ~ .main-content,
    .sidebar:not(.collapsed) ~ .main-content {
        margin-left: 0;
    }

    .page-header,
    .card,
    .landing-hero,
    .landing-final,
    .auth-showcase,
    .auth-card {
        border-radius: 22px;
        padding: 1.1rem;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0.9rem;
        right: 0.9rem;
        bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
        z-index: 140;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
        padding: 0.35rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        background:
            linear-gradient(180deg, rgba(20, 22, 31, 0.96), rgba(12, 13, 19, 0.98)),
            radial-gradient(circle at top, rgba(99, 102, 241, 0.12), transparent 60%);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav.is-admin {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mobile-bottom-nav-link {
        min-width: 0;
        min-height: 50px;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 0.18rem;
        padding: 0.35rem 0.15rem;
        border-radius: 14px;
        color: var(--text-secondary);
        text-decoration: none;
        transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
        border: 1px solid transparent;
    }

    .mobile-bottom-nav-link svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }

    .mobile-bottom-nav-link.active {
        color: #eef1ff;
        background: rgba(99, 102, 241, 0.16);
        border-color: rgba(99, 102, 241, 0.24);
    }

    .mobile-bottom-nav-link-admin.active {
        background: rgba(139, 92, 246, 0.18);
        border-color: rgba(139, 92, 246, 0.24);
    }

    .mobile-bottom-nav-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .app-legal-footer {
        padding-bottom: 0.5rem;
    }
}

/* ===== _public-nav.css ===== */

.public-header {
    position: sticky;
    top: 1rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 18, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.public-header-brand {
    min-width: 0;
    color: var(--text-primary);
}

.public-header-brand:hover {
    color: var(--text-primary);
}

.public-header .auth-brand {
    gap: 0.8rem;
}

.public-header .auth-brand-mark {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 242, 255, 0.92));
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.12);
}

.public-header .auth-brand-image {
    width: 28px;
    height: 28px;
}

.public-header .auth-brand-copy {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.public-header .auth-brand-copy strong {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.public-header .auth-brand-copy span {
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    text-transform: none;
}

.public-header-desktop,
.public-header-nav,
.public-header-actions {
    display: flex;
    align-items: center;
}

.public-header-desktop {
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.public-header-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.public-header-actions {
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.public-header-link,
.public-header-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--text-secondary);
    font-weight: 600;
    border: 1px solid transparent;
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.public-header-link:hover,
.public-header-secondary:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.public-header-link-active {
    color: #e3e7ff;
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(129, 140, 248, 0.2);
}

.public-header-primary {
    min-width: 9rem;
    justify-content: center;
    white-space: nowrap;
}

.public-header-mobile,
.public-header-mobile-backdrop,
.public-header-mobile-panel {
    display: none;
}

.public-header-mobile-profile-copy,
.public-header-mobile-links,
.public-header-mobile-actions,
.public-header-mobile-logout-form {
    display: grid;
}

@media (max-width: 768px) {
    body.landing-mobile-menu-open {
        overflow: hidden;
    }

    .public-header {
        top: 0.6rem;
        padding: 0.7rem 0.85rem;
        gap: 0.75rem;
    }

    .public-header .auth-brand {
        gap: 0.7rem;
    }

    .public-header .auth-brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .public-header .auth-brand-image {
        width: 24px;
        height: 24px;
    }

    .public-header .auth-brand-copy strong {
        font-size: 0.86rem;
    }

    .public-header .auth-brand-copy span {
        font-size: 0.74rem;
    }

    .public-header-desktop {
        display: none;
    }

    .public-header-mobile {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .public-header-mobile-toggle {
        min-height: 2.4rem;
        padding: 0.32rem 0.46rem 0.32rem 0.74rem;
        display: inline-flex;
        align-items: center;
        gap: 0.62rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.045);
        color: var(--text-primary);
        cursor: pointer;
        box-shadow: 0 10px 24px rgba(5, 8, 16, 0.16);
        transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    }

    .public-header-mobile-toggle:hover,
    .public-header-mobile-toggle:focus-visible {
        background: rgba(99, 102, 241, 0.1);
        border-color: rgba(129, 140, 248, 0.22);
    }

    .public-header-mobile-toggle-copy {
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    .public-header-mobile-toggle-icon {
        width: 2rem;
        height: 2rem;
        display: inline-grid;
        place-items: center;
        gap: 0.2rem;
        padding: 0.5rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
    }

    .public-header-mobile-toggle-icon span {
        width: 0.8rem;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform var(--transition), opacity var(--transition);
    }

    body.landing-mobile-menu-open .public-header-mobile-toggle-icon span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    body.landing-mobile-menu-open .public-header-mobile-toggle-icon span:nth-child(2) {
        opacity: 0;
    }

    body.landing-mobile-menu-open .public-header-mobile-toggle-icon span:nth-child(3) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .public-header-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        border: 0;
        background: rgba(4, 6, 10, 0.46);
        backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.landing-mobile-menu-open .public-header-mobile-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .public-header-mobile-panel {
        position: fixed;
        top: 5.1rem;
        left: 0.6rem;
        right: 0.6rem;
        z-index: 61;
        display: grid;
        gap: 1rem;
        padding: 1rem;
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background:
            linear-gradient(180deg, rgba(10, 12, 18, 0.98), rgba(12, 15, 24, 0.96)),
            radial-gradient(circle at top right, rgba(99, 102, 241, 0.14), transparent 42%);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-0.4rem) scale(0.98);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    body.landing-mobile-menu-open .public-header-mobile-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .public-header-mobile-head,
    .public-header-mobile-link,
    .public-header-mobile-profile {
        display: flex;
        align-items: center;
    }

    .public-header-mobile-head {
        justify-content: space-between;
        gap: 0.75rem;
    }

    .public-header-mobile-head strong {
        color: var(--text-primary);
        font-size: 1rem;
        letter-spacing: -0.03em;
    }

    .public-header-mobile-close {
        width: 2.1rem;
        height: 2.1rem;
        display: inline-grid;
        place-items: center;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
        cursor: pointer;
    }

    .public-header-mobile-close svg {
        width: 1rem;
        height: 1rem;
    }

    .public-header-mobile-links,
    .public-header-mobile-actions {
        gap: 0.65rem;
    }

    .public-header-mobile-link,
    .public-header-mobile-profile {
        justify-content: space-between;
        gap: 0.75rem;
        min-height: 3rem;
        padding: 0.85rem 0.95rem;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-primary);
        text-decoration: none;
    }

    .public-header-mobile-link span:first-child {
        font-weight: 700;
    }

    .public-header-mobile-link svg {
        width: 1rem;
        height: 1rem;
        color: var(--text-secondary);
        flex-shrink: 0;
    }

    .public-header-mobile-link-active,
    .public-header-mobile-link:hover,
    .public-header-mobile-link:focus-visible,
    .public-header-mobile-profile:hover,
    .public-header-mobile-profile:focus-visible {
        color: var(--text-primary);
        border-color: rgba(129, 140, 248, 0.22);
        background: rgba(99, 102, 241, 0.12);
        box-shadow: none;
    }

    .public-header-mobile-profile {
        justify-content: flex-start;
    }

    .public-header-mobile-profile-copy {
        gap: 0.14rem;
    }

    .public-header-mobile-profile-copy strong {
        font-size: 0.92rem;
        letter-spacing: -0.02em;
    }

    .public-header-mobile-profile-copy span {
        color: var(--text-secondary);
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .public-header-mobile-primary {
        width: 100%;
        justify-content: center;
    }

    .public-header-mobile-logout-form {
        margin: 0;
    }

    .public-header-mobile-logout {
        width: 100%;
        min-height: 3rem;
        padding: 0.85rem 1rem;
        border-radius: 16px;
        border: 1px solid rgba(239, 68, 68, 0.18);
        background: rgba(239, 68, 68, 0.08);
        color: #ff7d7d;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .public-header-mobile-logout:hover,
    .public-header-mobile-logout:focus-visible {
        color: #ffd4d4;
        background: rgba(239, 68, 68, 0.14);
        border-color: rgba(239, 68, 68, 0.3);
        box-shadow: none;
    }
}

/* ===== _components.css ===== */

/* === Buttons === */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* === Forms === */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

select.form-input,
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d6dbff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 14px 14px;
}

select.form-input option,
select.form-select option,
select.form-input optgroup,
select.form-select optgroup {
    background: #171b25;
    color: #f5f7ff;
}

select.form-input option:checked,
select.form-select option:checked {
    background: #555d8f;
    color: #ffffff;
}

select.form-input::-ms-expand,
select.form-select::-ms-expand {
    display: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* === Tables === */

.table-container {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-hover);
}

/* === Badge === */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #f5b64d;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #f89c9c;
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.14);
    color: #d1d8e5;
}

.badge-admin {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-manager {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.badge-operator {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* === Empty state === */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* === Alert === */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

/* === Validation === */

.field-validation-error {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: var(--danger) !important;
}

/* === Responsive === */

/* === Premium cards & notices === */

.card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border-radius: 24px;
    border-color: var(--panel-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
        linear-gradient(180deg, rgba(15, 17, 26, 0.96), rgba(10, 12, 18, 0.94));
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(16px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    opacity: 0.7;
    pointer-events: none;
}

.card:hover {
    border-color: var(--panel-border-strong);
    box-shadow: var(--surface-shadow), 0 0 0 1px rgba(99, 102, 241, 0.07);
}

.feature-card,
.notice-card,
.confirm-card {
    padding: 1.55rem;
}

.notice-card {
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.02)),
        var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: var(--surface-shadow);
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.card-title,
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle,
.section-subtitle,
.muted-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.section-title-row {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

/* === Tabs === */

.tab-bar {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}

.tab-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    transition: color 0.15s, border-color 0.15s;
}

.tab-link:hover {
    color: var(--text-primary);
}

.tab-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.notice-card-danger {
    background:
        linear-gradient(180deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02)),
        var(--bg-card);
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.notice-card-success {
    background:
        linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02)),
        var(--bg-card);
    border-color: rgba(16, 185, 129, 0.28);
}

.notice-card-info {
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02)),
        var(--bg-card);
    border-color: rgba(59, 130, 246, 0.24);
}

.notice-card-warning {
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02)),
        var(--bg-card);
    border-color: rgba(245, 158, 11, 0.24);
}

.inline-form,
.inline-form-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form {
    gap: 0.75rem;
}

.inline-form-compact {
    gap: 0.5rem;
}

.inline-form-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* === Billing components === */

.billing-notice-stack {
    display: grid;
    gap: 0.75rem;
}

.billing-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.billing-subnav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: var(--bg-card-soft);
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.billing-subnav a:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--panel-border));
    color: var(--text-primary);
    background: color-mix(in srgb, var(--accent-subtle) 65%, var(--bg-card-soft));
}

.billing-overview-card,
.billing-overview-hero,
.billing-summary-grid,
.billing-plan-layout {
    display: grid;
    gap: 1rem;
}

.billing-overview-hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
    align-items: stretch;
}

.billing-overview-copy {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.billing-balance-panel,
.billing-summary-card {
    border: 1px solid var(--panel-border);
    border-radius: calc(var(--radius-lg) + 4px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        var(--bg-card-soft);
    padding: 1.15rem;
}

.billing-balance-panel {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    box-shadow: var(--surface-shadow);
}

.billing-balance-value,
.billing-summary-value {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.billing-balance-value {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 0.95;
}

.billing-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.billing-summary-card {
    display: grid;
    gap: 0.45rem;
}

.billing-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.billing-summary-value {
    font-size: 1.2rem;
}

.billing-summary-value-sm {
    font-size: 1rem;
    line-height: 1.35;
}

.billing-summary-meta,
.billing-balance-meta,
.billing-section-note {
    color: var(--text-secondary);
    line-height: 1.55;
}

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

.billing-plan-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    align-items: start;
}

.billing-current-plan-card,
.billing-limits-card {
    min-height: 100%;
}

.billing-inline-form {
    margin-top: 0.45rem;
}

.billing-feature-list {
    display: grid;
    gap: 0.75rem;
}

.billing-feature-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--panel-border) 90%, transparent);
    color: var(--text-secondary);
}

.billing-feature-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.billing-feature-row strong {
    color: var(--text-primary);
    text-align: right;
}

.billing-feature-list-compact .billing-feature-row {
    padding-bottom: 0.6rem;
}

.billing-offer-card-highlight {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--panel-border));
    box-shadow: 0 18px 36px rgba(99, 102, 241, 0.12);
}

.billing-select-card.billing-offer-card-highlight .billing-select-card-body {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--panel-border));
}

.billing-offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.billing-selection-form {
    display: grid;
    gap: 1rem;
}

.billing-select-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.billing-select-card input {
    position: absolute;
    inset: 1rem 1rem auto auto;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    opacity: 0;
    pointer-events: none;
}

.billing-select-card-body {
    display: grid;
    gap: 0.65rem;
    min-height: 100%;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    background: var(--bg-card-soft);
    padding: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.billing-select-card:hover .billing-select-card-body {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--panel-border));
}

.billing-select-card input:checked + .billing-select-card-body {
    border-color: color-mix(in srgb, var(--accent) 52%, var(--panel-border));
    box-shadow: 0 18px 36px rgba(99, 102, 241, 0.16);
    transform: translateY(-1px);
}

.billing-select-card-current {
    cursor: default;
}

.billing-select-card-current input {
    display: none;
}

.billing-selection-footer {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), var(--bg-card-soft);
}

.billing-selection-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.billing-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.billing-meta-pills-summary {
    margin-bottom: 0.9rem;
}

.billing-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.83rem;
}

.billing-meta-pill-danger {
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.08);
    color: #f6aaaa;
}

.billing-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.billing-metrics-grid,
.billing-offer-grid {
    display: grid;
    gap: 1rem;
}

.billing-metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.billing-offer-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.billing-metric-card,
.billing-offer-card {
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    background: var(--bg-card-soft);
    padding: 1rem;
}

.billing-metric-card {
    display: grid;
    gap: 0.35rem;
}

.billing-metric-label,
.billing-offer-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.billing-metric-value,
.billing-offer-title,
.billing-offer-price {
    color: var(--text-primary);
    font-weight: 700;
}

.billing-metric-value {
    font-size: 1.25rem;
}

.billing-offer-title {
    margin-top: 0.35rem;
    font-size: 1.05rem;
}

.billing-offer-price {
    margin-top: 0.55rem;
    font-size: 1.15rem;
}

.billing-metric-meta,
.billing-offer-meta,
.billing-offer-description {
    color: var(--text-secondary);
    line-height: 1.5;
}

.billing-offer-card,
.billing-action-stack {
    display: grid;
    gap: 0.6rem;
}

.billing-action-form {
    display: flex;
    width: 100%;
}

.billing-inline-action {
    margin-top: 0.5rem;
}

.billing-action-form .btn {
    width: 100%;
}

.billing-action-stack-wide {
    width: 100%;
}

.billing-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.45;
}

.billing-terms-checkbox input {
    margin-top: 0.2rem;
    accent-color: var(--accent);
}

.billing-terms-checkbox a {
    color: var(--text-primary);
    text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.billing-terms-meta {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    line-height: 1.45;
}

.billing-subsection-title {
    margin-top: 1.35rem;
}

.billing-amount-cell {
    font-weight: 700;
}

.billing-amount-positive {
    color: var(--success);
}

.billing-amount-negative {
    color: #f59a9a;
}

.billing-amount-neutral {
    color: var(--text-secondary);
}

@media (max-width: 960px) {
    .billing-overview-hero,
    .billing-plan-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .billing-subnav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .billing-subnav a {
        flex: 0 0 auto;
    }

    .billing-selection-actions {
        align-items: stretch;
    }

    .billing-selection-actions .btn {
        width: 100%;
    }

    .billing-table thead {
        display: none;
    }

    .billing-table,
    .billing-table tbody,
    .billing-table tr,
    .billing-table td {
        display: block;
        width: 100%;
    }

    .billing-table tr {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
    }

    .billing-table td {
        display: grid;
        gap: 0.3rem;
        padding: 0.45rem 0;
        border-bottom: 0;
    }

    .billing-table td[data-label]::before {
        content: attr(data-label);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-tertiary);
    }
}

/* === Form utilities === */

.form-grow {
    flex: 1 1 260px;
}

.min-w-xs {
    min-width: 150px;
}

.min-w-sm {
    min-width: 180px;
}

.min-w-md {
    min-width: 240px;
}

.min-w-lg {
    min-width: 280px;
}


/* === Premium buttons === */

.btn {
    min-height: 44px;
    padding: 0 0.95rem;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.28);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #9b8cff);
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(99, 102, 241, 0.34);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.btn-danger {
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.24);
    color: #fff;
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.06);
    color: #ff9494;
    border-color: rgba(239, 68, 68, 0.34);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.44);
    color: #ffb2b2;
}

.btn-primary:visited,
.btn-primary:focus-visible,
.btn-danger:visited,
.btn-danger:focus-visible {
    color: #fff;
}

.btn-outline:visited,
.btn-outline:focus-visible {
    color: var(--text-primary);
}

.btn-danger-outline:visited,
.btn-danger-outline:focus-visible {
    color: #ff9494;
}

/* === Confirm dialog === */

.app-confirm {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.app-confirm[hidden] {
    display: none;
}

.app-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 14, 0.72);
    backdrop-filter: blur(18px);
}

.app-confirm__dialog {
    position: relative;
    width: min(100%, 440px);
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(24, 26, 36, 0.96), rgba(14, 16, 24, 0.98));
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-confirm__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff9494;
}

.app-confirm__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.app-confirm__message {
    color: var(--text-secondary);
    line-height: 1.6;
}

.app-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-confirm__actions .btn {
    min-width: 132px;
}

/* === Support modal === */

/* === Support modal === */

.support-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.support-modal[hidden] {
    display: none;
}

.support-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 14, 0.72);
    backdrop-filter: blur(18px);
    cursor: pointer;
}

.support-modal__dialog {
    position: relative;
    width: min(100%, 500px);
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(24, 26, 36, 0.96), rgba(14, 16, 24, 0.98));
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.support-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.support-modal__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 0.25rem;
}

.support-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.support-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    flex-shrink: 0;
}

.support-modal__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.support-modal__form {
    display: grid;
    gap: 1rem;
}

.support-modal__status {
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.support-modal__status[hidden] {
    display: none;
}

.support-modal__status--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.support-modal__status--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.support-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.support-contact-link {
    color: #a5b4fc;
    text-decoration: none;
    border-bottom: 1px solid rgba(165, 180, 252, 0.25);
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
}

.support-contact-link:hover {
    color: #c7d2fe;
    border-color: rgba(199, 210, 254, 0.5);
}

/* === Premium form & table overrides === */

.form-label {
    margin-bottom: 0.55rem;
}

.form-input,
.form-select,
.form-textarea {
    min-height: 46px;
    background: linear-gradient(180deg, rgba(8, 10, 16, 0.94), rgba(12, 14, 20, 0.94));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-textarea {
    min-height: 108px;
}

.table-container {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

code {
    color: #e4e8ff;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 3rem 2rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(13, 15, 24, 0.94), rgba(10, 11, 17, 0.94));
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.empty-state h2,
.empty-state-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state p,
.empty-copy {
    max-width: 720px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.error-box {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #ff9f9f;
    font-size: 0.875rem;
}

.subtle-text {
    color: var(--text-muted);
}

.surface-note,
.company-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.company-list,
.confirm-list {
    display: grid;
    gap: 0.75rem;
}

.company-card-title,
.table-title-cell {
    color: var(--text-primary);
}

.company-card-head,
.section-head-inline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* === Components responsive === */

@media (max-width: 768px) {
    .inline-form,
    .inline-form-compact,
    .action-row,
    .inline-actions,
    .company-card-head,
    .section-head-inline,
    .photo-row {
        align-items: stretch;
    }

    .btn,
    .btn-ghost,
    .btn-yandex,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ===== _projects.css ===== */

/* === Project cards === */

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.project-card-contact {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.project-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.project-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.project-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.project-card-actions .btn {
    min-width: 0;
}

.project-card-eyebrow {
    margin-bottom: 0.45rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-eyebrow {
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-subtitle {
    color: var(--text-secondary);
    max-width: 860px;
    line-height: 1.5;
}

.dashboard-header {
    align-items: flex-start;
}

.dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.dashboard-stat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-stat-chip-warn {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.dashboard-toolbar-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-search-form {
    display: flex;
    flex: 1;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-search-input {
    max-width: 420px;
}

.dashboard-view-switch,
.dashboard-filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-filter-row {
    margin-bottom: 1rem;
}

.dashboard-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-filter-chip.active {
    border-color: transparent;
    background: var(--accent-subtle);
    color: var(--accent);
}

.dashboard-empty-state {
    margin-top: 1rem;
}

.project-dashboard-grid,
.project-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.project-dashboard-card,
.project-person-card,
.project-stat-card,
.project-section-card {
    border-color: var(--border);
}

.project-dashboard-card-warn {
    border-color: rgba(239, 68, 68, 0.25);
}

.project-dashboard-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.project-dashboard-card-head,
.project-person-head,
.project-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-dashboard-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.9rem 0;
}

.project-dashboard-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.project-dashboard-meta-card {
    display: grid;
    gap: 0.28rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-dashboard-meta-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-dashboard-meta-value {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.project-dashboard-meta,
.dashboard-table-subtitle,
.project-person-dates,
.project-empty-note {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.project-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.project-status-row-table {
    margin-bottom: 0;
}

.project-dashboard-body {
    display: grid;
    gap: 0.9rem;
}

.project-status-block {
    display: grid;
    gap: 0.65rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, rgba(15, 17, 26, 0.82), rgba(11, 12, 20, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-status-block-title {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.project-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.project-status-chip.ready {
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.project-status-chip.warn {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.dashboard-table-title,
.project-person-name,
.project-section-title {
    color: var(--text-primary);
    font-weight: 700;
}

.dashboard-table-card {
    padding: 0;
}

.project-card-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.project-card-cta-row .btn,
.project-card-cta-row form {
    flex: 1 1 180px;
}

.project-card-cta-row form {
    display: flex;
}

.project-card-cta-row form .btn {
    width: 100%;
}

.project-card-actions-table {
    justify-content: flex-end;
}

.projects-page {
    gap: 1.1rem;
    width: 100%;
}

.projects-hub {
    display: grid;
    gap: 0.95rem;
}

.projects-hub-head,
.projects-workbar-card {
    padding: 1.15rem 1.25rem;
    border-radius: 24px;
}

.projects-hub-head {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 26%),
        linear-gradient(180deg, rgba(15, 17, 26, 0.97), rgba(10, 12, 18, 0.96));
    border-color: rgba(255, 255, 255, 0.06);
}

.projects-workbar-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(14, 16, 24, 0.95), rgba(11, 13, 19, 0.94));
}

.projects-hub-copy {
    display: grid;
    gap: 0.42rem;
    max-width: 54ch;
}

.projects-hub-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(248px, auto);
    gap: 0.85rem 1rem;
    align-items: flex-start;
}

.projects-hub-side,
.projects-hub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.projects-hub-side {
    display: grid;
    justify-items: end;
    align-content: start;
    justify-content: flex-end;
    gap: 0.68rem;
}

.projects-hub .page-title {
    font-size: clamp(1.58rem, 2.1vw, 1.92rem);
    line-height: 1.02;
}

.projects-hub .page-subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 48ch;
}

.projects-context-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.projects-workbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem 1rem;
    align-items: end;
}

.projects-kpi-label,
.project-tile-meta-label,
.project-tile-order-label {
    color: var(--text-muted);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.projects-results-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
    max-width: 36ch;
}

.projects-workbar-side {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    align-items: center;
    justify-content: flex-end;
}

.projects-search-form {
    display: flex;
    flex: 1 1 520px;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.projects-search-field {
    position: relative;
    display: flex;
    flex: 1 1 380px;
    align-items: center;
    min-height: 44px;
}

.projects-search-field svg {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
}

.projects-search-input {
    min-height: 44px;
    padding-left: 2.55rem;
    font-size: 0.9rem;
}

.projects-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.projects-sort-form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.projects-sort-label {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.projects-sort-select {
    min-width: 196px;
    min-height: 40px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    font-size: 0.82rem;
}

.projects-view-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    gap: 0.22rem;
}

.projects-view-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    min-width: 96px;
    padding: 0 1rem;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.81rem;
    font-weight: 700;
}

.projects-view-pill.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(129, 140, 248, 0.92));
    color: #fff;
    box-shadow: 0 10px 18px rgba(99, 102, 241, 0.24);
}

.projects-bottom-row,
.projects-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    align-items: center;
}

.projects-bottom-row {
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.12rem;
}

.projects-inline-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.projects-inline-note strong {
    color: #dde1ff;
}

.projects-health-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.projects-health-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.projects-health-value {
    color: var(--text-primary);
    font-size: 0.83rem;
    font-weight: 700;
}

.projects-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0 0.92rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.projects-filter-chip strong {
    color: var(--text-primary);
    font-size: 0.77rem;
}

.projects-filter-chip.active {
    border-color: rgba(99, 102, 241, 0.38);
    background: rgba(99, 102, 241, 0.2);
    color: #eef0ff;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.16);
}

.projects-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr));
    gap: 0.72rem;
    justify-content: stretch;
    align-items: stretch;
}

@media (min-width: 1320px) {
    .projects-board {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.project-tile {
    display: grid;
    gap: 0.46rem;
    padding: 0.62rem;
}

.project-tile-warn {
    border-color: rgba(239, 68, 68, 0.34);
    box-shadow: 0 20px 40px rgba(40, 8, 8, 0.18);
}

.project-tile-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.project-tile-head-main {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}

.project-tile-head-copy {
    min-width: 0;
    display: grid;
    gap: 0.22rem;
}

.project-tile-head-side {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.project-tile-order-row {
    display: grid;
    gap: 0.12rem;
}

.project-order-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.project-order-selectable {
    user-select: all;
}

.project-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.project-copy-button:hover {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.26);
    background: rgba(99, 102, 241, 0.12);
}

.project-copy-button.copied {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
}

.project-tile-people {
    flex-shrink: 0;
}

.project-tile-order-value,
.projects-table-order,
.projects-table-dimension,
.projects-table-updated {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.project-card-title {
    font-size: 1.02rem;
    line-height: 1.12;
}

.project-card-contact {
    font-size: 0.82rem;
}

.project-tile-body,
.project-tile-facts {
    display: grid;
    gap: 0.65rem;
}

.project-tile-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.045);
}

.project-tile-fact {
    display: grid;
    gap: 0.16rem;
}

.project-tile-meta-value {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
}

.project-tile-progress {
    display: grid;
    gap: 0.42rem;
    padding-top: 0.1rem;
}

.project-tile-progress-head,
.projects-table-status {
    display: grid;
    gap: 0.45rem;
}

.project-tile-progress-head span {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.project-tile-progress-head strong {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.project-tile-progress-bar {
    position: relative;
    overflow: hidden;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.project-tile-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--success) 42%, var(--accent)));
}

.project-status-row-dense {
    gap: 0.35rem;
    padding-top: 0.05rem;
}

.project-status-chip.neutral {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.project-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.15rem;
}

.project-tile-actions .btn,
.project-tile-actions form {
    flex: 1 1 132px;
}

.project-tile-actions form {
    display: flex;
}

.project-tile-actions form .btn {
    width: 100%;
}

.projects-table-list-card {
    padding: 0.8rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01)),
        linear-gradient(180deg, rgba(12, 14, 21, 0.95), rgba(10, 12, 18, 0.95));
}

.projects-table-list {
    display: grid;
    gap: 0.6rem;
}

.projects-table-row {
    display: grid;
    grid-template-columns: minmax(164px, 0.82fr) minmax(240px, 1.2fr) minmax(180px, 0.9fr) minmax(260px, 1.25fr) minmax(218px, auto);
    grid-template-areas: "order client meta status actions";
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(13, 15, 23, 0.94), rgba(10, 12, 18, 0.94));
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.projects-table-cell-order {
    grid-area: order;
}

.projects-table-cell-client {
    grid-area: client;
}

.projects-table-cell-meta {
    grid-area: meta;
}

.projects-table-cell-status {
    grid-area: status;
}

.projects-table-cell-actions {
    grid-area: actions;
}

@media (hover: hover) {
    .projects-table-row:hover {
        transform: translateY(-1px);
        border-color: rgba(99, 102, 241, 0.16);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
    }
}

.projects-table-row-warn {
    border-color: rgba(239, 68, 68, 0.26);
}

.projects-table-cell {
    display: grid;
    gap: 0.26rem;
    min-width: 0;
    align-content: start;
}

.projects-table-cell-order,
.projects-table-cell-client {
    align-content: start;
}

.projects-table-cell-order {
    padding-right: 0.15rem;
}

.projects-table-cell-client .dashboard-table-title {
    font-size: 0.98rem;
    line-height: 1.18;
}

.projects-table-cell-client .dashboard-table-subtitle,
.projects-table-cell-order .dashboard-table-subtitle {
    font-size: 0.78rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.projects-table-meta-stack {
    display: grid;
    gap: 0.34rem;
    padding: 0.04rem 0;
}

.projects-table-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    align-items: center;
}

.projects-table-meta-line-secondary {
    color: var(--text-secondary);
}

.projects-table-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    min-width: 0;
}

.projects-table-meta-item .project-tile-meta-label {
    flex-shrink: 0;
}

.projects-table-status {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    min-width: 0;
}

.projects-table-status-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    align-items: center;
    justify-content: space-between;
}

.projects-table-progress-bar {
    position: relative;
    overflow: hidden;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.projects-table-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--success) 42%, var(--accent)));
}

.projects-table-progress {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.projects-table-row .project-status-row {
    gap: 0.38rem;
}

.projects-table-row .project-status-chip {
    min-height: 25px;
    padding: 0 0.62rem;
    font-size: 0.71rem;
}

.projects-table-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    align-content: start;
}

.projects-table-actions form,
.projects-table-actions .btn {
    width: auto;
    margin: 0;
}

.projects-table-actions form {
    display: flex;
}

.projects-table-actions form .btn {
    width: auto;
}

.projects-table-actions .btn,
.projects-table-actions form .btn {
    min-width: 0;
    padding-inline: 0.78rem;
}

.projects-table-cell-actions {
    justify-items: end;
    align-content: center;
    padding-left: 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card-actions-table {
    align-items: flex-start;
}

.project-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.project-stat-card {
    display: grid;
    gap: 0.35rem;
}

.project-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
}

.project-stat-label,
.project-section-eyebrow {
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.project-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}

.project-workspace-grid-create {
    grid-template-columns: minmax(0, 1fr);
}

.project-create-header {
    padding: 1rem 1.2rem;
    align-items: center;
}

.project-create-header .page-title {
    margin: 0;
    font-size: clamp(1.6rem, 2.2vw, 1.95rem);
}

.project-create-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.project-create-badge,
.project-create-preset-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.project-create-badge-muted {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);
}

.project-create-limit-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        linear-gradient(135deg, rgba(99, 102, 241, 0.09), rgba(59, 130, 246, 0.04));
}

.project-create-limit-item {
    display: grid;
    gap: 0.28rem;
}

.project-create-limit-item span,
.project-create-footer-copy span,
.project-create-field-hint,
.project-create-section-copy {
    color: var(--text-secondary);
}

.project-create-limit-item span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.project-create-limit-item strong {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.project-create-form {
    display: grid;
    gap: 1.15rem;
}

.project-create-section-head {
    margin-top: 0.2rem;
}

.project-create-section-copy {
    margin: 0.35rem 0 0;
    max-width: 58ch;
    font-size: 0.92rem;
    line-height: 1.55;
}

.project-create-label-note {
    margin-left: 0.4rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.project-create-field-hint {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.project-create-inline-note {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.45;
}

.project-create-preset-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: -0.3rem;
}

.project-create-preset-row {
    grid-template-columns: repeat(3, minmax(0, max-content));
    margin: 0;
}

.project-preset-btn.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.22);
}

.project-create-footer {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.project-create-footer-copy {
    display: grid;
    gap: 0.35rem;
}

.project-create-footer-copy strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.project-create-actions {
    align-items: center;
}

.project-form-two-col,
.project-form-three-col,
.project-preset-row,
.project-create-actions {
    display: grid;
    gap: 1rem;
}

.project-form-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-form-three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-preset-row {
    grid-template-columns: repeat(3, max-content);
    margin: 1rem 0;
}

.project-create-actions {
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    margin-top: 0.5rem;
}

.project-progress-list {
    display: grid;
    gap: 0.9rem;
}

.project-progress-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.project-progress-item.done strong {
    color: var(--text-primary);
}

.project-progress-marker {
    width: 12px;
    height: 12px;
    margin-top: 0.3rem;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: transparent;
}

.project-progress-item.done .project-progress-marker {
    border-color: var(--success);
    background: var(--success);
}

.project-people-card {
    display: grid;
    gap: 1rem;
}

.project-person-thumb {
    width: 58px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.project-person-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
}

.project-person-main {
    min-width: 0;
    display: grid;
    gap: 0.35rem;
}

.project-empty-note {
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
}

.project-detail-page {
    gap: 0.8rem;
}

.project-detail-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem 1rem;
    padding: 1rem 1.1rem;
    align-items: start;
}

.project-detail-bar-main {
    display: grid;
    gap: 0.24rem;
    min-width: 0;
}

.project-detail-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.project-detail-title-row .page-title {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.25rem);
    line-height: 1.08;
}

.project-detail-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
}

.project-detail-status-accent {
    color: #d7dcff;
    border-color: rgba(99, 102, 241, 0.26);
    background: rgba(99, 102, 241, 0.14);
}

.project-detail-status-ready {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.1);
}

.project-detail-bar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.project-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
}

.project-status-line-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.018);
}

.project-status-line-item-ready {
    border-color: rgba(34, 197, 94, 0.18);
    background: rgba(34, 197, 94, 0.08);
}

.project-status-line-item-accent {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
}

.project-summary-label {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-summary-value {
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1;
}

.project-detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
    gap: 0.8rem;
    align-items: start;
}

.project-detail-main,
.project-detail-side {
    display: grid;
    gap: 0.8rem;
}

.project-detail-side {
    position: sticky;
    top: 1rem;
}

.project-detail-section {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
}

.project-detail-section-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.compact-head {
    align-items: center;
}

.project-person-list {
    display: grid;
    gap: 0.55rem;
}

.project-person-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.72rem 0.78rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.project-person-row-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.project-person-row-copy {
    min-width: 0;
    display: grid;
    gap: 0.28rem;
}

.project-person-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.project-person-row-actions .btn {
    min-width: 0;
}

.project-detail-meta-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.project-detail-disclosure {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    padding: 0.95rem 1rem;
    cursor: pointer;
    list-style: none;
}

.project-detail-disclosure::-webkit-details-marker {
    display: none;
}

.project-detail-meta-inline {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: right;
}

.project-detail-form {
    display: grid;
    gap: 0.8rem;
    padding: 0 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.compact-grid,
.compact-preset-row,
.project-detail-form-actions {
    gap: 0.75rem;
}

.compact-preset-row {
    margin: 0;
}

.project-detail-form-actions {
    display: flex;
    flex-wrap: wrap;
}

.project-production-panel,
.project-result-photos-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(14, 16, 22, 0.94), rgba(10, 12, 18, 0.94));
}

.project-production-toggles {
    display: grid;
    gap: 0.55rem;
}

.project-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    padding: 0.82rem 0.88rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.project-toggle-idle:hover,
.project-toggle-active:hover {
    border-color: rgba(99, 102, 241, 0.18);
}

.project-toggle-active {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.08);
}

.project-toggle-copy {
    display: grid;
    gap: 0.18rem;
}

.project-toggle-copy strong {
    font-size: 0.86rem;
}

.project-toggle-copy small {
    color: var(--text-secondary);
    font-size: 0.74rem;
}

.project-toggle-indicator {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.project-toggle-active .project-toggle-indicator {
    border-color: var(--success);
    background: var(--success);
}

.project-production-notes-form,
.project-result-upload-form,
.project-production-downloads {
    display: grid;
    gap: 0.6rem;
}

.project-notes-input {
    min-height: 92px;
    resize: vertical;
}

.project-download-note,
.project-result-photo-copy span,
.compact-empty-note {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}

.project-result-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 700;
}

.project-result-photo-list {
    display: grid;
    gap: 0.55rem;
}

.project-result-photo-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.6rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.016);
}

.project-result-photo-thumb-link {
    display: block;
}

.project-result-photo-thumb {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #090b10;
}

.project-result-photo-copy {
    min-width: 0;
    display: grid;
    gap: 0.16rem;
}

.project-result-photo-copy strong {
    font-size: 0.82rem;
    line-height: 1.2;
}

.project-result-photo-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.project-result-photo-actions form {
    display: flex;
}

.project-result-photo-actions .btn {
    min-width: 0;
}

.project-workbench-page {
    gap: 0.9rem;
}

.project-workbench-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: stretch;
}

.project-workbench-top > .card {
    height: 100%;
}

.project-download-hub-panel,
.project-result-composer-panel,
.project-people-workbench,
.project-person-workspace,
.project-person-file-card,
.project-download-row {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(14, 16, 22, 0.94), rgba(10, 12, 18, 0.94));
}

.project-download-hub-panel,
.project-result-composer-panel,
.project-people-workbench {
    min-height: 100%;
}

.project-download-hub-panel,
.project-result-composer-panel {
    padding: 0.9rem 0.95rem;
}

.project-mini-section-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-preview-grid,
.project-preview-card,
.project-preview-card-copy,
.project-preview-card-actions {
    display: grid;
    gap: 0.55rem;
}

.project-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.project-preview-card {
    padding: 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.014);
    align-content: start;
}

.project-preview-thumb-link {
    display: block;
}

.project-preview-thumb {
    width: 100%;
    aspect-ratio: 1.08 / 1;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #090b10;
    padding: 0.35rem;
}

.project-preview-card-copy {
    gap: 0;
}

.project-preview-card-copy strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.project-preview-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: auto;
}

.project-preview-card-actions .btn {
    width: 100%;
    justify-content: center;
}

.project-download-hero,
.project-download-list,
.project-download-row,
.project-download-row-copy,
.project-download-row-meta,
.project-download-hero-copy,
.project-download-primary-actions,
.project-result-composer,
.project-result-dropzone,
.project-result-composer-grid,
.project-result-composer-actions,
.project-person-workspace-list,
.project-person-workspace-body,
.project-person-editor-form,
.project-inline-actions-row,
.project-person-files-panel,
.project-person-files-grid,
.project-person-file-card,
.project-person-file-copy,
.project-person-file-actions,
.project-person-summary-actions,
.project-person-upload-status,
.project-bottom-meta-card {
    display: grid;
    gap: 0.7rem;
}

.project-download-hero {
    padding: 0.72rem 0.78rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.014);
    gap: 0.5rem;
}

.project-download-hero-copy {
    gap: 0.16rem;
}

.project-download-hero-copy strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

.project-download-hero-copy span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.35;
}

.project-download-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-download-primary-actions .btn {
    min-width: 0;
}

.project-download-list {
    gap: 0.55rem;
}

.project-download-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.62rem 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.012);
}

.project-download-row-copy {
    gap: 0.16rem;
    min-width: 0;
}

.project-download-row-copy strong {
    font-size: 0.82rem;
    line-height: 1.2;
}

.project-download-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-download-row-copy strong,
.project-result-photo-person,
.project-person-file-copy strong,
.project-person-summary-hint {
    color: var(--text-primary);
}

.project-download-row-copy span,
.project-person-file-copy span,
.project-person-upload-status,
.project-result-photo-person,
.project-person-summary-hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.project-download-row-actions,
.project-inline-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}

.project-result-composer {
    gap: 0.65rem;
}

.project-result-dropzone {
    padding: 0.72rem 0.78rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.012);
    gap: 0.35rem;
}

.project-result-dropzone.is-dragover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.project-result-dropzone strong {
    font-size: 0.86rem;
}

.project-result-dropzone span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.35;
}

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

.project-upload-dropzone-copy,
.project-upload-dropzone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.project-upload-dropzone-actions {
    justify-content: space-between;
}

.project-upload-select-btn {
    cursor: pointer;
}

.project-upload-file-name {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

.project-result-composer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.project-result-composer-actions {
    display: flex;
    justify-content: flex-start;
}

.project-result-composer-actions .btn {
    min-width: 0;
}

.project-empty-state-inline {
    padding: 0.55rem 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

.project-download-hub-panel .btn,
.project-result-composer-panel .btn {
    min-height: 38px;
    padding: 0 0.8rem;
    border-radius: 12px;
}

.project-download-hub-panel .btn-primary,
.project-result-composer-panel .btn-primary {
    box-shadow: none;
}

.project-download-hub-panel .btn-primary:hover,
.project-result-composer-panel .btn-primary:hover {
    transform: none;
    box-shadow: none;
}

.project-people-workbench {
    gap: 0.9rem;
}

.project-person-workspace-list {
    gap: 0.65rem;
}

.project-person-workspace {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
}

.project-person-workspace-summary {
    list-style: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.78rem 0.88rem;
    cursor: pointer;
}

.project-person-summary-actions {
    min-width: 0;
    min-height: 1px;
}

.project-person-workspace-summary::-webkit-details-marker {
    display: none;
}

.project-person-workspace[open] .project-person-workspace-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.016);
}

.project-person-workspace-body {
    grid-template-columns: minmax(340px, 1.1fr) minmax(320px, 0.9fr);
    padding: 0.85rem;
    align-items: start;
    gap: 0.8rem;
}

.project-person-editor-form {
    gap: 0.7rem;
}

.project-inline-section-title {
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-person-name-grid {
    align-items: start;
}

.project-person-editor-form .form-group {
    margin-bottom: 0;
}

.project-person-editor-form .form-label {
    margin-bottom: 0.3rem;
}

.project-person-editor-form .form-input {
    min-height: 38px;
}

.project-date-field {
    position: relative;
}

.project-date-input {
    padding-right: 2.75rem;
}

.project-date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.project-date-trigger {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.project-date-trigger:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.project-person-editor-actions {
    justify-content: space-between;
}

.project-person-files-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
    align-items: stretch;
    gap: 0.65rem;
}

.project-person-file-card {
    padding: 0.65rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-content: start;
    min-height: 100%;
    gap: 0.55rem;
}

.project-person-file-preview {
    display: grid;
}

.project-person-file-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #090b10;
}

.project-person-file-thumb-empty {
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.75rem;
}

.project-person-file-thumb-empty-engraving {
    aspect-ratio: 1 / 1;
    align-content: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.025) 10px,
            rgba(255, 255, 255, 0.01) 10px,
            rgba(255, 255, 255, 0.01) 20px
        );
}

.project-person-file-copy {
    gap: 0.18rem;
}

.project-person-file-copy strong {
    font-size: 0.82rem;
    line-height: 1.2;
}

.project-person-file-actions {
    align-content: end;
    margin-top: auto;
    gap: 0.45rem;
}

.project-inline-empty-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.012);
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.project-inline-actions-row-muted {
    align-content: end;
}

.project-person-summary-actions .btn {
    min-height: 34px;
    padding: 0 0.7rem;
}

/* === Deceased rows === */

.deceased-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.deceased-row:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .project-detail-bar,
    .project-person-row,
    .project-result-photo-card,
    .project-status-strip,
    .project-workbench-top,
    .project-preview-grid,
    .project-preview-card-actions,
    .project-result-composer-grid,
    .project-person-workspace-body,
    .project-person-files-grid,
    .project-download-row,
    .project-person-workspace-summary {
        grid-template-columns: 1fr;
    }

    .project-status-strip,
    .project-upload-dropzone-actions,
    .project-inline-empty-action {
        display: grid;
        justify-content: stretch;
    }

    .project-detail-bar-actions,
    .project-person-row-actions,
    .project-result-photo-actions,
    .project-download-row-actions,
    .project-inline-actions-row {
        justify-content: flex-start;
    }

    .project-detail-disclosure {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-summary-strip {
        gap: 0.5rem;
    }

    .project-person-row-main {
        align-items: flex-start;
    }

    .project-create-limit-bar {
        grid-template-columns: 1fr;
    }

    .project-create-preset-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-stat-grid,
    .project-workspace-grid,
    .project-workspace-grid-create,
    .project-dashboard-meta-grid,
    .project-form-two-col,
    .project-form-three-col,
    .project-preset-row,
    .project-create-actions {
        grid-template-columns: 1fr;
    }
}

/* === Project responsive 1280px === */

@media (max-width: 1280px) {
    .projects-board {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr));
    }

    .projects-table-row {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1.1fr);
        grid-template-areas:
            "order client meta status"
            "actions actions actions actions";
        align-items: start;
    }

    .projects-table-cell-actions {
        grid-column: 1 / -1;
        justify-items: start;
        padding-left: 0;
        padding-top: 0.2rem;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .projects-table-actions {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, max-content);
        justify-content: flex-start;
    }
}


/* === Project responsive 980px === */

@media (max-width: 980px) {
    .projects-hub-main,
    .projects-workbar {
        grid-template-columns: 1fr;
    }

    .projects-hub-side,
    .projects-workbar-side,
    .projects-health-strip {
        justify-content: flex-start;
    }

    .projects-hub-side {
        justify-items: start;
    }

    .projects-results-inline {
        max-width: none;
    }

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

    .projects-table-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "order client"
            "meta status"
            "actions actions";
        gap: 0.8rem;
    }

    .projects-table-actions {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, max-content);
        justify-content: flex-start;
    }

    .project-tile-elegant {
        padding: 0.92rem;
    }

    .elegant-monument-preview-stage.front-only {
        min-height: 172px;
    }

    .elegant-monument-preview-stage.front-only.is-landscape {
        min-height: 148px;
    }
}

/* === Project responsive 1100px === */

@media (max-width: 1100px) {
    .projects-workbar-side {
        justify-content: flex-start;
    }

    .projects-bottom-row {
        padding: 0;
    }

    .project-tile-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects-table-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.22rem;
    }

    .projects-bottom-row,
    .projects-workbar {
        align-items: stretch;
    }
}

/* === Project responsive 768px === */

@media (max-width: 768px) {
    .projects-hub-head,
    .projects-workbar-card,
    .projects-table-list-card,
    .project-tile-elegant {
        border-radius: 20px;
    }

    .projects-hub-head,
    .projects-workbar-card {
        padding: 1rem;
    }

    .projects-board {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .project-tile-facts {
        grid-template-columns: 1fr;
    }

    .projects-table-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "order"
            "client"
            "meta"
            "status"
            "actions";
        gap: 0.75rem;
    }

    .projects-table-actions,
    .projects-table-meta-line,
    .projects-table-status-top {
        justify-content: flex-start;
    }

    .projects-search-form,
    .projects-workbar,
    .projects-workbar-side,
    .projects-bottom-row,
    .project-tile-head,
    .project-tile-head-side,
    .projects-results-inline,
    .projects-table-status-top {
        align-items: stretch;
    }

    .projects-hub-side,
    .projects-filter-row,
    .projects-health-strip,
    .projects-results-inline,
    .projects-table-cell-actions {
        width: 100%;
    }

    .projects-workbar-side {
        justify-content: flex-start;
    }

    .projects-bottom-row {
        justify-content: flex-start;
    }

    .projects-hub-badges {
        width: 100%;
        justify-content: flex-start;
    }

    .projects-view-switch {
        width: 100%;
    }

    .projects-sort-form {
        width: 100%;
    }

    .projects-sort-select {
        width: 100%;
        min-width: 0;
    }

    .projects-view-pill {
        flex: 1 1 0;
    }

    .project-tile-head-side {
        justify-content: flex-start;
    }

    .projects-table-cell-actions {
        grid-column: auto;
        padding-left: 0;
        padding-top: 0;
        border-left: 0;
        border-top: 0;
    }

    .elegant-tile-header,
    .elegant-tile-badges {
        align-items: flex-start;
    }

    .elegant-tile-badges {
        margin-left: 0;
        justify-content: flex-start;
    }

    .elegant-monument-preview-stage.front-only {
        min-height: 170px;
    }

    .elegant-monument-preview-stage.front-only.is-landscape,
    .elegant-monument-preview-stage.has-back,
    .elegant-monument-preview-stage.has-back.is-landscape {
        min-height: 0;
    }

    .elegant-monuments.has-back {
        grid-template-columns: 1fr;
    }

    .elegant-tile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .elegant-tile-actions > .btn,
    .elegant-tile-actions form {
        flex: initial;
    }

    .elegant-tile-actions form {
        grid-column: 1 / -1;
    }

    .elegant-tile-actions form .btn {
        width: 100%;
    }

    .elegant-delete-button {
        min-width: 0;
    }

    .elegant-delete-button-text {
        display: inline;
    }

    .projects-table-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        width: 100%;
    }

    .projects-table-actions form {
        grid-column: 1 / -1;
    }

    .projects-table-actions .btn,
    .projects-table-actions form .btn {
        width: 100%;
    }
}

/* === Elegant project tiles === */

/* Elegant Minimalist Project Tile */
.project-tile-elegant {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    min-height: 100%;
    padding: 0.88rem;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        linear-gradient(180deg, rgba(14, 16, 22, 0.96), rgba(9, 11, 17, 0.96));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

@media (hover: hover) {
    .project-tile-elegant:hover {
        transform: translateY(-3px);
        border-color: rgba(99, 102, 241, 0.24);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.26);
    }
}

.elegant-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.elegant-tile-id-group {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.elegant-tile-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.elegant-tile-order-copy {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.elegant-copy-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.elegant-copy-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.elegant-tile-badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

.elegant-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-secondary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.elegant-status-dot.success { background: var(--success); }
.elegant-status-dot.warn { background: var(--warning); }
.elegant-status-dot.danger { background: var(--danger); }

.elegant-tile-hero {
    display: block;
    min-height: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 42%);
    padding: 0.78rem 0.82rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.05);
}

.elegant-tile-main-info {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 0.24rem;
}

.elegant-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.16;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.elegant-card-contact {
    font-size: 0.74rem;
    color: color-mix(in srgb, var(--text-secondary) 68%, var(--text-primary));
    overflow-wrap: anywhere;
}

.elegant-tile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.28rem 0.36rem;
    font-size: 0.66rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.elegant-monument-preview-stage {
    padding: 0.66rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.05);
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05), transparent 56%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
    overflow: hidden;
}

.elegant-monument-preview-stage.front-only {
    min-height: 184px;
}

.elegant-monument-preview-stage.front-only.is-landscape {
    min-height: 156px;
}

.elegant-monument-preview-stage.has-back {
    min-height: 164px;
}

.elegant-monument-preview-stage.has-back.is-landscape {
    min-height: 148px;
}

.elegant-monuments {
    display: grid;
    min-height: 100%;
    align-items: center;
    justify-content: stretch;
    gap: 0.55rem;
}

.elegant-monuments.front-only {
    grid-template-columns: minmax(0, 1fr);
    max-width: min(100%, 220px);
    margin-inline: auto;
}

.elegant-monuments.has-back {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monument-shape {
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 2px solid rgba(255,255,255,0.22);
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 0;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(0,0,0,0.24);
}

.monument-shape-back {
    opacity: 0.9;
}

.monument-shape-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}

.monument-shape-side-label {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 4;
    padding: 0.16rem 0.34rem;
    border-radius: 999px;
    background: rgba(7, 8, 12, 0.68);
    color: rgba(255,255,255,0.78);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.elegant-tile-progress {
    margin-top: 0.08rem;
}

.elegant-progress-track {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.elegant-progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 4px;
}

.elegant-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-top: 0.04rem;
}

.elegant-chip {
    font-size: 0.62rem;
    padding: 0.16rem 0.38rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.06);
}

.elegant-chip.ready {
    background: rgba(34,197,94,0.1);
    color: var(--success);
    border-color: rgba(34,197,94,0.2);
}

.elegant-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.58rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.elegant-tile-actions > .btn {
    flex: 1 1 108px;
}

.elegant-tile-actions .btn-xs {
    padding: 0.34rem 0.48rem;
    font-size: 0.68rem;
    border-radius: 9px;
}

.elegant-tile-actions form {
    display: flex;
    flex: 0 0 auto;
}

.elegant-tile-actions form .btn {
    width: auto;
}

.elegant-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 42px;
}

.elegant-delete-button-text {
    display: none;
}

.monument-shape {
    position: relative;
    overflow: hidden;
}

.monument-shape-has-preview {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.16);
}

.monument-layout-preview {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(8, 8, 10, 0.24));
}

.project-preview-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: block;
}

.project-preview-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #050505;
    filter: grayscale(1) contrast(1.02) brightness(0.98);
}

.monument-layout-preview-back {
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.06), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(8, 8, 10, 0.3));
}

@media (max-width: 1100px) {
    .elegant-monument-preview-stage {
        padding: 0.62rem;
    }

    .elegant-monument-preview-stage.front-only {
        min-height: 228px;
    }

    .elegant-monument-preview-stage.front-only.is-landscape {
        min-height: 194px;
    }

    .elegant-monument-preview-stage.has-back {
        min-height: 206px;
    }

    .elegant-monument-preview-stage.has-back.is-landscape {
        min-height: 176px;
    }
}

/* ===== _groups.css ===== */

.groups-page {
    gap: 1rem;
}

.groups-workspace {
    padding: 0;
    overflow: hidden;
}

.groups-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.groups-hero-copy {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.groups-eyebrow {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.groups-hero-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.groups-hero-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.groups-hero-subtitle {
    margin: 0;
    max-width: 52rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.groups-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.groups-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.groups-overview-item {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.groups-overview-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.groups-overview-value {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.15;
}

.groups-overview-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.groups-tab-bar {
    padding: 0 1.5rem;
    margin-bottom: 0;
}

.groups-tab-bar .tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.9rem 0.25rem 0.85rem;
    margin-right: 1.25rem;
    border-bottom-width: 2px;
    font-weight: 600;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.tab-link.active .tab-badge {
    background: rgba(99, 102, 241, 0.16);
    color: var(--accent-hover);
}

.tab-badge-warn {
    background: rgba(245, 158, 11, 0.16);
    color: #ffd089;
}

.groups-section {
    display: grid;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1.5rem;
}

.groups-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.groups-toolbar {
    display: grid;
    gap: 0.75rem;
}

.groups-create-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    max-width: 44rem;
}

.groups-create-row .form-input {
    flex: 1 1 18rem;
    min-width: 0;
}

.groups-inline-note {
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.groups-inline-note a {
    color: var(--accent-hover);
    text-decoration: none;
}

.groups-inline-note a:hover {
    text-decoration: underline;
}

.groups-list,
.groups-members-list,
.groups-invitation-list {
    display: grid;
    gap: 0.75rem;
}

.groups-list-row,
.groups-member-row,
.groups-invitation-row {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.groups-list-row {
    grid-template-columns: minmax(0, 1.7fr) auto auto;
    align-items: center;
}

.groups-list-row-current {
    border-color: rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.07);
}

.groups-list-main,
.groups-invitation-main {
    min-width: 0;
    display: grid;
    gap: 0.35rem;
}

.groups-list-title-row,
.groups-member-title-row,
.groups-invitation-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.groups-list-title,
.groups-member-name,
.groups-invitation-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.groups-list-summary {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
}

.groups-current-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
}

.groups-list-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.groups-stat-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.groups-stat-pill strong {
    color: var(--text-primary);
    margin-right: 0.2rem;
}

.groups-list-actions {
    display: flex;
    justify-content: flex-end;
}

.groups-member-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.groups-member-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.groups-member-info {
    min-width: 0;
    display: grid;
    gap: 0.3rem;
}

.groups-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.groups-member-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.groups-member-role-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.groups-select-compact {
    min-width: 170px;
    min-height: 40px;
    border-radius: 14px;
}

.groups-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.groups-ai-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.groups-ai-btn-on {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.08);
    color: #b8f3c9;
}

.groups-ai-btn-off {
    color: var(--text-secondary);
}

.groups-ai-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.groups-actions-menu {
    position: relative;
}

.groups-menu-toggle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
}

.groups-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    display: none;
    min-width: 180px;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #161923;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.groups-actions-menu.is-open .groups-menu-panel {
    display: grid;
    gap: 0.2rem;
}

.groups-menu-panel form {
    display: block;
}

.groups-menu-item {
    width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.groups-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.groups-menu-item-danger {
    color: #ff9c9c;
}

.groups-menu-item-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.groups-member-head-badge {
    display: flex;
    justify-content: flex-end;
}

.groups-danger-zone {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.groups-invite-shell {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 18px;
    background: rgba(99, 102, 241, 0.06);
}

.groups-invite-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px auto;
    gap: 0.6rem;
    align-items: center;
}

.groups-invite-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.groups-subsection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
}

.groups-subsection-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.groups-invitation-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.groups-invitation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.groups-invitation-expire {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.groups-link-panel {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(7, 9, 14, 0.48);
}

.groups-link-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.groups-link-compact {
    max-width: 100%;
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.groups-link-compact:hover {
    color: var(--accent-hover);
}

.groups-legacy-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #ffd089;
    font-size: 0.72rem;
    font-weight: 700;
}

.groups-no-pending {
    margin: 0;
}

.groups-archive-details {
    display: grid;
    gap: 0.75rem;
}

.groups-archive-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.groups-archive-summary::-webkit-details-marker {
    display: none;
}

.groups-inline-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
}

@media (max-width: 1080px) {
    .groups-list-row,
    .groups-member-row,
    .groups-invitation-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .groups-list-stats,
    .groups-list-actions,
    .groups-member-head-badge,
    .groups-member-actions-row {
        justify-content: flex-start;
    }

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

@media (max-width: 768px) {
    .groups-hero,
    .groups-section {
        padding: 1.1rem;
    }

    .groups-hero {
        flex-direction: column;
    }

    .groups-hero-actions {
        justify-content: flex-start;
    }

    .groups-overview,
    .groups-tab-bar {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .groups-section-head {
        align-items: stretch;
    }

    .groups-invite-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .groups-overview {
        grid-template-columns: 1fr;
    }

    .groups-create-row,
    .groups-member-role-form,
    .groups-member-actions-row {
        width: 100%;
    }

    .groups-create-row .btn,
    .groups-member-role-form .btn,
    .groups-member-role-form .form-select,
    .groups-member-actions-row .btn,
    .groups-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .groups-tab-bar .tab-link {
        margin-right: 0.85rem;
    }
}

/* ===== _admin.css ===== */

/* ── Admin: Support ── */

.support-admin-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .support-admin-layout {
        grid-template-columns: 1fr;
    }
}

.support-admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.support-admin-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-admin-messages {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 70vh;
    overflow-y: auto;
}

.support-admin-msg-row {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 120ms ease;
    border: 1px solid transparent;
}

.support-admin-msg-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.support-admin-msg-row.is-active {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
}

.support-admin-msg-row.is-unread {
    color: var(--text-primary);
    font-weight: 500;
}

.support-admin-msg-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.support-admin-msg-from {
    font-size: 0.85rem;
}

.support-admin-msg-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.support-admin-msg-subject {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.support-admin-msg-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.support-admin-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.support-admin-detail-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.support-admin-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-admin-note-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.support-admin-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-muted);
}

/* === Review admin === */

.review-admin-create-card,
.review-admin-create-form,
.review-admin-create-grid,
.review-admin-grid,
.review-admin-card,
.review-admin-gallery,
.review-admin-edit-form {
    display: grid;
}

.review-admin-create-card,
.review-admin-create-form,
.review-admin-card,
.review-admin-edit-form {
    gap: 1rem;
}

.review-admin-section-head,
.review-admin-create-actions,
.review-admin-filter-form,
.review-admin-card-head,
.review-admin-meta,
.review-admin-author {
    display: flex;
}

.review-admin-section-head {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.review-admin-section-head h2 {
    letter-spacing: -0.03em;
}

.review-admin-section-head-inline {
    margin-bottom: 1rem;
}

.review-admin-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.review-admin-create-content {
    grid-column: 1 / -1;
}

.review-admin-textarea {
    min-height: 8rem;
    resize: vertical;
}

.review-admin-create-actions,
.review-admin-filter-form {
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.review-admin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-secondary);
}

.review-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.review-admin-card {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.review-admin-card-head,
.review-admin-meta {
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.review-admin-author {
    align-items: center;
    gap: 0.8rem;
}

.review-admin-author-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(99, 102, 241, 0.18);
    color: var(--text-primary);
    font-weight: 700;
}

.review-admin-author-avatar.has-image span {
    opacity: 0;
}

.review-admin-author-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-admin-meta {
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.review-admin-stars {
    margin-top: 0.35rem;
}

.review-admin-stars .home-review-star {
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
}

.review-admin-stars .home-review-star.is-filled {
    color: #ffd56a;
}

.review-admin-text {
    color: var(--text-primary);
    line-height: 1.7;
}

.review-admin-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.review-admin-gallery img {
    width: 100%;
    height: 11rem;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-input);
}

.review-admin-edit-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.85rem;
}

.review-admin-edit-summary {
    cursor: pointer;
    list-style: none;
    color: var(--accent);
    font-weight: 600;
}

.review-admin-edit-summary::-webkit-details-marker {
    display: none;
}

.review-admin-edit-form {
    margin-top: 0.85rem;
}

.review-admin-edit-grid {
    gap: 0.85rem;
}

.review-admin-edit-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .review-admin-create-grid,
    .review-admin-gallery {
        grid-template-columns: 1fr;
    }

    .review-admin-section-head,
    .review-admin-create-actions,
    .review-admin-filter-form,
    .review-admin-card-head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ─── Admin Finance ─── */

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

.stat-card {
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.text-right {
    text-align: right;
}

.text-positive {
    color: var(--success, #4caf50);
}

.text-negative {
    color: var(--error, #ef5350);
}

.row-muted {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .tab-bar {
        flex-wrap: wrap;
    }
}

/* ===== _auth.css ===== */

.page-grid-2,
.photo-layout {
    display: grid;
    gap: 1rem;
    align-items: start;
}

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

.photo-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
    max-width: 1180px;
}

.photo-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.photo-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.photo-thumb-wrap {
    flex-shrink: 0;
}

.photo-thumb {
    width: 72px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-input);
    display: block;
}

.photo-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.photo-thumb--dim {
    opacity: 0.4;
}

.photo-meta {
    flex: 1;
    min-width: 0;
}

.photo-title {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.photo-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-end;
}

.upload-status {
    margin-top: 0.9rem;
    min-height: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.confirm-card {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.admin-code {
    display: block;
    max-width: 460px;
    white-space: pre-wrap;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: #e4e8ff;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 2rem;
    min-height: 100vh;
}

.landing-page {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.24), transparent 24%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 22%),
        linear-gradient(180deg, #05060a 0%, #0a0a0a 44%, #08090d 100%);
}

.landing-shell {
    width: min(1280px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.25rem 0 2.5rem;
    display: grid;
    gap: 1.5rem;
}

.landing-hero,
.landing-section,
.landing-final {
    position: relative;
}

.landing-hero {
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    background:
        radial-gradient(circle at 84% 16%, rgba(99, 102, 241, 0.2), transparent 24%),
        linear-gradient(180deg, rgba(13, 16, 24, 0.98), rgba(6, 8, 13, 0.96));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.34);
    overflow: hidden;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.landing-nav-actions,
.landing-actions,
.landing-final-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.86fr);
    gap: 1.25rem;
    align-items: stretch;
}

.landing-hero-copy {
    display: grid;
    gap: 1.15rem;
    align-content: start;
    padding: 0.75rem 0.25rem 0.25rem;
}

.landing-title {
    max-width: 12ch;
    font-size: clamp(2.8rem, 5vw, 5.3rem);
    line-height: 0.93;
    letter-spacing: -0.07em;
}

.landing-lead {
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.82;
}

.landing-proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.landing-proof-item,
.landing-panel-step,
.landing-workflow-card,
.landing-card,
.landing-production-side,
.landing-production-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(18px);
}

.landing-proof-item {
    padding: 1rem;
    border-radius: 22px;
    display: grid;
    gap: 0.35rem;
}

.landing-proof-item strong,
.landing-panel-step strong,
.landing-workflow-card h3,
.landing-card h3,
.landing-side-block h3 {
    letter-spacing: -0.03em;
}

.landing-proof-item span,
.landing-panel-step p,
.landing-workflow-card p,
.landing-card p,
.landing-side-block p,
.landing-bullet-item,
.landing-section-copy {
    color: var(--text-secondary);
    line-height: 1.7;
}

.landing-hero-panel {
    padding: 1.3rem;
    display: grid;
    gap: 1rem;
    align-content: start;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 26%),
        rgba(10, 13, 19, 0.92);
}

.landing-panel-eyebrow,
.landing-card-kicker {
    color: rgba(212, 218, 255, 0.74);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.landing-panel-title,
.landing-final-title {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.landing-panel-stack,
.landing-bullet-list {
    display: grid;
    gap: 0.8rem;
}

.landing-panel-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
}

.landing-step-index,
.landing-workflow-number,
.landing-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.16);
    color: #d7dcff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.landing-section {
    padding: 0.25rem;
    display: grid;
    gap: 1.1rem;
}

.landing-section-head {
    display: grid;
    gap: 0.5rem;
    max-width: 70ch;
}

.landing-section-head-split {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: end;
}

.landing-section-title {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.landing-section-copy-side {
    max-width: 48ch;
    justify-self: end;
}

.landing-card-grid,
.landing-workflow-grid,
.landing-production-grid {
    display: grid;
    gap: 1rem;
}

.landing-card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-card {
    padding: 1.25rem;
    border-radius: 26px;
    display: grid;
    gap: 0.7rem;
}

.landing-section-accent {
    padding: 1.35rem;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02)),
        rgba(9, 11, 17, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.landing-workflow-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-workflow-card {
    min-height: 100%;
    padding: 1.2rem;
    border-radius: 24px;
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.landing-icon-badge {
    width: fit-content;
}

.landing-production-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.82fr);
    align-items: stretch;
}

.landing-production-card,
.landing-production-side,
.landing-final {
    padding: 1.35rem;
    border-radius: 28px;
}

.landing-side-block {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 0;
}

.landing-side-block + .landing-side-block {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.landing-bullet-item {
    position: relative;
    padding-left: 1.1rem;
}

.landing-bullet-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
}

.landing-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(15, 17, 28, 0.96), rgba(8, 10, 16, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-shell {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
    gap: 1.5rem;
    align-items: stretch;
}

.auth-showcase,
.auth-card {
    border-radius: 30px;
}

.auth-showcase {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.22), transparent 28%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(15, 17, 28, 0.96), rgba(8, 10, 16, 0.94));
    box-shadow: var(--surface-shadow), var(--surface-glow);
    display: grid;
    gap: 1.5rem;
    align-content: space-between;
}

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

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.auth-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35);
}

.auth-brand-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.auth-brand-copy strong {
    display: block;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.auth-brand-copy span {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-display {
    display: grid;
    gap: 0.7rem;
}

.auth-title {
    max-width: 13ch;
    font-size: clamp(1.9rem, 3.2vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.auth-lead {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.72;
    max-width: 42ch;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-weight: 600;
}

.auth-back-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-meta-list {
    display: grid;
    gap: 0.75rem;
}

.auth-meta-item {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-meta-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.auth-meta-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-card {
    width: 100%;
    max-width: none;
    padding: 2rem;
}

.auth-card-head {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.auth-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-card-subtitle {
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-provider-list {
    display: grid;
    gap: 0.85rem;
}

.auth-legal-notice {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

.auth-legal-notice a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-legal-notice a:hover {
    color: var(--text-primary);
}

.btn-yandex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #fc3f1d, #ff6a3d);
    color: #fff;
    padding: 0.95rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(252, 63, 29, 0.24);
}

.btn-yandex:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-sber {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 72%, white));
    color: #fff;
    padding: 0.95rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(34, 197, 94, 0.24);
}

.btn-sber:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.dev-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 0.75rem;
}

.dev-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.btn-secondary {
    display: block;
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.12);
    color: #fff;
    padding: 0.95rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.48);
}

.mt-md {
    margin-top: 1rem;
}

.mb-md {
    margin-bottom: 1rem;
}

.mb-sm {
    margin-bottom: 0.75rem;
}

.mb-0 {
    margin-bottom: 0;
}

.cursor-pointer {
    cursor: pointer;
}

.photo-thumb-engraving {
    filter: grayscale(1);
}

/* === Auth/Landing responsive 1100px === */

@media (max-width: 1100px) {
    .auth-shell,
    .landing-hero-grid,
    .landing-section-head-split,
    .landing-production-grid,
    .page-grid-2,
    .photo-layout {
        grid-template-columns: 1fr;
    }

    .landing-proof-strip,
    .landing-workflow-grid,
    .landing-card-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-section-copy-side {
        justify-self: start;
    }

    .landing-final {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === Auth/Landing responsive 768px === */

@media (max-width: 768px) {
    .landing-shell {
        width: min(100% - 1rem, 100%);
        padding-top: 0.5rem;
    }

    .landing-hero,
    .landing-section-accent,
    .landing-production-card,
    .landing-production-side,
    .landing-final {
        border-radius: 24px;
    }

    .landing-nav,
    .landing-nav-actions,
    .landing-actions,
    .landing-final-actions {
        align-items: stretch;
    }

    .landing-nav,
    .landing-final {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-showcase-top {
        flex-direction: column;
        align-items: stretch;
    }

    .landing-title {
        max-width: none;
    }

    .photo-actions {
        width: 100%;
        align-items: stretch;
    }
}

/* ===== _utilities.css ===== */

/* === Existing utilities === */

.mt-md {
    margin-top: 1rem;
}

.mb-md {
    margin-bottom: 1rem;
}

.mb-sm {
    margin-bottom: 0.75rem;
}

.mb-0 {
    margin-bottom: 0;
}

.cursor-pointer {
    cursor: pointer;
}

.photo-thumb-engraving {
    filter: grayscale(1);
}

/* === Spacing utilities === */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 0.75rem; }
.gap-lg { gap: 1rem; }
.gap-xl { gap: 1.5rem; }

/* === Flex utilities === */

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }

/* === Text utilities === */

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* === Display utilities === */

.hidden { display: none; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
