/* Public home */
.home-page {
    min-height: calc(100dvh - 62px);
    background: var(--color-bg);
}

.home-hero {
    min-height: max(600px, calc(100dvh - 62px));
    display: grid;
    align-items: center;
    padding: clamp(3rem, 8vw, 8rem) clamp(1.25rem, 8vw, 8rem);
    background:
        linear-gradient(90deg, rgba(5, 6, 10, 0.98) 0%, rgba(5, 6, 10, 0.82) 42%, rgba(5, 6, 10, 0.24) 78%, rgba(5, 6, 10, 0.38) 100%),
        linear-gradient(180deg, transparent 70%, var(--color-bg) 100%),
        url("../background.png") center / cover no-repeat;
}

.home-hero-content {
    width: min(690px, 100%);
    padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.home-logo {
    width: clamp(88px, 8vw, 118px);
    height: clamp(88px, 8vw, 118px);
    margin-bottom: 1.1rem;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(140, 82, 255, 0.22));
}

.home-kicker {
    margin-bottom: 0.8rem;
    color: var(--color-gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 16ch;
    margin-bottom: 1.1rem;
    font-size: clamp(2.45rem, 4.3vw, 4.35rem);
    line-height: 0.98;
    text-wrap: balance;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.62);
}

.home-lead {
    max-width: 56ch;
    margin-bottom: 1.7rem;
    color: #c8c4cb;
    font-size: clamp(1rem, 1.45vw, 1.18rem);
    line-height: 1.65;
}

.home-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.home-actions .btn {
    min-width: 142px;
}

.home-summary {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    min-height: 118px;
    margin-top: -1px;
    padding: 1.5rem;
    color: var(--color-text-muted);
    background: linear-gradient(180deg, var(--color-bg), #0a0b11);
    border-top: 1px solid rgba(215, 179, 106, 0.1);
    text-align: center;
}

.home-summary p {
    max-width: 760px;
    margin: 0;
    line-height: 1.65;
}

/* Authentication and profile */
.auth-page {
    position: relative;
    min-height: calc(100dvh - 110px);
    isolation: isolate;
}

.auth-page::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 62px 0 0;
    background:
        radial-gradient(circle at 27% 42%, rgba(140, 82, 255, 0.15), transparent 23rem),
        radial-gradient(circle at 78% 70%, rgba(215, 179, 106, 0.07), transparent 20rem),
        linear-gradient(135deg, #08090d, #0b0c13 52%, #08090d);
}

.auth-card {
    width: min(440px, 100%);
    padding: clamp(1.35rem, 4vw, 2rem);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-medium), var(--shadow-glow);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    color: var(--color-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.auth-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(140, 82, 255, 0.2));
}

.auth-card h1 {
    margin-bottom: 0.45rem;
    font-size: 1.85rem;
}

.auth-card > .muted {
    margin-bottom: 1.35rem;
    line-height: 1.5;
}

.auth-switch {
    margin-top: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    font-size: 0.9rem;
}

/* Tables list and dialogs */
.tables-page {
    width: min(1460px, 100%);
    margin: 0 auto;
    gap: 1rem;
}

.tables-actions {
    justify-content: flex-end;
}

.tables-panel {
    width: 100%;
    padding: clamp(1rem, 2vw, 1.4rem);
}

.tables-panel > .panel-header {
    align-items: flex-end;
}

.tables-panel h1 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.table-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.table-item {
    min-height: 218px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1.25rem;
    padding: 1.15rem;
    color: var(--color-text);
    background:
        radial-gradient(circle at 100% 0, rgba(140, 82, 255, 0.08), transparent 14rem),
        linear-gradient(155deg, rgba(26, 30, 40, 0.94), rgba(14, 16, 23, 0.98));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    transition: var(--transition-ui);
}

.table-item:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-medium), 0 0 18px rgba(140, 82, 255, 0.08);
    transform: translateY(-3px);
}

.table-item h2 {
    margin-bottom: 0.6rem;
    color: var(--color-text);
    font-size: 1.08rem;
}

.table-item p {
    min-height: 2.9em;
    margin-bottom: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.48;
}

.table-item .meta {
    display: inline-flex;
    padding: 0.28rem 0.55rem;
    color: #c8b1f2;
    background: rgba(140, 82, 255, 0.08);
    border: 1px solid rgba(140, 82, 255, 0.22);
    border-radius: 999px;
    font-size: 0.76rem;
}

.table-actions {
    width: 100%;
    align-self: end;
}

.table-actions .btn {
    flex: 1 1 auto;
}

.table-editor-backdrop {
    background: rgba(4, 5, 8, 0.82);
    backdrop-filter: blur(6px);
}

.table-editor {
    padding: 1.35rem;
    border-color: var(--color-border-strong);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), var(--shadow-glow);
}

.table-editor .panel-header {
    margin-bottom: 1rem;
}

.table-editor .btn-ghost-light {
    min-width: 34px;
    padding-inline: 0.55rem;
}
