:root {
    --bg: #f6f8fc;
    --panel: #ffffff;
    --panel-alt: #f4f6ff;
    --text: #111827;
    --muted: #64748b;
    --primary: #5b4dff;
    --primary-dark: #4738e8;
    --success: #16a34a;
    --border: #e5e7eb;
    --shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.05);
    --sidebar: #0f1b3d;
    --sidebar-muted: rgba(255, 255, 255, 0.68);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(18px);
}

body::before {
    top: -120px;
    right: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.2), rgba(91, 77, 255, 0));
}

body::after {
    bottom: -180px;
    left: -120px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0));
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.app-sidebar {
    width: 304px;
    background:
        radial-gradient(circle at top left, rgba(91, 77, 255, 0.18), transparent 28%),
        linear-gradient(180deg, #132252 0%, var(--sidebar) 100%);
    color: #fff;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 0;
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.app-sidebar::before,
.app-sidebar::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.app-sidebar::before {
    top: -60px;
    right: -30px;
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.3), rgba(91, 77, 255, 0));
}

.app-sidebar::after {
    bottom: 90px;
    left: -65px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 2px 4px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: block;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(91, 77, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 30px rgba(4, 10, 30, 0.24);
    overflow: hidden;
    position: relative;
}

.brand-mark-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.brand-title {
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.brand-subtitle,
.sidebar-user-label {
    color: var(--sidebar-muted);
    font-size: 0.9rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.88);
    border-radius: 16px;
    padding: 13px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(180deg, rgba(185, 179, 255, 0.95), rgba(91, 77, 255, 0.2));
    opacity: 0.85;
    transition: width 180ms ease;
}

.sidebar-nav .nav-link.active::after,
.sidebar-nav .nav-link:hover::after {
    width: 3px;
}

.nav-link-icon {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04);
    flex: 0 0 auto;
}

.sidebar-nav .nav-link.active .nav-link-icon,
.sidebar-nav .nav-link:hover .nav-link-icon {
    background: #b9b3ff;
    box-shadow: 0 0 0 6px rgba(91, 77, 255, 0.22);
}

.sidebar-user {
    margin-top: auto;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.sidebar-user-name {
    font-weight: 700;
    margin-top: 4px;
}

.app-main {
    flex: 1;
    padding: 36px 40px 56px;
    max-width: 1520px;
    width: 100%;
    position: relative;
}

.app-main-full {
    max-width: 620px;
    margin: 0 auto;
    padding-top: 56px;
}

.page-header {
    margin-bottom: 30px;
    padding: 6px 4px 0;
    overflow: visible;
}

.page-hero {
    position: relative;
    overflow: visible;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 30px;
    border-radius: 28px;
    border: 1px solid rgba(91, 77, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 255, 0.92)),
        linear-gradient(180deg, rgba(91, 77, 255, 0.08), rgba(91, 77, 255, 0));
    box-shadow: var(--shadow-soft);
}

.page-hero-decor {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.page-hero-copy,
.page-hero-meta {
    position: relative;
    z-index: 1;
}

.page-hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.page-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(91, 77, 255, 0.09);
    color: var(--primary-dark);
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid rgba(91, 77, 255, 0.08);
}

.page-hero-chip-soft {
    background: rgba(17, 24, 39, 0.04);
    color: var(--muted);
}

.page-hero-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7c6cff, #5b4dff);
    box-shadow: 0 0 0 6px rgba(91, 77, 255, 0.12);
}

.page-hero-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.page-hero-orb-primary {
    top: -24px;
    right: 120px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.18), rgba(91, 77, 255, 0));
}

.page-hero-orb-secondary {
    bottom: -42px;
    right: -8px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0));
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header h1 {
    font-size: clamp(2.05rem, 3vw, 2.9rem);
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.page-intro {
    max-width: 820px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.card-soft,
.stat-card,
.empty-state,
.table-shell,
.login-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.card-soft {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.card-soft::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(91, 77, 255, 0.28), rgba(56, 189, 248, 0.18), rgba(255, 255, 255, 0));
}

.card-soft:hover,
.stat-card:hover,
.table-shell:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.card-soft,
.form-control,
.form-select,
.btn,
.brand-mark {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.stat-card {
    padding: 24px;
    height: 100%;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(91, 77, 255, 0.12), rgba(91, 77, 255, 0.04));
    border: 1px solid rgba(91, 77, 255, 0.08);
    position: relative;
}

.stat-card-icon::before,
.stat-card-icon::after {
    content: "";
    position: absolute;
    border-radius: 999px;
}

.stat-card-icon::before {
    width: 16px;
    height: 16px;
    top: 12px;
    left: 12px;
    background: linear-gradient(180deg, rgba(91, 77, 255, 0.95), rgba(91, 77, 255, 0.55));
}

.stat-card-icon::after {
    width: 6px;
    height: 6px;
    top: 9px;
    right: 9px;
    background: rgba(56, 189, 248, 0.9);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.stat-card-websites .stat-card-icon {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.04));
}

.stat-card-scheduled .stat-card-icon {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
}

.stat-card-published .stat-card-icon {
    background: linear-gradient(145deg, rgba(22, 163, 74, 0.12), rgba(22, 163, 74, 0.04));
}

.stat-card-attention .stat-card-icon {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
}

.stat-label {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.table-shell {
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.table-shell .table {
    margin-bottom: 0;
}

.table-shell th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    border-bottom-color: var(--border);
    background: #fafbff;
    font-weight: 700;
    padding: 16px 18px;
}

.table-shell td {
    vertical-align: middle;
    border-color: var(--border);
    padding: 18px;
}

.table tbody tr {
    transition: background 160ms ease;
}

.table tbody tr:hover {
    background: rgba(91, 77, 255, 0.03);
}

.empty-state {
    padding: 40px 36px;
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 18px;
}

.form-label {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.65rem;
}

.form-text {
    color: var(--muted);
}

.form-control,
.form-select,
.btn,
.input-group-text {
    border-radius: 16px;
}

.form-control,
.form-select {
    min-height: 54px;
    padding: 0.85rem 1rem;
    border-color: var(--border);
    background: #fff;
    color: var(--text);
    box-shadow: none;
}

.password-field-shell {
    position: relative;
}

.password-field-input {
    padding-right: 3.6rem;
}

.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 0.7rem;
    transform: translateY(-50%);
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 77, 255, 0.08);
    color: var(--primary);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.password-toggle-button:hover,
.password-toggle-button.is-visible {
    background: rgba(91, 77, 255, 0.14);
    color: var(--primary-dark);
}

.password-toggle-button:focus {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(91, 77, 255, 0.12);
}

.password-toggle-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
}

.password-toggle-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-control::placeholder,
.form-select {
    color: var(--muted);
}

.form-control:focus,
.form-select:focus,
.toggle-group button:focus,
.editor-toolbar .btn:focus,
.sidebar-nav .nav-link:focus {
    border-color: rgba(91, 77, 255, 0.38);
    box-shadow: 0 0 0 4px rgba(91, 77, 255, 0.12);
    outline: 0;
}

textarea.form-control {
    min-height: 132px;
    line-height: 1.55;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6b5eff 100%);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgba(91, 77, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #5b4dff 100%);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(91, 77, 255, 0.24);
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -45%;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
    transform: skewX(-18deg);
    transition: left 240ms ease;
}

.btn-primary:hover::after {
    left: 115%;
}

.btn-soft {
    background: var(--panel-alt);
    color: var(--primary-dark);
    border: 1px solid transparent;
}

.btn-soft:hover {
    background: #edefff;
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: rgba(91, 77, 255, 0.24);
    color: var(--primary-dark);
    background: #fff;
}

.btn-outline-primary:hover {
    background: rgba(91, 77, 255, 0.06);
    border-color: rgba(91, 77, 255, 0.34);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-danger:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.58rem 0.85rem;
    border-radius: 14px;
}

.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.92;
}

.btn.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: rgba(255, 255, 255, 1);
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    animation: genie-spin 0.9s linear infinite;
}

body[data-page="generate"] {
    background:
        radial-gradient(circle at top right, rgba(109, 93, 252, 0.18), transparent 26%),
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 30%),
        linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
}

body[data-page="generate"] .brand-mark {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(109, 93, 252, 0.22);
    animation: genie-float 4.5s ease-in-out infinite;
}

body[data-page="generate"] .brand-mark::after {
    content: "";
    position: absolute;
    inset: -35%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 52%);
    animation: genie-glow 3.2s ease-in-out infinite;
}

.genie-shell {
    position: relative;
    overflow: hidden;
    border-color: rgba(79, 70, 229, 0.12);
}

.genie-shell::before {
    content: "";
    position: absolute;
    inset: auto -10% 86% auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(109, 93, 252, 0.18), transparent 66%);
    pointer-events: none;
}

.genie-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(109, 93, 252, 0.03) 65%, rgba(255, 255, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.genie-hero::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 14px;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.16), rgba(91, 77, 255, 0));
    pointer-events: none;
}

.genie-copy {
    max-width: 760px;
}

.genie-copy p {
    color: var(--muted);
}

.genie-action-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.btn-magic,
.btn-genie,
.btn-genie-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.2);
}

.btn-magic-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0.18rem;
    border-radius: 999px;
    color: #ffffff;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45), transparent 42%),
        linear-gradient(135deg, #ff8a5b 0%, #ff5fa2 38%, #7c5cff 72%, #2dd4bf 100%);
    box-shadow: 0 6px 16px rgba(91, 77, 255, 0.24);
}

.btn-magic-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-soft .btn-magic-icon {
    box-shadow: 0 8px 18px rgba(91, 77, 255, 0.18);
}

.genie-status {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
}

.genie-status[data-tone="loading"] {
    background: rgba(79, 70, 229, 0.1);
    animation: genie-pulse 1.6s ease-in-out infinite;
}

.genie-status[data-tone="success"] {
    background: rgba(15, 159, 110, 0.12);
    color: #0c7f58;
}

.genie-status[data-tone="danger"] {
    background: rgba(220, 53, 69, 0.12);
    color: #a3303d;
}

.genie-status[data-tone="warning"] {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5b00;
}

.genie-results {
    margin-top: 8px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.95), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.genie-angle-stage {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(250, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.genie-topic-stage {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: linear-gradient(180deg, rgba(250, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.genie-topic-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genie-topic-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.genie-topic-mode-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: #fff;
    color: var(--text);
    box-shadow: 0 12px 24px rgba(20, 32, 51, 0.05);
}

.genie-topic-mode-card.active {
    border-color: rgba(91, 77, 255, 0.3);
    box-shadow: 0 18px 34px rgba(91, 77, 255, 0.14);
}

.genie-topic-mode-card span {
    color: var(--muted);
}

.genie-topic-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.genie-topic-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: #fff;
    color: var(--text);
    box-shadow: 0 12px 24px rgba(20, 32, 51, 0.05);
}

.genie-topic-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.genie-topic-card p {
    margin: 0;
    color: var(--muted);
}

.genie-topic-card.active,
.genie-topic-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 77, 255, 0.32);
    box-shadow: 0 18px 34px rgba(91, 77, 255, 0.14);
}

.genie-topic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.genie-angle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.genie-angle-card {
    display: grid;
    gap: 8px;
    text-align: left;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: #fff;
    color: var(--text);
    box-shadow: 0 12px 24px rgba(20, 32, 51, 0.05);
}

.genie-angle-card:hover,
.genie-angle-card.active {
    transform: translateY(-2px);
    border-color: rgba(91, 77, 255, 0.32);
    box-shadow: 0 18px 34px rgba(91, 77, 255, 0.14);
}

.genie-angle-step {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
}

.genie-angle-card span,
.genie-angle-card small {
    color: var(--muted);
}

.genie-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.genie-why {
    margin-top: 12px;
    color: var(--muted);
}

.genie-suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.genie-idea-card {
    display: grid;
    gap: 8px;
    text-align: left;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: #fff;
    color: var(--text);
    box-shadow: 0 12px 24px rgba(20, 32, 51, 0.05);
}

.genie-idea-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.12);
}

.genie-idea-kicker,
.genie-source-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
}

.genie-idea-card span,
.genie-idea-card small {
    color: var(--muted);
}

.genie-sources {
    margin-top: 18px;
}

.genie-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.genie-source-links a {
    display: inline-flex;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.genie-field-flash {
    border-color: rgba(79, 70, 229, 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
    animation: genie-field-flash 0.9s ease;
}

.is-researching .genie-shell,
.is-generating .genie-shell {
    transform: translateY(-1px);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.88fr);
    gap: 28px;
}

.activity-list {
    display: grid;
    gap: 14px;
}

.activity-item {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fbfcff;
}

.activity-title {
    font-weight: 700;
}

.activity-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.editor-shell {
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background: #f8faff;
}

.editor-toolbar .btn {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: none;
}

.editor-toolbar .btn:hover {
    background: #f8faff;
    border-color: rgba(91, 77, 255, 0.28);
    color: var(--primary-dark);
}

.editor-surface {
    min-height: 360px;
    padding: 22px;
    outline: none;
    line-height: 1.7;
}

.editor-surface:empty::before {
    content: attr(data-placeholder);
    color: #95a1b4;
}

.toggle-group {
    display: inline-flex;
    background: #eef2ff;
    border-radius: 999px;
    padding: 4px;
    border: 1px solid rgba(91, 77, 255, 0.1);
}

.toggle-group button {
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    color: var(--muted);
}

.toggle-group button.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.login-card {
    padding: 36px;
}

.page-footer {
    color: var(--muted);
    padding-top: 34px;
    display: inline-flex;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(91, 77, 255, 0.06);
    box-shadow: var(--shadow-soft);
}

.app-alert {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
    font-weight: 500;
}

.alert-success.app-alert {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.16);
    color: #166534;
}

.alert-danger.app-alert {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.alert-warning.app-alert {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.alert-info.app-alert {
    background: rgba(91, 77, 255, 0.06);
    border-color: rgba(91, 77, 255, 0.12);
    color: var(--primary-dark);
}

.badge {
    padding: 0.52rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.text-bg-secondary {
    background: #eef2f7 !important;
    color: #475569 !important;
}

.text-bg-info {
    background: rgba(91, 77, 255, 0.1) !important;
    color: var(--primary-dark) !important;
}

.text-bg-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #92400e !important;
}

.text-bg-success {
    background: rgba(22, 163, 74, 0.12) !important;
    color: #166534 !important;
}

.text-bg-danger {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #991b1b !important;
}

.content-panel {
    box-shadow: var(--shadow);
}

.quick-actions-panel,
.action-panel {
    box-shadow: var(--shadow-soft);
}

.section-banner {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)),
        linear-gradient(120deg, rgba(91, 77, 255, 0.08), rgba(56, 189, 248, 0.05));
}

.section-banner::after,
.magic-panel::after,
.info-panel::after,
.social-panel::after,
.form-surface::after {
    content: "";
    position: absolute;
    inset: auto -18px -24px auto;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(91, 77, 255, 0.08), rgba(91, 77, 255, 0));
    pointer-events: none;
}

.sticky-panel {
    position: sticky;
    top: 30px;
}

.action-button-stack .btn {
    justify-content: center;
    font-weight: 600;
}

.btn-publish-now {
    margin-top: 4px;
    box-shadow: 0 18px 34px rgba(91, 77, 255, 0.22);
}

.post-edit-sidebar .card-soft + .card-soft {
    margin-top: 1.25rem;
}

.table a {
    color: var(--primary-dark);
}

.table a:hover {
    color: var(--primary);
}

.featured-image-panel {
    padding: 22px;
    margin: -6px -6px 28px;
    border-radius: 24px;
    border: 1px solid rgba(91, 77, 255, 0.08);
    background: linear-gradient(180deg, rgba(249, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.featured-image-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
    gap: 20px;
}

.featured-image-search-bar {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(91, 77, 255, 0.12);
    background: linear-gradient(180deg, rgba(243, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.featured-image-search-copy {
    display: grid;
    gap: 4px;
}

.featured-image-search-copy strong {
    color: var(--text);
}

.featured-image-search-copy span {
    color: var(--muted);
    font-size: 0.95rem;
}

.featured-image-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.featured-image-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.featured-image-search-shell {
    display: grid;
    gap: 14px;
}

.featured-image-status {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(91, 77, 255, 0.14);
    background: rgba(245, 244, 255, 0.95);
    color: var(--text);
    font-weight: 600;
}

.featured-image-status[data-tone="danger"] {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(254, 242, 242, 0.98);
    color: #991b1b;
}

.featured-image-status[data-tone="success"] {
    border-color: rgba(22, 163, 74, 0.16);
    background: rgba(240, 253, 244, 0.98);
    color: #166534;
}

.featured-image-status[data-tone="warning"] {
    border-color: rgba(245, 158, 11, 0.18);
    background: rgba(255, 251, 235, 0.98);
    color: #92400e;
}

.featured-image-search-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.featured-image-search-card.is-current {
    border-color: rgba(91, 77, 255, 0.3);
    box-shadow: 0 18px 38px rgba(91, 77, 255, 0.14);
}

.featured-image-search-thumb {
    width: 100%;
    aspect-ratio: 1.45 / 1;
    object-fit: cover;
    display: block;
}

.featured-image-search-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.featured-image-search-credit {
    font-weight: 700;
    color: var(--text);
}

.featured-image-search-query {
    font-size: 0.86rem;
    color: var(--muted);
    min-height: 2.6em;
}

.featured-image-search-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.featured-image-page-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted);
}

.featured-image-preview-shell {
    min-height: 240px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8faff;
    box-shadow: var(--shadow-soft);
}

.featured-image-preview {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    display: block;
}

.featured-image-empty {
    min-height: 240px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    padding: 26px;
    color: var(--muted);
}

.featured-image-empty strong {
    color: var(--text);
}

.featured-image-meta {
    display: grid;
    gap: 14px;
}

.featured-image-details {
    display: grid;
    gap: 12px;
}

.featured-image-details > div {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.featured-image-label {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
}

@keyframes genie-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes genie-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes genie-glow {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}

@keyframes genie-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.08);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
}

@keyframes genie-field-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
    }
}

.day-check-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.day-check-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    border: 1px solid rgba(125, 139, 164, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.day-check-card:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 77, 255, 0.24);
    box-shadow: 0 12px 24px rgba(20, 32, 51, 0.05);
}

.day-check-card input {
    margin: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.day-check-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 1.2;
}

.auto-post-mini-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(248, 250, 255, 0.88);
    border: 1px solid rgba(125, 139, 164, 0.2);
    box-shadow: none;
}

.auto-post-code {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: normal;
    word-break: break-all;
}

.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-card {
    position: relative;
}

.prompt-template-list {
    display: grid;
    gap: 14px;
}

.prompt-template-card {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(125, 139, 164, 0.2);
    background: rgba(248, 250, 255, 0.9);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.prompt-template-card:hover,
.prompt-template-card.active {
    transform: translateY(-1px);
    border-color: rgba(91, 77, 255, 0.25);
    box-shadow: 0 16px 34px rgba(91, 77, 255, 0.12);
}

.prompt-template-card-top,
.prompt-template-card-meta,
.prompt-template-variable-item,
.prompt-template-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.prompt-template-card-top {
    justify-content: space-between;
}

.prompt-template-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
}

.prompt-template-editor {
    min-height: 440px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
    line-height: 1.6;
}

.prompt-template-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-weight: 600;
}

.prompt-template-action-stack,
.prompt-template-variable-list {
    display: grid;
    gap: 12px;
}

.prompt-template-variable-item {
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(125, 139, 164, 0.16);
    background: rgba(248, 250, 255, 0.82);
}

.prompt-template-variable-item code {
    font-size: 0.82rem;
}

.prompt-templates-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.prompt-templates-library-strip {
    padding-bottom: 20px;
}

.prompt-template-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.prompt-template-pill {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    max-width: 280px;
    flex: 1 1 200px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 139, 164, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.94));
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.prompt-template-pill:hover {
    border-color: rgba(91, 77, 255, 0.28);
    box-shadow: 0 12px 28px rgba(91, 77, 255, 0.1);
    transform: translateY(-1px);
}

.prompt-template-pill.active {
    border-color: rgba(91, 77, 255, 0.45);
    box-shadow:
        0 0 0 1px rgba(91, 77, 255, 0.12),
        0 16px 36px rgba(91, 77, 255, 0.14);
}

.prompt-template-pill-title {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--primary);
}

.prompt-template-pill-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.prompt-templates-workspace {
    padding: 28px 28px 32px;
}

.prompt-templates-workspace-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(125, 139, 164, 0.14);
}

.prompt-template-summary-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.92rem;
    color: var(--muted);
}

.prompt-template-summary-inline strong {
    color: var(--text);
    margin-right: 6px;
}

.prompt-templates-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-top: 8px;
}

@media (min-width: 1100px) {
    .prompt-templates-workspace-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        align-items: start;
    }
}

.prompt-templates-editor-column {
    min-width: 0;
}

.prompt-template-editor-shell {
    margin-top: 4px;
}

.prompt-template-editor-shell .form-label code {
    font-size: 0.78em;
    color: var(--primary-dark);
}

.prompt-templates-workspace .prompt-template-editor {
    min-height: clamp(320px, 52vh, 620px);
    width: 100%;
    resize: vertical;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(125, 139, 164, 0.2);
    background: #fbfcff;
}

.prompt-templates-save-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.prompt-templates-reference {
    min-width: 0;
}

.prompt-templates-reference-inner {
    position: sticky;
    top: 96px;
    padding: 18px 16px;
    border-radius: 20px;
    border: 1px solid rgba(125, 139, 164, 0.16);
    background: rgba(248, 250, 255, 0.9);
    max-height: min(72vh, 640px);
    overflow: auto;
}

.prompt-template-variable-list-compact {
    gap: 8px;
}

button.prompt-template-insert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid rgba(125, 139, 164, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

button.prompt-template-insert:hover {
    border-color: rgba(91, 77, 255, 0.3);
    background: rgba(255, 255, 255, 1);
}

.prompt-templates-ref-heading {
    letter-spacing: 0.06em;
    color: var(--muted);
}

button.prompt-template-insert:active {
    transform: scale(0.99);
}

@media (max-width: 1099px) {
    .prompt-templates-reference-inner {
        position: static;
        max-height: none;
    }
}

.account-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-weight: 600;
}

.team-actions {
    display: grid;
    gap: 10px;
}

.team-role-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.team-role-form .form-select {
    min-width: 140px;
}

@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        min-height: auto;
        position: sticky;
        top: 0;
        z-index: 40;
        padding: 18px 16px 16px;
        gap: 16px;
        border-radius: 0 0 28px 28px;
        box-shadow:
            inset 0 -1px 0 rgba(255, 255, 255, 0.05),
            0 18px 34px rgba(4, 10, 30, 0.18);
        backdrop-filter: blur(12px);
    }

    .sidebar-brand {
        padding: 2px 0 0;
    }

    .sidebar-nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        margin: 0 -2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-nav .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 12px 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .sidebar-nav .nav-link::after {
        display: none;
    }

    .sidebar-user {
        margin-top: auto;
        padding: 16px 18px;
        border-radius: 20px;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }

    .genie-hero {
        flex-direction: column;
    }

    .app-main {
        padding: 24px 18px 36px;
    }

    .sticky-panel {
        position: static;
    }

    .page-hero {
        padding: 24px 22px;
        flex-direction: column;
    }

    .page-hero-meta {
        justify-content: flex-start;
    }

    .featured-image-grid {
        grid-template-columns: 1fr;
    }

    .featured-image-search-controls {
        grid-template-columns: 1fr;
    }

    .genie-topic-mode-grid {
        grid-template-columns: 1fr;
    }

    .day-check-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-role-form {
        align-items: stretch;
    }
}

@media (max-width: 767px) {
    .app-sidebar {
        padding: 14px 12px 14px;
        gap: 14px;
        border-radius: 0 0 24px 24px;
    }

    .sidebar-brand {
        gap: 12px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 16px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle,
    .sidebar-user-label {
        font-size: 0.84rem;
    }

    .sidebar-nav .nav-link {
        padding: 10px 12px;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .nav-link-icon {
        width: 9px;
        height: 9px;
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.04);
    }

    .sidebar-user {
        padding: 14px 16px;
        border-radius: 18px;
    }

    .sidebar-user .btn {
        min-height: 38px;
        padding: 0 14px;
    }

    .app-main {
        padding: 18px 14px 28px;
    }

    .page-header {
        margin-bottom: 20px;
        padding: 0;
    }

    .page-header h1 {
        font-size: 1.85rem;
    }

    .card-soft,
    .stat-card,
    .empty-state,
    .login-card {
        border-radius: 22px;
    }

    .card-soft,
    .login-card {
        padding: 22px;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .day-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero {
        padding: 20px 18px;
        border-radius: 24px;
    }

    .page-hero-chip {
        min-height: 40px;
        padding: 0 14px;
        font-size: 0.86rem;
    }

    .section-banner,
    .table-shell {
        border-radius: 22px;
    }

    .table-shell th,
    .table-shell td {
        padding: 14px 12px;
    }
}

@media (max-width: 520px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-hero-meta {
        width: 100%;
    }

    .page-hero-chip {
        width: 100%;
        justify-content: center;
    }
}

/* --- Genie in-app notifications (whispers) --- */
.genie-notify-dropdown {
    position: relative;
    z-index: 5;
}

.genie-notify-trigger {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    padding: 0;
    border: 1px solid rgba(91, 77, 255, 0.2);
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    line-height: 1;
}

.genie-notify-trigger:hover {
    background: #fff;
    border-color: rgba(91, 77, 255, 0.35);
    color: var(--primary-dark);
}

.genie-notify-trigger-icon {
    font-size: 1.15rem;
    opacity: 0.9;
}

.genie-notify-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2rem 0.35rem;
}

.genie-notify-menu {
    width: min(380px, calc(100vw - 32px));
    padding: 0;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    z-index: 1080;
}

.genie-notify-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 12px;
    background: linear-gradient(180deg, rgba(91, 77, 255, 0.07), transparent);
    border-bottom: 1px solid var(--border);
}

.genie-notify-menu-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.genie-notify-menu-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 2px;
}

.genie-notify-clear {
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}

.genie-notify-list {
    max-height: min(340px, 50vh);
    overflow-y: auto;
}

.genie-notify-item {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease;
}

.genie-notify-item:hover {
    background: rgba(91, 77, 255, 0.06);
    color: inherit;
}

.genie-notify-item-unread {
    background: rgba(91, 77, 255, 0.04);
}

.genie-notify-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: rgba(91, 77, 255, 0.1);
}

.genie-notify-item-icon.genie-notify-icon-warning {
    background: rgba(245, 158, 11, 0.2);
}

.genie-inbox-icon.genie-notify-icon-warning {
    background: rgba(245, 158, 11, 0.2);
}

.genie-notify-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.genie-notify-item-title {
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.3;
}

.genie-notify-item-preview {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.35;
}

.genie-notify-item-time {
    font-size: 0.7rem;
    color: var(--muted);
}

.genie-notify-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.genie-notify-empty-icon {
    font-size: 1.75rem;
    margin-bottom: 8px;
    opacity: 0.45;
}

.genie-notify-menu-foot {
    padding: 12px 18px 16px;
    background: var(--panel-alt);
    border-top: 1px solid var(--border);
}

.genie-notify-empty-page {
    padding: 48px 24px;
    text-align: center;
    border-radius: 18px;
    background: var(--panel-alt);
}

.genie-inbox-list li + li {
    margin-top: 14px;
}

.genie-inbox-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
}

.genie-inbox-row-unread {
    border-color: rgba(91, 77, 255, 0.28);
    background: linear-gradient(135deg, rgba(91, 77, 255, 0.05), var(--panel));
}

.genie-inbox-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(91, 77, 255, 0.12);
    flex-shrink: 0;
}

.genie-inbox-main {
    flex: 1 1 220px;
    min-width: 0;
}

.genie-inbox-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.genie-inbox-body {
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.genie-inbox-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 10px;
}

.genie-inbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

@media (max-width: 767px) {
    .genie-inbox-actions {
        width: 100%;
        margin-left: 0;
    }
}

/* --- Content calendar --- */
.calendar-toolbar {
    padding: 1.25rem 1.5rem;
}

.calendar-legend {
    font-size: 0.875rem;
    color: var(--muted);
}

.calendar-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.calendar-legend-scheduled {
    background: #f59e0b;
}

.calendar-legend-published {
    background: var(--success);
}

.calendar-legend-failed {
    background: #dc2626;
}

.calendar-layout {
    align-items: start;
}

.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    background: var(--border);
}

.calendar-weekday {
    background: var(--panel-alt);
    padding: 10px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: center;
}

.calendar-day {
    min-height: 110px;
    background: var(--panel);
    padding: 8px;
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-day-pad {
    background: #f8fafc;
    min-height: 24px;
}

.calendar-day-today {
    box-shadow: inset 0 0 0 2px var(--primary);
    background: linear-gradient(180deg, rgba(91, 77, 255, 0.06), var(--panel));
}

.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.calendar-day-num {
    font-weight: 600;
    font-size: 0.95rem;
}

.calendar-day-count {
    font-size: 0.65rem;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.calendar-post-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    line-height: 1.25;
    color: var(--text);
    border: 1px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.calendar-post-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.calendar-post-chip-time {
    font-weight: 600;
    font-size: 0.65rem;
    opacity: 0.85;
}

.calendar-post-chip-title {
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendar-post-chip-client {
    font-size: 0.68rem;
    color: var(--muted);
}

.calendar-post-chip--scheduled {
    background: #fffbeb;
    border-color: #fde68a;
}

.calendar-post-chip--published {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.calendar-post-chip--attention {
    background: #fef2f2;
    border-color: #fecaca;
}

.calendar-post-chip--muted {
    background: var(--panel-alt);
    border-color: var(--border);
}

.calendar-side-list li + li {
    margin-top: 12px;
}

.calendar-side-link {
    display: block;
    color: inherit;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.calendar-side-link:hover {
    border-color: rgba(91, 77, 255, 0.35);
    background: #fff;
    color: inherit;
}

.calendar-side-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-side-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

@media (max-width: 991px) {
    .calendar-grid {
        min-width: 720px;
    }

    .calendar-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-day {
        min-height: 100px;
    }
}
