@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════
   MAI Studio — Midnight Control Surface
   ═══════════════════════════════════════════════════════ */

:root {
    --primary: #ff9b54;
    --primary-strong: #ffd39b;
    --primary-soft: rgba(255, 155, 84, 0.12);
    --primary-glow: rgba(255, 155, 84, 0.28);
    --accent: #90f2db;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --success: #10b981;

    --text-main: #e7ecf5;
    --text-muted: #8e99ac;
    --text-inv: #140d09;
    --text-bright: #fbfdff;

    --bg-body: #070b12;
    --bg-body-alt: #0d1420;
    --bg-panel: rgba(8, 12, 20, 0.82);
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-muted: rgba(255, 155, 84, 0.08);
    --bg-input: rgba(255, 255, 255, 0.026);
    --bg-input-focus: rgba(18, 27, 40, 0.95);

    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 214, 174, 0.24);
    --glass-blur: blur(16px);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.44);
    --shadow-glow: 0 0 20px var(--primary-glow);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 14px;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 12% 0%, rgba(255, 155, 84, 0.14) 0%, transparent 46%),
        radial-gradient(ellipse at 88% 10%, rgba(144, 242, 219, 0.1) 0%, transparent 42%),
        radial-gradient(ellipse at 50% 100%, rgba(65, 148, 255, 0.08) 0%, transparent 50%);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: transparent;
}

.hidden {
    display: none !important;
}

.helper {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.meta-line {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Layout Shell ─── */
.page-shell {
    display: flex;
    min-height: 100vh;
}

.app-shell {
    display: flex;
    width: 100%;
}

/* ─── Sidebar ─── */
.sidebar {
    width: 250px;
    background:
        linear-gradient(180deg, rgba(7, 11, 18, 0.94), rgba(8, 12, 20, 0.88)),
        radial-gradient(circle at 0% 0%, rgba(255, 155, 84, 0.12), transparent 26%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

.brand-dot {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff965c, #ffbf7e, #8ff3dc);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(255, 155, 84, 0.28);
}

.nav-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(255, 155, 84, 0.18), rgba(255, 196, 132, 0.08));
    color: var(--primary-strong);
    border: 1px solid rgba(255, 155, 84, 0.18);
    box-shadow: 0 0 24px rgba(255, 155, 84, 0.12), inset 0 0 18px rgba(255, 155, 84, 0.04);
}

.nav-icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1.05rem;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.user-chip strong {
    color: var(--text-bright);
}

/* ─── Content Panel ─── */
.content-panel {
    width: 100%;
    max-width: 1500px;
    padding: 1.5rem 2rem;
    position: relative;
}

.topbar {
    margin-bottom: 1.35rem;
}

.eyebrow {
    color: var(--primary-strong);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.22rem;
}

.page-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.72rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.035em;
}

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

.workspace-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.2rem;
    width: 100%;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--glass-border);
    border-radius: calc(var(--radius-xl) + 2px);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.03), transparent 34%),
        radial-gradient(circle at 0% 0%, rgba(255, 155, 84, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(10, 15, 24, 0.94), rgba(8, 12, 20, 0.86));
    box-shadow: var(--shadow-md);
}

.workspace-hero > div:first-child {
    display: grid;
    gap: 0.3rem;
}

.studio-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.studio-title {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.studio-copy {
    font-size: 0.8rem;
    margin: 0;
    text-align: right;
    max-width: 400px;
}

/* ─── Flash Messages ─── */
.flash-stack {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.flash {
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--glass-blur);
    color: var(--text-main);
    animation: flashIn 0.3s ease-out;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash.error {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.3);
}

.flash.success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(96, 242, 192, 0.26);
}

/* ─── Grid Layouts ─── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ─── Cards (Glassmorphism) ─── */
.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
        linear-gradient(180deg, rgba(10, 15, 24, 0.9), rgba(8, 12, 20, 0.84));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
    letter-spacing: -0.025em;
}

.studio-card-head {
    margin-bottom: 0.75rem;
}

.studio-card-head-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
}

.studio-selected-prompt {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.studio-category-field {
    margin-bottom: 0.75rem;
}

/* ─── Metric Cards ─── */
.metric-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(10, 15, 24, 0.92), rgba(8, 12, 20, 0.84));
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.metric-card:hover {
    border-color: rgba(255, 155, 84, 0.22);
    box-shadow: 0 0 24px rgba(255, 155, 84, 0.08);
}

.metric-value {
    margin-top: 0.15rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--primary-strong);
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

/* ─── Buttons ─── */
.btn-row {
    display: flex;
    gap: 0.6rem;
}

.btn {
    border-radius: var(--radius-sm);
    padding: 0.62rem 1.1rem;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.primary {
    background: linear-gradient(135deg, #ff8c54, #ffb66f);
    color: #1c130d;
    box-shadow: 0 8px 24px rgba(255, 155, 84, 0.24);
    border: none;
}

.btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(255, 155, 84, 0.34);
}

.btn.primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(255, 155, 84, 0.22);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.045);
    color: #dafcf4;
    border-color: rgba(144, 242, 219, 0.18);
    backdrop-filter: var(--glass-blur);
}

.btn.secondary:hover:not(:disabled) {
    background: rgba(144, 242, 219, 0.08);
    border-color: rgba(144, 242, 219, 0.34);
    color: #ffffff;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-color: var(--glass-border);
}

.btn.ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
    border-color: var(--glass-border-hover);
}

.btn.danger {
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.25);
}

.btn.danger:hover:not(:disabled) {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
}

/* ─── Form Elements ─── */
.field {
    margin-bottom: 0.85rem;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
    background: var(--bg-input);
    transition: var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 155, 84, 0.42);
    box-shadow: 0 0 0 3px rgba(255, 155, 84, 0.12), 0 0 16px rgba(255, 155, 84, 0.08);
    background: var(--bg-input-focus);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
}

select option {
    background: #1e293b;
    color: var(--text-main);
}

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

/* ─── Dropzone ─── */
.dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.015));
    padding: 1.2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(255, 155, 84, 0.35);
    background: rgba(255, 155, 84, 0.08);
    box-shadow: 0 0 30px rgba(255, 155, 84, 0.1);
}

.studio-dropzone {
    padding: 1rem;
}

.studio-dropzone-copy {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.studio-dropzone-button {
    margin-top: 0.5rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.studio-file-meta {
    margin-top: 0.55rem;
    text-align: center;
    font-size: 0.75rem;
}

.studio-upload-preview {
    margin-top: 1rem;
    aspect-ratio: 16 / 9;
    max-height: 160px;
}

.studio-generate-row {
    margin-top: 1rem;
}

.studio-generate-button {
    width: 100%;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.studio-generation-status {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
}

/* ─── Preview Frames ─── */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.preview-frame {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.4));
    aspect-ratio: 1;
    position: relative;
}

.preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.studio-preview-grid {
    gap: 0.75rem;
}

.preview-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border: none;
    font-size: 0.6rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.preview-badge.edited {
    background: linear-gradient(135deg, #ff8c54, #ffb66f);
}

/* ─── Empty State ─── */
.empty-state {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.studio-empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.studio-empty-copy {
    font-size: 0.85rem;
}

/* ─── Studio Specifics ─── */
.studio-caption-field {
    margin-bottom: 0.75rem;
}

.studio-caption-editor {
    min-height: 80px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.studio-schedule-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.studio-schedule-field {
    margin: 0;
}

.studio-schedule-input {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.studio-schedule-actions {
    gap: 0.35rem;
}

.studio-compact-button {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.studio-dictionary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.studio-dictionary-grid .field {
    margin-bottom: 0;
}

.studio-combination-summary {
    margin-top: 0.6rem;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    background: var(--bg-card);
}

/* ─── Badge ─── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.badge.warm {
    background: rgba(245, 158, 11, 0.14);
    color: #ffd39b;
    border-color: rgba(245, 158, 11, 0.25);
}

.badge.danger {
    background: rgba(244, 63, 94, 0.14);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.25);
}

.badge.info {
    background: rgba(144, 242, 219, 0.08);
    color: #b9fff0;
    border-color: rgba(144, 242, 219, 0.18);
}

/* ─── Prompt Grid / Card (Studio page) ─── */
.prompt-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.prompt-card {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    background: var(--bg-card);
    text-align: left;
    padding: 0.55rem 0.68rem;
    transition: var(--transition);
}

.prompt-card:hover {
    border-color: rgba(255, 155, 84, 0.24);
    background: var(--bg-card-hover);
}

.prompt-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 16px rgba(255, 155, 84, 0.1);
}

.prompt-card .card-thumb {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.prompt-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    width: 100%;
}

.prompt-card .card-body h3 {
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-bright);
}

#studio-prompt-grid .prompt-card:hover .card-thumb {
    transform: scale(1.8);
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

#studio-prompt-grid .prompt-card .card-hover-preview {
    display: none !important;
}

/* ─── Prompt List / Task List ─── */
.prompt-list-shell {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 0.9rem;
    align-items: start;
}

.prompt-list,
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.prompt-row,
.task-row {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    transition: var(--transition);
}

.prompt-row.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.prompt-row:hover,
.prompt-row:focus,
.task-row:hover,
.task-row:focus {
    border-color: rgba(255, 155, 84, 0.24);
    background: var(--bg-card-hover);
    box-shadow: 0 0 16px rgba(255, 155, 84, 0.06);
    outline: none;
}

.prompt-row-main,
.task-row-main {
    min-width: 0;
    flex: 1;
}

.prompt-row-title {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-bright);
}

.prompt-row-main,
.task-row-headline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.task-row-headline h3 {
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-bright);
}

.prompt-row-actions,
.task-row-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.task-row-meta {
    color: var(--text-muted);
    margin-top: 0.24rem;
    font-size: 0.77rem;
}

.task-row-error {
    margin-top: 0.3rem;
    color: #fda4af;
    font-size: 0.77rem;
    font-weight: 600;
}

.task-edit-row {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.task-edit-input {
    width: auto;
    min-width: 230px;
    max-width: 100%;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
}

.task-edit-button {
    padding: 0.42rem 0.6rem;
    font-size: 0.74rem;
}

/* ─── Hover Preview Panel ─── */
.hover-preview-panel {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 0.85rem;
    position: sticky;
    top: 1rem;
}

.hover-preview-frame {
    aspect-ratio: 1 / 1;
    margin-bottom: 0.6rem;
}

.hover-preview-panel h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-bright);
}

/* ─── Category Grid (Library) ─── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.category-box {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 0.75rem;
    min-height: 92px;
    text-align: left;
    width: 100%;
    transition: var(--transition);
}

.category-box:hover {
    border-color: rgba(255, 155, 84, 0.22);
    background: var(--bg-card-hover);
}

.category-box h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: var(--text-bright);
}

.category-box p {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.category-box strong {
    display: inline-block;
    margin-top: 0.34rem;
    color: var(--primary-strong);
    font-size: 0.78rem;
}

.category-box.active,
.category-box.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.category-box.placeholder {
    border-style: dashed;
}

/* ─── Dictionary (Library) ─── */
.dictionary-group-list {
    display: grid;
    gap: 0.8rem;
    max-height: 640px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.dictionary-group-card {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.85rem;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
}

.dictionary-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.dictionary-group-head h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-bright);
}

.dictionary-item-list {
    display: grid;
    gap: 0.5rem;
}

.dictionary-item-row {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.02);
}

.dictionary-item-row strong {
    color: var(--text-bright);
}

.dictionary-item-row.passive {
    opacity: 0.5;
}

/* ─── Video Items ─── */
.video-list {
    display: grid;
    gap: 0.8rem;
}

.video-item {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 0.85rem;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0.85rem;
    transition: var(--transition);
}

.video-item:hover {
    border-color: var(--glass-border-hover);
}

.video-player-wrap {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    min-height: 146px;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
}

.video-item-meta h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-bright);
}

.video-caption-field {
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
}

.video-music-field {
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
}

.video-music-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

.video-music-query {
    width: 100%;
}

.video-music-select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-main);
}

.video-music-search-button {
    min-width: 76px;
}

.video-music-preview-row {
    margin-top: 0.45rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.video-music-preview-button {
    min-width: 92px;
}

.video-music-helper {
    margin: 0;
}

.video-music-field audio {
    display: none;
}

.video-caption-editor {
    min-height: 74px;
}

.video-schedule-row {
    margin-bottom: 0;
}

/* ─── Auth Page ─── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 18% 18%, rgba(255, 155, 84, 0.16) 0%, transparent 50%),
        radial-gradient(ellipse at 82% 75%, rgba(144, 242, 219, 0.1) 0%, transparent 45%);
}

.auth-shell {
    width: min(1060px, 100%);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 155, 84, 0.08);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

.auth-hero {
    padding: 2.5rem;
    color: #e2e8f0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 155, 84, 0.24), transparent 46%),
        radial-gradient(circle at 82% 75%, rgba(144, 242, 219, 0.14), transparent 44%),
        linear-gradient(145deg, #0d121d 0%, #17121c 48%, #0b1119 100%);
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff9b54' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.auth-brand {
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-brand .brand-dot {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    max-width: 17ch;
    color: #ffffff;
    position: relative;
    z-index: 1;
    letter-spacing: -0.04em;
}

.auth-hero p {
    color: rgba(226, 232, 240, 0.8);
    max-width: 38ch;
    position: relative;
    z-index: 1;
}

.auth-bullets {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.45rem;
    position: relative;
    z-index: 1;
}

.auth-bullets span {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.9);
    background: rgba(255, 155, 84, 0.1);
    border: 1px solid rgba(255, 155, 84, 0.18);
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    width: fit-content;
    backdrop-filter: blur(8px);
}

.auth-card {
    padding: 2rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: var(--glass-blur);
}

.auth-tabs {
    display: inline-flex;
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.2rem;
    margin-bottom: 1.2rem;
}

.auth-tab {
    flex: 1;
    border-radius: 999px;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(255, 155, 84, 0.2), rgba(255, 190, 128, 0.16));
    color: var(--primary-strong);
    box-shadow: 0 0 12px rgba(255, 155, 84, 0.12);
}

.auth-header {
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    color: var(--text-bright);
    letter-spacing: -0.03em;
}

.auth-submit {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.75rem 1rem;
}

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

.auth-footer-action button {
    color: var(--primary-strong);
    font-weight: 700;
    margin-left: 0.2rem;
}

.auth-footer-action button:hover {
    color: #a5b4fc;
}

/* ─── Billing ─── */
.billing-inline-list {
    display: grid;
    gap: 0.45rem;
}

.billing-inline-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
}

.billing-inline-item strong {
    color: var(--text-bright);
}

.billing-package-grid {
    display: grid;
    gap: 0.85rem;
}

.billing-package-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    display: grid;
    gap: 0.75rem;
    transition: var(--transition);
}

.billing-package-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.billing-package-top,
.billing-package-meta,
.billing-transaction-item,
.billing-admin-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.billing-package-card h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    color: var(--text-bright);
    letter-spacing: -0.03em;
}

.billing-transaction-list,
.billing-admin-list {
    display: grid;
    gap: 0.65rem;
}

.billing-transaction-item,
.billing-admin-row,
.billing-admin-edit-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 0.85rem;
}

.billing-transaction-side {
    text-align: right;
    display: grid;
    gap: 0.15rem;
}

.billing-positive {
    color: #6ee7b7;
}

.billing-negative {
    color: #fda4af;
}

.billing-admin-form {
    display: grid;
    gap: 0.75rem;
}

.billing-admin-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.billing-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.billing-checkbox-row input {
    width: auto;
}

.billing-page-note {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 155, 84, 0.08);
    border: 1px solid rgba(255, 155, 84, 0.18);
    color: var(--primary-strong);
    font-size: 0.8rem;
    font-weight: 600;
}

.settings-panel {
    max-width: none;
    padding-bottom: 3rem;
}

.settings-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.9fr);
    gap: 1.2rem;
    margin-bottom: 1.35rem;
    padding: 1.35rem;
    border: 1px solid rgba(129, 140, 248, 0.16);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 36%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow-lg);
}

.settings-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -42% auto;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 68%);
    pointer-events: none;
}

.settings-hero-copy {
    position: relative;
    z-index: 1;
    align-self: end;
    max-width: 760px;
}

.settings-hero-title {
    max-width: 12ch;
    margin-bottom: 0.55rem;
    font-size: clamp(2rem, 3.8vw, 3.7rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.settings-hero-text {
    max-width: 54ch;
    font-size: 0.96rem;
}

.settings-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.settings-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-bright);
    font-size: 0.76rem;
    font-weight: 600;
}

.settings-glance-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.9rem;
}

.settings-glance {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-glance-spotlight {
    padding: 1.15rem;
    border-color: rgba(129, 140, 248, 0.2);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.14), rgba(255, 255, 255, 0.04));
}

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

.settings-glance-value {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
    color: var(--text-bright);
    letter-spacing: -0.04em;
}

.settings-glance-copy,
.settings-glance-foot {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.settings-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 1.2rem;
    align-items: start;
}

.settings-main-column,
.settings-side-column,
.settings-admin-panel {
    display: grid;
    gap: 1.2rem;
}

.settings-surface {
    position: relative;
    overflow: hidden;
    padding: 1.2rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.42));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
}

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

.settings-surface-sticky {
    position: sticky;
    top: 1.25rem;
}

.settings-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-section-copy {
    max-width: 42ch;
    text-align: right;
}

.settings-form-grid {
    display: grid;
    gap: 0.9rem;
}

.settings-action-row {
    flex-wrap: wrap;
}

.settings-action-row .btn {
    flex: 1;
    min-width: 120px;
}

.settings-checkbox-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    cursor: pointer;
}

.settings-checkbox-row input {
    width: auto;
}

.settings-inline-note {
    margin-top: 0.85rem;
}

.settings-status-list {
    display: grid;
    gap: 0.5rem;
}

.settings-status-item {
    align-items: center;
    padding: 0.78rem 0.9rem;
    font-size: 0.83rem;
}

.settings-status-alert {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(244, 63, 94, 0.2);
    background: rgba(244, 63, 94, 0.08);
    color: #fda4af;
}

.settings-status-alert-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-admin-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.settings-admin-title {
    font-size: clamp(1.6rem, 2vw, 2.1rem);
}

.settings-admin-copy {
    max-width: 40ch;
    text-align: right;
}

.settings-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.settings-admin-grid-wide {
    align-items: start;
}

.settings-admin-scroll {
    margin-top: 1rem;
}

.billing-inline-list {
    gap: 0.5rem;
}

.billing-inline-item {
    padding: 0.6rem 0.72rem;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

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

.billing-package-card {
    min-height: 200px;
    align-content: start;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
}

.billing-package-card .btn {
    width: 100%;
}

.billing-admin-list {
    gap: 0.8rem;
}

.billing-admin-edit-card {
    background: rgba(255, 255, 255, 0.03);
}

/* ─── Info Items (Settings Status) ─── */
.info-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.info-item strong {
    color: var(--text-bright);
}

/* ─── Loading Shimmer Animation ─── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

/* ─── Settings Redesign Override ─── */
.settings-panel {
    --settings-accent: #ff9b54;
    --settings-accent-strong: #ffd39b;
    --settings-signal: #90f2db;
    --settings-panel-bg: rgba(7, 11, 19, 0.84);
    --settings-panel-bg-strong: rgba(10, 15, 24, 0.94);
    position: relative;
    overflow: hidden;
    padding-bottom: 4rem;
}

.settings-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 520px;
    background:
        radial-gradient(circle at 16% 4%, rgba(255, 155, 84, 0.18), transparent 32%),
        radial-gradient(circle at 86% 10%, rgba(144, 242, 219, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    pointer-events: none;
}

.settings-panel .eyebrow {
    color: var(--settings-accent-strong);
}

.settings-panel .page-copy,
.settings-panel .helper,
.settings-panel label,
.settings-panel .settings-glance-copy,
.settings-panel .settings-glance-foot,
.settings-panel .settings-glance-note {
    color: rgba(212, 219, 232, 0.68);
}

.settings-panel .btn.primary {
    background: linear-gradient(135deg, #ff8c54, #ffb56e);
    color: #1b120b;
    box-shadow: 0 14px 34px rgba(255, 140, 84, 0.26);
}

.settings-panel .btn.primary:hover:not(:disabled) {
    box-shadow: 0 18px 40px rgba(255, 140, 84, 0.34);
}

.settings-panel .btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(144, 242, 219, 0.18);
    color: #d9fff5;
}

.settings-panel .btn.secondary:hover:not(:disabled) {
    background: rgba(144, 242, 219, 0.08);
    color: #ffffff;
    border-color: rgba(144, 242, 219, 0.35);
}

.settings-panel .btn.danger {
    background: rgba(124, 26, 54, 0.32);
    border-color: rgba(255, 129, 157, 0.18);
    color: #ffc2cf;
}

.settings-panel input,
.settings-panel textarea,
.settings-panel select {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.settings-panel input:focus,
.settings-panel textarea:focus,
.settings-panel select:focus {
    border-color: rgba(255, 155, 84, 0.42);
    box-shadow:
        0 0 0 4px rgba(255, 155, 84, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.settings-orbit-ring {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-orbit-ring-a {
    width: 720px;
    height: 720px;
    top: -340px;
    right: -220px;
    transform: rotate(-12deg);
}

.settings-orbit-ring-b {
    width: 420px;
    height: 420px;
    top: 90px;
    right: 120px;
    border-color: rgba(144, 242, 219, 0.08);
}

.settings-orbit-glow {
    position: absolute;
    top: 42px;
    right: 210px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--settings-signal);
    box-shadow: 0 0 0 10px rgba(144, 242, 219, 0.08), 0 0 30px rgba(144, 242, 219, 0.35);
}

.settings-hero,
.settings-panel .settings-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 430px);
    gap: 1.4rem;
    padding: 1.65rem;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.04), transparent 34%),
        radial-gradient(circle at 18% 22%, rgba(255, 155, 84, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(10, 15, 24, 0.95), rgba(8, 12, 20, 0.82));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.settings-panel .settings-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 88%);
    pointer-events: none;
}

.settings-panel .settings-hero::after {
    width: 520px;
    height: 520px;
    inset: auto -6% -58% auto;
    background: radial-gradient(circle, rgba(255, 155, 84, 0.18), transparent 68%);
}

.settings-hero-copy,
.settings-panel .settings-hero-copy {
    display: grid;
    gap: 1.1rem;
    align-content: end;
    max-width: 860px;
}

.settings-kicker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.settings-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(232, 238, 248, 0.72);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-hero-title,
.settings-panel .settings-hero-title {
    max-width: 10.5ch;
    margin-bottom: 0;
    font-size: clamp(2.7rem, 5vw, 5.4rem);
    line-height: 0.9;
    letter-spacing: -0.065em;
}

.settings-hero-text,
.settings-panel .settings-hero-text {
    max-width: 58ch;
    font-size: 0.98rem;
    line-height: 1.7;
}

.settings-hero-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.35rem;
}

.settings-band-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.settings-band-label {
    color: rgba(255, 211, 155, 0.8);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.settings-band-item strong {
    color: var(--text-bright);
    font-size: 0.82rem;
    line-height: 1.45;
}

.settings-hero-rail {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.9rem;
}

.settings-glance,
.settings-panel .settings-glance {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(16, 23, 36, 0.88), rgba(10, 16, 27, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    gap: 0.75rem;
}

.settings-glance-spotlight,
.settings-panel .settings-glance-spotlight {
    padding: 1.15rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 155, 84, 0.18), transparent 44%),
        linear-gradient(180deg, rgba(22, 28, 44, 0.94), rgba(11, 15, 24, 0.88));
    border-color: rgba(255, 155, 84, 0.2);
}

.settings-glance-rail {
    align-content: start;
}

.settings-glance-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.settings-glance-label,
.settings-panel .settings-glance-label {
    color: rgba(236, 241, 250, 0.58);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
}

.settings-glance-note {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.settings-glance-value,
.settings-panel .settings-glance-value {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    letter-spacing: -0.075em;
}

.settings-workbench,
.settings-panel .settings-workbench {
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
    gap: 1.35rem;
}

.settings-main-column,
.settings-side-column,
.settings-admin-panel {
    gap: 1.35rem;
}

.settings-surface,
.settings-panel .settings-surface {
    border-radius: 28px;
    padding: 1.3rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
        linear-gradient(180deg, rgba(10, 15, 24, 0.92), rgba(8, 12, 21, 0.82));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.settings-surface::before {
    background: linear-gradient(90deg, transparent, rgba(255, 155, 84, 0.32), transparent);
}

.settings-section-head,
.settings-panel .settings-section-head {
    align-items: start;
    gap: 1.25rem;
    margin-bottom: 1.2rem;
}

.settings-section-head-tower {
    margin-bottom: 1rem;
}

.settings-section-head-compact {
    margin-bottom: 0.85rem;
}

.settings-panel .settings-section-copy {
    max-width: 34ch;
    text-align: right;
    line-height: 1.55;
}

.settings-ops-tower {
    overflow: visible;
}

.settings-ops-divider {
    height: 1px;
    margin: 1.1rem 0 1rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.settings-ops-status-shell {
    display: grid;
    gap: 0.8rem;
}

.settings-status-list,
.settings-panel .settings-status-list {
    gap: 0.58rem;
}

.settings-status-item,
.settings-panel .settings-status-item {
    min-height: 52px;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-status-alert,
.settings-panel .settings-status-alert {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(87, 23, 44, 0.42), rgba(44, 12, 27, 0.42));
    border-color: rgba(255, 129, 157, 0.18);
    color: #ffd2dc;
}

.settings-admin-panel {
    position: relative;
    z-index: 1;
}

.settings-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.2rem;
    align-items: start;
    padding: 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 100% 0%, rgba(144, 242, 219, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(9, 14, 24, 0.96), rgba(7, 11, 19, 0.88));
}

.settings-admin-hero > div:first-child {
    display: grid;
    gap: 0.3rem;
}

.settings-admin-copy,
.settings-panel .settings-admin-copy {
    max-width: 60ch;
    text-align: left;
}

.settings-admin-cues {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    grid-column: 1 / -1;
}

.settings-admin-cue {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.settings-admin-cue strong {
    color: var(--text-bright);
    font-size: 0.8rem;
    line-height: 1.45;
}

.settings-admin-grid,
.settings-panel .settings-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.settings-admin-scroll {
    margin-top: 1.1rem;
}

.settings-panel .billing-inline-list {
    display: grid;
    gap: 0.55rem;
}

.settings-panel .billing-inline-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.settings-panel .billing-inline-item strong {
    color: var(--settings-signal);
    font-size: 0.8rem;
}

.settings-panel .billing-package-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.settings-panel .billing-package-card {
    min-height: 230px;
    padding: 1.1rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 100% 0%, rgba(144, 242, 219, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(17, 25, 39, 0.92), rgba(10, 15, 24, 0.86));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-panel .billing-package-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 155, 84, 0.22);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.settings-panel .billing-package-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.settings-panel .billing-package-card .btn {
    margin-top: auto;
}

.settings-panel .billing-transaction-list,
.settings-panel .billing-admin-list {
    display: grid;
    gap: 0.85rem;
}

.settings-panel .billing-transaction-item,
.settings-panel .billing-admin-row,
.settings-panel .billing-admin-edit-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.settings-panel .billing-admin-form {
    display: grid;
    gap: 0.9rem;
}

.settings-panel .billing-admin-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

/* ─── Responsive ─── */
@media (max-width: 1180px) {
    .prompt-list-shell {
        grid-template-columns: 1fr;
    }

    .hover-preview-panel {
        position: static;
    }

    .settings-hero,
    .settings-workbench,
    .settings-admin-grid,
    .billing-package-grid {
        grid-template-columns: 1fr;
    }

    .settings-section-head,
    .settings-admin-head {
        align-items: start;
        flex-direction: column;
    }

    .settings-section-copy,
    .settings-admin-copy {
        text-align: left;
    }

    .settings-surface-sticky {
        position: static;
    }
}

@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 68px;
        padding: 1rem 0.5rem;
    }

    .sidebar .brand-mark > span:not(.brand-dot),
    .sidebar .nav-link span:not(.nav-icon),
    .sidebar-footer {
        display: none;
    }

    .content-panel {
        padding: 1.2rem;
    }

    .workspace-hero {
        padding: 1rem 1.05rem;
    }

    .settings-hero-title {
        max-width: 14ch;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .billing-admin-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .studio-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .studio-copy {
        text-align: left;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .studio-schedule-row {
        grid-template-columns: 1fr;
    }

    .studio-dictionary-grid {
        grid-template-columns: 1fr;
    }

    .video-item {
        grid-template-columns: 1fr;
    }

    .task-edit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .task-edit-input {
        min-width: 0;
        width: 100%;
    }

    .settings-panel {
        padding-bottom: 2rem;
    }

    .workspace-hero {
        padding: 0.95rem;
        border-radius: 22px;
    }

    .settings-hero,
    .settings-surface {
        padding: 1rem;
    }

    .settings-glance-value {
        font-size: 2rem;
    }
}

@media (max-width: 1180px) {
    .settings-hero-band,
    .settings-admin-cues {
        grid-template-columns: 1fr;
    }

    .settings-admin-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .settings-panel .settings-hero-title {
        max-width: 11ch;
        font-size: clamp(2.4rem, 10vw, 4rem);
    }

    .settings-hero-band {
        gap: 0.7rem;
    }

    .settings-band-item,
    .settings-admin-cue {
        padding: 0.85rem 0.9rem;
    }
}

@media (max-width: 640px) {
    .settings-panel .settings-hero,
    .settings-panel .settings-surface,
    .settings-panel .settings-admin-hero {
        border-radius: 24px;
    }

    .settings-kicker-row {
        gap: 0.45rem;
    }

    .settings-kicker {
        min-height: 28px;
        padding: 0.34rem 0.7rem;
        font-size: 0.68rem;
    }

    .settings-panel .settings-hero-title {
        max-width: none;
    }

    .settings-panel .billing-package-grid,
    .settings-panel .billing-admin-edit-grid {
        grid-template-columns: 1fr;
    }

    .settings-band-item strong,
    .settings-admin-cue strong {
        font-size: 0.78rem;
    }
}
