:root {
    --bg: #f3f7fb;
    --bg-accent: #e7eff8;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-soft: #f7fbff;
    --line: rgba(25, 48, 74, 0.1);
    --line-strong: rgba(25, 48, 74, 0.16);
    --text: #152235;
    --muted: #627289;
    --muted-strong: #425269;
    --accent: #1d7df2;
    --accent-strong: #0e66d0;
    --accent-soft: rgba(29, 125, 242, 0.12);
    --mint: #0fbf9f;
    --mint-soft: rgba(15, 191, 159, 0.12);
    --gold: #d89a1d;
    --gold-soft: rgba(216, 154, 29, 0.14);
    --danger: #da4662;
    --danger-soft: rgba(218, 70, 98, 0.12);
    --shadow-lg: 0 28px 70px rgba(20, 37, 63, 0.12);
    --shadow-md: 0 16px 38px rgba(20, 37, 63, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Outfit", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(29, 125, 242, 0.1), transparent 22%),
        radial-gradient(circle at top right, rgba(15, 191, 159, 0.1), transparent 18%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 52%, #eef4fa 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55), transparent 30%);
    opacity: 0.9;
}

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

.glass {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.auth-shell {
    width: min(1140px, 100%);
    padding: 32px;
    display: grid;
    gap: 26px;
    position: relative;
    overflow: hidden;
}

.auth-shell::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 125, 242, 0.18), transparent 70%);
}

.auth-brand,
.auth-copy,
.auth-grid,
.hero-tools,
.section-head,
.hero-topbar,
.notification-panel-head,
.composer-header,
.composer-bar,
.post-head,
.post-meta,
.community-item-foot,
.community-item-head,
.admin-account-head,
.admin-account-actions,
.badge-row,
.owner-header,
.name-row,
.split-fields,
.utility-grid {
    display: flex;
    gap: 14px;
}

.auth-brand,
.hero-tools,
.hero-topbar,
.notification-panel-head,
.composer-header,
.composer-bar,
.post-meta,
.community-item-foot,
.section-head,
.admin-account-head,
.admin-account-actions,
.badge-row,
.name-row,
.split-fields,
.utility-grid {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.auth-copy {
    flex-direction: column;
    gap: 8px;
}

.auth-copy h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.1rem, 3vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.auth-copy p,
.auth-note,
.owner-copy,
.hero-text,
.post-subtitle,
.post-body,
.community-item p,
.account-item p,
.notification-item p,
.message-card p,
.admin-note,
.admin-account-meta,
.upload-preview {
    color: var(--muted);
    line-height: 1.7;
}

.auth-grid {
    align-items: stretch;
}

.auth-card {
    flex: 1 1 0;
    padding: 26px;
}

.page-shell {
    width: min(1480px, calc(100% - 36px));
    margin: 0 auto;
    padding: 26px 0 44px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
}

.sidebar {
    position: sticky;
    top: 22px;
    height: fit-content;
}

.brand-card,
.owner-card,
.menu,
.stat-panel,
.hero,
.utility-card,
.admin-panel,
.composer,
.story-card,
.side-card,
.post-card,
.account-item,
.community-item,
.notification-item,
.message-card,
.admin-card,
.admin-account-item {
    overflow: hidden;
}

.brand-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.brand-mark,
.owner-avatar,
.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.brand-mark {
    background: linear-gradient(135deg, var(--accent), #60a8ff);
    color: #ffffff;
    letter-spacing: 0.08em;
    box-shadow: 0 14px 28px rgba(29, 125, 242, 0.22);
}

.owner-avatar,
.account-avatar {
    background: linear-gradient(135deg, #eff6ff, #d9e9ff);
    color: var(--accent-strong);
    border: 1px solid rgba(29, 125, 242, 0.12);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

h1,
h2,
h3,
h4,
strong {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

.menu,
.owner-card,
.stat-panel {
    margin-bottom: 18px;
}

.menu,
.owner-card,
.stat-panel,
.utility-card,
.admin-panel,
.composer,
.post-card,
.side-card {
    padding: 22px;
}

.menu {
    display: grid;
    gap: 8px;
}

.menu-item {
    text-decoration: none;
    color: var(--muted-strong);
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 500;
    transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.menu-item:hover,
.menu-item.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: translateX(4px);
}

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

.owner-email {
    margin-top: 8px;
}

.owner-copy {
    margin-top: 16px;
}

.badge,
.pill,
.status-pill,
.badge-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.pill,
.status-pill {
    background: rgba(21, 34, 53, 0.05);
    color: var(--muted-strong);
    border-color: rgba(21, 34, 53, 0.06);
}

.owner-badge,
.badge-color-gold {
    background: var(--gold-soft);
    color: #a56a04;
    border-color: rgba(216, 154, 29, 0.18);
}

.verified-badge,
.badge-color-blue {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-color: rgba(29, 125, 242, 0.16);
}

.badge-color-green {
    background: var(--mint-soft);
    color: #0a8a73;
    border-color: rgba(15, 191, 159, 0.16);
}

.badge-color-red {
    background: var(--danger-soft);
    color: #b3364e;
    border-color: rgba(218, 70, 98, 0.18);
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border-top: 1px solid rgba(21, 34, 53, 0.07);
}

.stat-row:first-of-type {
    border-top: 0;
    padding-top: 2px;
}

.stat-row strong {
    font-size: 1.72rem;
}

.stat-row span {
    color: var(--muted);
}

.content {
    display: grid;
    gap: 22px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(290px, 0.82fr);
    gap: 24px;
    padding: 34px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at top right, rgba(29, 125, 242, 0.08), transparent 24%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.hero-copy h2 {
    font-size: clamp(2.2rem, 3.2vw, 4rem);
    line-height: 1.03;
    margin-bottom: 16px;
}

.hero-text {
    max-width: 700px;
    font-size: 1.03rem;
    margin-bottom: 22px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 500;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 7px rgba(15, 191, 159, 0.12);
    animation: pulse 1.8s infinite;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.notification-bell,
.toggle-btn,
.join-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #4e9bff);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(29, 125, 242, 0.18);
}

.secondary-btn,
.ghost-btn,
.notification-bell,
.toggle-btn,
.join-btn {
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted-strong);
    border-color: rgba(21, 34, 53, 0.08);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.notification-bell:hover,
.toggle-btn:hover,
.join-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.join-btn.joined,
.toggle-btn.active {
    background: var(--mint-soft);
    color: #0a8a73;
    border-color: rgba(15, 191, 159, 0.16);
}

.notification-bell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.notification-count {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #4e9bff);
    color: #ffffff;
    font-weight: 700;
}

.hero-visual {
    min-height: 290px;
    position: relative;
    display: grid;
    place-items: center;
}

.hero-globe {
    width: min(100%, 340px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), transparent 18%),
        radial-gradient(circle at 70% 70%, rgba(29, 125, 242, 0.1), transparent 24%),
        linear-gradient(180deg, #fafdff, #e9f2fb);
    border: 1px solid rgba(29, 125, 242, 0.1);
    box-shadow: inset 0 0 40px rgba(29, 125, 242, 0.08), 0 20px 40px rgba(20, 37, 63, 0.09);
    position: relative;
    animation: float 7s ease-in-out infinite;
}

.hero-globe::before,
.hero-globe::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px solid rgba(29, 125, 242, 0.12);
}

.hero-globe::after {
    inset: 25% 8%;
}

.orbit-card {
    position: absolute;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(21, 34, 53, 0.08);
    box-shadow: var(--shadow-md);
}

.orbit-card span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 6px;
}

.orbit-card strong {
    font-size: 1.2rem;
}

.orbit-card:first-of-type {
    top: 20px;
    left: 10px;
}

.orbit-card.accent {
    right: 0;
    bottom: 18px;
}

.utility-grid,
.admin-grid {
    align-items: stretch;
}

.chat-panel {
    padding: 24px;
}

.chat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 12px;
}

.chat-toolbar label {
    color: var(--muted-strong);
    font-weight: 600;
}

.chat-toolbar select {
    max-width: 320px;
}

.chat-messages {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(21, 34, 53, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.62);
}

.chat-message {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(21, 34, 53, 0.08);
}

.chat-message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.chat-message-head span {
    color: var(--muted);
    font-size: 0.82rem;
}

.chat-message p {
    color: var(--muted-strong);
    line-height: 1.5;
}

.chat-form {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-form input {
    flex: 1 1 auto;
}

.utility-card {
    flex: 1 1 0;
}

.admin-panel {
    padding: 24px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: 20px;
    margin-top: 18px;
}

.admin-card,
.admin-account-item {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(21, 34, 53, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.admin-card {
    padding: 18px;
}

.badge-admin-list,
.admin-account-list,
.account-list,
.community-list,
.feed-list,
.notification-list,
.message-list,
.composer-form {
    display: grid;
    gap: 14px;
}

.stack-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(21, 34, 53, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

input::placeholder,
textarea::placeholder {
    color: #8191a5;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.composer-form {
    margin-top: 20px;
}

.split-fields > * {
    flex: 1 1 0;
}

.file-picker,
.upload-preview {
    border-radius: 16px;
    border: 1px solid rgba(21, 34, 53, 0.1);
    background: rgba(255, 255, 255, 0.86);
}

.file-picker {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.file-picker input {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.upload-preview {
    min-height: 56px;
    display: grid;
    align-items: center;
    padding: 14px 16px;
}

.stories-row,
.main-grid {
    display: grid;
    gap: 20px;
}

.stories-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card {
    position: relative;
    min-height: 190px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.92)),
        radial-gradient(circle at top right, rgba(29, 125, 242, 0.08), transparent 26%),
        var(--surface-strong);
}

.story-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.main-grid {
    grid-template-columns: minmax(0, 1.2fr) 350px;
    align-items: start;
}

.feed-column,
.side-column {
    display: grid;
    gap: 20px;
}

.section-head-feed {
    padding: 0 2px;
}

.post-card,
.account-item,
.community-item,
.notification-item,
.message-card,
.admin-account-item {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(21, 34, 53, 0.08);
    box-shadow: var(--shadow-md);
}

.post-head {
    align-items: flex-start;
    margin-bottom: 10px;
}

.post-timestamp {
    color: var(--muted);
    font-size: 0.9rem;
}

.post-subtitle {
    margin-top: 6px;
    margin-bottom: 12px;
}

.post-body {
    margin-bottom: 16px;
}

.post-upload {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid rgba(21, 34, 53, 0.08);
}

.post-upload img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    margin-bottom: 10px;
}

.post-upload video {
    width: 100%;
    max-height: 360px;
    border-radius: 14px;
    display: block;
    margin-bottom: 10px;
    background: #000000;
}

.post-meta .pill {
    background: rgba(21, 34, 53, 0.05);
}

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

.account-item-head,
.community-item-head {
    margin-bottom: 10px;
}

.community-item-foot {
    margin-top: 12px;
}

.trend-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.trend-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(21, 34, 53, 0.07);
}

.trend-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.trend-list strong {
    color: var(--accent-strong);
}

.notification-item.unread {
    background: rgba(29, 125, 242, 0.08);
    border-color: rgba(29, 125, 242, 0.14);
}

.notification-item span,
.message-card span {
    color: var(--accent-strong);
    font-size: 0.84rem;
}

.admin-note {
    margin: 0 0 16px;
}

.admin-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(21, 34, 53, 0.1);
}

.badge-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-account-item {
    padding: 16px;
}

.admin-select {
    min-width: 180px;
}

.empty-state {
    padding: 18px;
    text-align: center;
    border-radius: 16px;
    border: 1px dashed rgba(21, 34, 53, 0.14);
    color: var(--muted);
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 24px));
    display: grid;
    gap: 12px;
    z-index: 30;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(17, 30, 47, 0.96);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 44px rgba(9, 19, 34, 0.28);
    animation: toastIn 220ms ease;
}

.toast strong,
.toast span {
    display: block;
}

.toast span {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: 0.84; }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .utility-grid,
    .main-grid,
    .admin-grid {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 20px, 1480px);
        padding-top: 18px;
    }

    .auth-grid,
    .stories-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .hero-visual {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .orbit-card {
        position: static;
        width: 100%;
        margin-top: 12px;
    }

    .split-fields,
    .hero-tools,
    .chat-form,
    .composer-header,
    .composer-bar,
    .hero-topbar,
    .section-head,
    .community-item-foot,
    .post-meta,
    .admin-account-head,
    .admin-account-actions,
    .badge-row {
        flex-direction: column;
        align-items: stretch;
    }

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

    .chat-toolbar select {
        max-width: 100%;
    }

    .toast-stack {
        right: 12px;
        bottom: 12px;
    }
}
