:root {
    --bg: #08110f;
    --bg-soft: #11201d;
    --surface: rgba(19, 35, 32, 0.52);
    --surface-soft: rgba(15, 28, 26, 0.56);
    --surface-strong: rgba(33, 59, 54, 0.72);
    --text: #f4fbf8;
    --muted: #a9c1ba;
    --line: rgba(188, 238, 223, 0.14);
    --line-soft: rgba(188, 238, 223, 0.08);
    --primary: #7ef0c4;
    --primary-strong: #aef8de;
    --accent: rgba(126, 240, 196, 0.18);
    --danger: #ff7c87;
    --warning: #f1c96f;
    --info: #92d9ff;
    --success: #7ef0c4;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    --radius-xl: 16px;
    --radius-lg: 10px;
    --radius-md: 8px;
    --sidebar-width: 300px;
    --content-width: 980px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(114, 214, 171, 0.24), transparent 30%),
        radial-gradient(circle at 84% 14%, rgba(133, 205, 255, 0.2), transparent 28%),
        radial-gradient(circle at 72% 78%, rgba(49, 116, 97, 0.28), transparent 30%),
        linear-gradient(145deg, #06100f 0%, #0c1716 42%, #132422 100%);
    position: relative;
    overflow-x: clip;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(72px);
    opacity: 0.7;
}

body::before {
    top: 84px;
    left: -40px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(126, 240, 196, 0.34) 0%, rgba(126, 240, 196, 0) 72%);
}

body::after {
    right: -60px;
    top: 170px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(146, 217, 255, 0.22) 0%, rgba(146, 217, 255, 0) 72%);
}

body.sidebar-open,
body.modal-open {
    overflow: hidden;
}

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

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

img {
    max-width: 100%;
}

h1,
h2,
h3,
.brand-title {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
}

h1 {
    font-size: 1.4rem;
}

h2 {
    font-size: 1.12rem;
}

h3 {
    font-size: 1rem;
}

small,
.muted,
.lead,
.field-hint,
label span {
    color: var(--muted);
}

.layout {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.desktop-appbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #0b1119;
    border-bottom: 1px solid rgba(94, 162, 255, 0.12);
    padding: 0 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.desktop-appbar-shell {
    max-width: calc(var(--content-width) + 120px);
    margin: 0 auto;
    padding: 8px 0 10px;
}

.desktop-appbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.desktop-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 38px;
    padding: 0 16px;
    border-radius: 0 0 12px 12px;
    background: #4a4a4a;
    border: 1px solid #565656;
    color: #efefef;
    font-weight: 700;
}

.desktop-brand-link.active {
    background: #5b5b5b;
}

.mobile-toggle {
    display: none;
}

.desktop-tabs {
    display: flex;
    align-items: center;
    margin: 10px auto 0;
    background: rgba(240, 255, 250, 0.08);
    border: 1px solid rgba(208, 255, 238, 0.12);
    border-radius: 18px;
    overflow: visible;
    min-width: 260px;
    min-height: 48px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
}

.desktop-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 128px;
    height: 48px;
    padding: 0 20px;
    color: #ddf5ee;
    font-weight: 700;
    font-size: 0.96rem;
    border-right: 1px solid rgba(208, 255, 238, 0.08);
    position: relative;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.desktop-tab:last-child {
    border-right: 0;
}

.desktop-tab.active {
    background: linear-gradient(135deg, rgba(126, 240, 196, 0.22), rgba(146, 217, 255, 0.14));
    color: #f6fffc;
    box-shadow: inset 0 0 0 1px rgba(194, 255, 231, 0.12), 0 0 32px rgba(126, 240, 196, 0.14);
}

.desktop-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ── Dropdown menü (Analiz / Ayarlar) ─────────────────────────── */
.desktop-tab-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.desktop-tab-group > .desktop-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    /* button element reset */
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    padding: 0 16px;
}

.desktop-tab-group > .desktop-tab .nav-caret {
    font-size: .58rem;
    opacity: .55;
    transition: transform 220ms ease;
    line-height: 1;
    margin-top: 1px;
}

.desktop-tab-group.open > .desktop-tab .nav-caret {
    transform: rotate(180deg);
    opacity: .85;
}

.desktop-tab-dropdown {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    min-width: 190px;
    padding: 7px;
    gap: 2px;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: rgba(12, 18, 30, 0.97);
    border: 1px solid rgba(94, 162, 255, 0.16);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(94, 162, 255, 0.08);
    backdrop-filter: blur(24px);
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -6px) scale(0.97);
    transform-origin: top center;
    transition: opacity 180ms ease, transform 180ms cubic-bezier(.2,.8,.3,1.2), visibility 180ms;
}

.desktop-tab-group.open > .desktop-tab-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.desktop-tab-dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: rgba(10, 16, 31, 0.95);
    border-left: 1px solid rgba(94, 162, 255, 0.15);
    border-top: 1px solid rgba(94, 162, 255, 0.15);
    rotate: 45deg;
}

.desktop-tab-dropdown a {
    display: block;
    padding: 9px 12px;
    font-size: .87rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    transition: background 140ms ease, color 140ms ease;
    white-space: nowrap;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
}

.desktop-tab-dropdown a:hover {
    background: rgba(94, 162, 255, 0.1);
    color: #93c5fd;
}

.desktop-tab-dropdown a.active {
    background: rgba(94, 162, 255, 0.15);
    color: #60a5fa;
    font-weight: 700;
}

/* Sidebar dropdown */
.sidebar-nav-group {
    display: flex;
    flex-direction: column;
}

.sidebar-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 700;
    color: rgba(244, 251, 248, 0.5);
    cursor: pointer;
    user-select: none;
    transition: background 140ms ease, color 140ms ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    letter-spacing: .01em;
}

.sidebar-nav-group-toggle:hover {
    background: rgba(94, 162, 255, 0.07);
    color: rgba(244, 251, 248, 0.85);
}

.sidebar-nav-group-toggle.active {
    color: #60a5fa;
}

.sidebar-nav-group-toggle .nav-caret {
    font-size: .58rem;
    opacity: .45;
    transition: transform 200ms ease;
}

.sidebar-nav-group.open > .sidebar-nav-group-toggle .nav-caret {
    transform: rotate(180deg);
    opacity: .8;
}

.sidebar-nav-sub {
    display: none;
    flex-direction: column;
    padding: 3px 0 3px 14px;
    margin-top: 1px;
    border-left: 1px solid rgba(188, 238, 223, 0.1);
    margin-left: 20px;
    gap: 1px;
}

.sidebar-nav-group.open > .sidebar-nav-sub {
    display: flex;
}

.sidebar-nav-sub .nav-link {
    font-size: .86rem;
    padding: 7px 12px;
    border-radius: 8px;
    color: rgba(244, 251, 248, 0.5);
    text-decoration: none;
    font-weight: 600;
    transition: background 140ms ease, color 140ms ease;
    display: block;
}

.sidebar-nav-sub .nav-link:hover {
    background: rgba(94, 162, 255, 0.07);
    color: rgba(244, 251, 248, 0.85);
}

.sidebar-nav-sub .nav-link.active {
    background: rgba(94, 162, 255, 0.12);
    color: #60a5fa;
}

/* Üst seviye sidebar nav-link (Anasayfa) */
.nav-section > .nav-link {
    display: block;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 700;
    color: rgba(244, 251, 248, 0.5);
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease;
    letter-spacing: .01em;
}

.nav-section > .nav-link:hover {
    background: rgba(94, 162, 255, 0.07);
    color: rgba(244, 251, 248, 0.85);
}

.nav-section > .nav-link.active {
    background: rgba(94, 162, 255, 0.12);
    color: #60a5fa;
}

.desktop-userbar {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #d0d0d0;
    font-size: 0.94rem;
    min-height: 48px;
}

.desktop-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #efefef;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(220, 255, 244, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.desktop-profile-link:hover {
    background: rgba(94, 162, 255, 0.12);
    border-color: rgba(94, 162, 255, 0.28);
    transform: translateY(-1px);
}

.desktop-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(126, 240, 196, 0.28), rgba(146, 217, 255, 0.18));
    border: 1px solid rgba(220, 255, 244, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(126, 240, 196, 0.14);
}

.desktop-avatar-image {
    object-fit: cover;
}

.desktop-logout {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 124, 135, 0.4), rgba(139, 54, 61, 0.62));
    border: 1px solid rgba(255, 188, 193, 0.16);
    color: #fff2f2;
    box-shadow: 0 0 24px rgba(255, 124, 135, 0.14);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.desktop-logout:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 0 28px rgba(255, 124, 135, 0.28);
}

.logout-icon {
    font-size: 1rem;
    line-height: 1;
}

.sidebar-wrap,
.sidebar-scrim {
    display: none;
}

.sidebar {
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: var(--surface);
}

.brand,
.preview-header,
.topbar-row,
.list-row,
.clock-widget,
.profile-badge,
.mobile-bottom-nav,
.section-head,
.modal-header,
.study-meta,
.card-tags,
.due-chip-row,
.hero-actions,
.action-row,
.inline-form,
.study-actions,
.filters,
.topbar-actions,
.counts-row,
.desktop-editor-toolbar,
.desktop-editor-group,
.desktop-editor-actions,
.desktop-dashboard-actions,
.desktop-mini-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-row,
.list-row,
.clock-widget,
.section-head,
.modal-header,
.desktop-editor-toolbar,
.desktop-editor-actions,
.desktop-dashboard-actions {
    justify-content: space-between;
}

.content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 24px 18px 96px;
}

.topbar,
.panel,
.table-card,
.control-card,
.study-card,
.stat-card,
.timeline-card,
.flashcard-preview,
.auth-card,
.hero-card,
.preview-card,
.mini-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.topbar,
.panel,
.table-card,
.control-card,
.study-card,
.stat-card,
.timeline-card,
.flashcard-preview,
.auth-card,
.hero-card,
.preview-card,
.mini-panel {
    padding: 16px;
}

.desktop-screen-header {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 8px 0 12px;
}

.desktop-mini-status {
    color: #a8a8a8;
    font-size: 0.82rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chip,
.eyebrow,
.tag,
.counts-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #4a4a4a;
    border: 1px solid #595959;
    color: #d8d8d8;
    font-size: 0.78rem;
    font-weight: 600;
}

.stats-grid,
.info-grid,
.metrics-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-grid,
.two-column,
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.page-grid,
.category-grid {
    display: grid;
    gap: 14px;
}

.stat-value {
    display: block;
    margin-top: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

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

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

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

th {
    color: #f4f4f4;
    font-size: 0.82rem;
    font-weight: 700;
}

.field,
.field-group {
    display: grid;
    gap: 6px;
}

.field input,
.field select,
.field textarea,
.search-input,
.desktop-editor-pill,
.desktop-editor-textarea {
    width: 100%;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.field input,
.field select,
.search-input,
.desktop-editor-pill {
    min-height: 38px;
    padding: 8px 12px;
}

.field textarea,
.desktop-editor-textarea {
    min-height: 132px;
    padding: 10px 12px;
    resize: vertical;
}

.desktop-editor-textarea {
    min-height: 96px;
    background: #353535;
    border-color: #595959;
}

.label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #666666;
    border-radius: 9px;
    background: #595959;
    color: #f2f2f2;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: #5a5a5a;
}

.btn-secondary,
.btn-light,
.btn-ghost {
    background: #4e4e4e;
}

.btn-info {
    background: #5c6e85;
}

.btn-success {
    background: #557458;
}

.btn-warning {
    background: #8d6b39;
}

.btn-danger {
    background: #824545;
}

.btn:hover {
    filter: brightness(1.06);
}

.flash {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: #434343;
}

.flash-success {
    color: #a5e3a8;
}

.flash-error {
    color: #ffb0b0;
}

.flash-info {
    color: #b9d7ff;
}

.desktop-dashboard-shell {
    max-width: 720px;
    margin: 18px auto 0;
    display: grid;
    gap: 18px;
}

.desktop-deck-list {
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(14, 31, 28, 0.42) 100%);
    border: 1px solid rgba(217, 255, 242, 0.12);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
}

.desktop-deck-table th,
.desktop-deck-table td {
    font-size: 0.98rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(220, 255, 244, 0.08);
}

.desktop-deck-table th {
    color: #ebfbf5;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.desktop-deck-table td:nth-child(2),
.desktop-deck-table td:nth-child(3),
.desktop-deck-table td:nth-child(4) {
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 18px rgba(126, 240, 196, 0.16);
}

.dashboard-shell-wide {
    max-width: 100%;
}

.dashboard-deck-panel {
    padding: 10px 18px 14px;
    position: relative;
    z-index: 10;
}

.dashboard-deck-table td:last-child,
.dashboard-deck-table th:last-child {
    text-align: right;
    width: 88px;
}

.dashboard-deck-table td:last-child {
    position: relative;
    overflow: visible;
}

.deck-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    min-height: 32px;
}

.starred-main-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    min-height: 32px;
    width: 100%;
    text-align: left;
}

.deck-row-main td {
    font-weight: 600;
}

.deck-row-main.is-selected td {
    background: rgba(126, 240, 196, 0.08);
}

.deck-row-sub td {
    color: #d7ece5;
    background: rgba(5, 18, 16, 0.16);
}

.deck-row-sub.is-selected td {
    background: rgba(146, 217, 255, 0.08);
}

.deck-sub-name {
    padding-left: 42px;
}

.deck-sub-link {
    display: inline-flex;
    color: inherit;
    font-weight: 700;
}

.sub-exam-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2a4a6b;
    border: 1px solid #3a6090;
    color: #a8d0f0;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.sub-exam-badge.badge-gri {
    background: #2a4a6b;
    border-color: #3a6090;
    color: #a8d0f0;
}

.sub-exam-badge.badge-kirmizi {
    background: #5c1a1a;
    border-color: #8b2020;
    color: #ffb8b8;
}

.sub-exam-badge.badge-sari {
    background: #4a3c00;
    border-color: #7a6400;
    color: #ffd966;
}

.sub-exam-badge.badge-yesil {
    background: #0d3320;
    border-color: #1a5c35;
    color: #7de8a8;
}

.sub-test-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #3a2a6b;
    border: 1px solid #5a4090;
    color: #c8b8f0;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.sub-mastery-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid transparent;
}

.oran-pill {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.sub-mastery-badge.mastery-vgood,
.oran-pill.mastery-vgood {
    background: #0d3320;
    border-color: #1a5c35;
    color: #7de8a8;
}

.sub-mastery-badge.mastery-good,
.oran-pill.mastery-good {
    background: #123a44;
    border-color: #1d5c6b;
    color: #7fd8ec;
}

.sub-mastery-badge.mastery-bad,
.oran-pill.mastery-bad {
    background: #4a3c00;
    border-color: #7a6400;
    color: #ffd966;
}

.sub-mastery-badge.mastery-vbad,
.oran-pill.mastery-vbad {
    background: #5c1a1a;
    border-color: #8b2020;
    color: #ffb8b8;
}

.deck-row-sub {
    cursor: pointer;
}

.deck-name-main {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

.deck-expand {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(126, 240, 196, 0.2), rgba(146, 217, 255, 0.18));
    color: #f4fffb;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 28px;
    border: 1px solid rgba(220, 255, 244, 0.14);
    box-shadow: 0 0 24px rgba(126, 240, 196, 0.12);
}

.btn-compact {
    min-height: 28px;
    padding: 0 10px;
}

.settings-menu-wrap {
    position: relative;
    display: inline-block;
}

.settings-trigger {
    list-style: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(220, 255, 244, 0.12);
    cursor: pointer;
    line-height: 1;
    backdrop-filter: blur(16px);
}

.settings-trigger::-webkit-details-marker {
    display: none;
}

.settings-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 150px;
    padding: 6px;
    display: grid;
    gap: 4px;
    border-radius: 10px;
    background: rgba(14, 26, 24, 0.88);
    border: 1px solid rgba(220, 255, 244, 0.12);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
    z-index: 12;
    backdrop-filter: blur(20px);
}

.settings-item {
    width: 100%;
    text-align: left;
    border: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: #efefef;
    cursor: pointer;
}

.settings-item:hover {
    background: #444444;
}

.settings-item-danger {
    color: #ffb8b8;
}

.sub-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.desktop-dashboard-actions {
    justify-content: center;
}

.desktop-dashboard-actions .btn {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.desktop-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    color: #f4f8ff;
    font-weight: 800;
}

.desktop-brand-mark {
    font-size: 1.55rem;
    line-height: 1;
    color: #5ea2ff;
}

.desktop-brand-name {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

body.user-dashboard-page {
    background:
        radial-gradient(circle at 50% 10%, rgba(94, 162, 255, 0.07), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(44, 92, 188, 0.06), transparent 32%),
        linear-gradient(180deg, #0a0d13 0%, #0d1118 100%);
    color: #ffffff;
}

.user-dashboard-page::before,
.user-dashboard-page::after {
    display: none;
    content: '';
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(72px);
    opacity: 0.32;
}

.user-dashboard-page::before {
    top: 90px;
    left: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 72%);
}

.user-dashboard-page::after {
    right: -30px;
    top: 180px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 72%);
}

body.user-dashboard-page::before,
body.user-dashboard-page::after {
    display: none;
}

.user-dashboard-page .desktop-appbar {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.86), rgba(10, 14, 22, 0.94));
    border-bottom: 1px solid rgba(94, 162, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.user-dashboard-page .desktop-appbar-shell {
    max-width: calc(var(--content-width) + 220px);
}

.user-dashboard-page .desktop-appbar-inner {
    min-height: 62px;
}

.user-dashboard-page .desktop-tabs {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: auto;
    min-height: 42px;
    border-radius: 0;
    gap: 8px;
    margin: 0 auto;
    padding: 0;
    backdrop-filter: none;
}

.user-dashboard-page .desktop-tab {
    min-width: auto;
    height: 38px;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border-right: 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.user-dashboard-page .desktop-tab.active {
    background: linear-gradient(135deg, #3f73d6, #5ea2ff);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(61, 115, 214, 0.32);
}

.user-dashboard-page .desktop-tab:hover {
    background: rgba(94, 162, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.user-dashboard-page .desktop-userbar {
    color: rgba(255, 255, 255, 0.8);
}

.user-dashboard-page .desktop-profile-link {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #ffffff;
    backdrop-filter: none;
}

.user-dashboard-page .desktop-avatar {
    background: rgba(94, 162, 255, 0.12);
    border: 1px solid rgba(94, 162, 255, 0.14);
    box-shadow: none;
    color: #ffffff;
}

.user-dashboard-page .desktop-logout {
    width: 34px;
    height: 34px;
    background: rgba(58, 17, 23, 0.78);
    border: 1px solid rgba(255, 91, 117, 0.24);
    color: #ff5f72;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.logout-icon {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-dashboard-page .content {
    max-width: calc(var(--content-width) + 220px);
    padding-top: 32px;
}

.dashboard-top-grid-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.user-dashboard-page .flash {
    background: rgba(18, 22, 30, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    backdrop-filter: blur(16px);
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 16px;
    align-items: stretch;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-focus-card,
.dashboard-stat-card,
.dashboard-analysis-panel,
.user-dashboard-page .desktop-deck-list {
    background: rgba(16, 20, 28, 0.56);
    border: 1px solid rgba(94, 162, 255, 0.12);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.dashboard-focus-card {
    padding: 18px;
    display: grid;
    gap: 18px;
}

.dashboard-focus-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-focus-head h2 {
    color: #ffffff;
    font-size: 1rem;
}

.dashboard-focus-tabs {
    display: inline-flex;
    gap: 6px;
}

.dashboard-focus-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    color: #7382a2;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-focus-tab.active {
    background: linear-gradient(135deg, #1b7c4b, #39d98a);
    color: #ffffff;
}

.dashboard-focus-body {
    display: grid;
    gap: 16px;
    justify-items: center;
}

.dashboard-focus-ring {
    width: 154px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#39d98a calc(var(--focus-progress) * 1%), #1b7c4b 0, #1b7c4b calc((var(--focus-progress) + 18) * 1%), #232821 0);
}

.dashboard-focus-ring-inner {
    width: 110px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #0f131a;
    display: grid;
    place-items: center;
    text-align: center;
}

.dashboard-focus-ring-inner strong {
    color: #ffffff;
    font-size: 1.7rem;
}

.dashboard-focus-ring-inner span {
    color: #7df0af;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-focus-metrics {
    width: 100%;
    display: grid;
    gap: 10px;
}

.dashboard-focus-metric,
.dashboard-focus-profile {
    padding: 12px 14px;
    border-radius: 12px;
    background: #101511;
    border: 1px solid rgba(67, 112, 80, 0.18);
}

.dashboard-focus-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-focus-metric small {
    color: #8ea796;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-focus-metric strong {
    color: #eef3ff;
    font-size: 1rem;
}

.dashboard-focus-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-focus-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-focus-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(84, 198, 235, 0.24), rgba(42, 110, 225, 0.2));
    color: #dcf7ff;
    font-weight: 800;
}

.dashboard-focus-profile strong {
    display: block;
    color: #eef3ff;
    font-size: 0.94rem;
}

.dashboard-focus-profile span {
    color: #8ea796;
    font-size: 0.78rem;
}

.dashboard-stat-card {
    padding: 18px 18px 16px;
    display: grid;
    gap: 8px;
}

.dashboard-stat-card small {
    color: #8ea796;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-stat-card strong {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
}

.dashboard-search-form {
    min-width: 240px;
}

.dashboard-search-input {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 7, 7, 0.62);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.dashboard-search-input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.dashboard-activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(13, 13, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.dashboard-activity-row strong {
    color: #ffffff;
    font-size: 0.9rem;
}

.dashboard-stat-card span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}

.dashboard-analysis-panel {
    position: relative;
    overflow: visible;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.dashboard-analysis-panel::before,
.dashboard-analysis-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(72px);
    opacity: 0.45;
}

.dashboard-analysis-panel::before {
    top: -120px;
    left: 10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(94, 162, 255, 0.2) 0%, rgba(94, 162, 255, 0) 70%);
}

.dashboard-analysis-panel::after {
    right: 8%;
    bottom: -130px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(63, 110, 220, 0.16) 0%, rgba(63, 110, 220, 0) 72%);
}

.dashboard-analysis-panel > * {
    position: relative;
    z-index: 1;
}

.dashboard-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
}

.dashboard-analysis-side {
    min-width: 360px;
    display: grid;
    gap: 12px;
}

.dashboard-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-summary-pill {
    padding: 12px 14px;
    border-radius: 12px;
    background: #101511;
    border: 1px solid rgba(67, 112, 80, 0.18);
}

.dashboard-summary-pill small {
    display: block;
    color: #849988;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-summary-pill strong {
    display: block;
    margin-top: 6px;
    color: #ffffff;
    font-size: 1.3rem;
}

.dashboard-filter-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #101511;
    border: 1px solid rgba(67, 112, 80, 0.18);
    color: #8ea796;
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-filter-pill.active {
    background: rgba(28, 88, 48, 0.34);
    border-color: rgba(57, 217, 138, 0.24);
    color: #d7ffea;
}

.user-dashboard-page .desktop-dashboard-shell {
    max-width: 100%;
    gap: 16px;
}

.dashboard-datetime-strip {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(18, 24, 35, 0.74);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
}

.dashboard-datetime-time {
    color: #8db8ff;
}

.dashboard-datetime-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(94, 162, 255, 0.72);
}

.user-dashboard-page .desktop-deck-list {
    padding: 8px 18px 14px;
}

.user-dashboard-page .desktop-deck-list:hover {
    background: rgba(18, 23, 33, 0.6);
}

.user-dashboard-page .desktop-deck-table th,
.user-dashboard-page .desktop-deck-table td {
    border-bottom: 1px solid rgba(94, 162, 255, 0.1);
    color: #ffffff;
}

.user-dashboard-page .desktop-deck-table th {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
}

.user-dashboard-page .desktop-deck-table td:nth-child(2),
.user-dashboard-page .desktop-deck-table td:nth-child(3),
.user-dashboard-page .desktop-deck-table td:nth-child(4) {
    color: #8db8ff;
    text-shadow: none;
}

.user-dashboard-page .deck-row-main.is-selected td {
    background: rgba(94, 162, 255, 0.1);
}

.user-dashboard-page .deck-row-sub td {
    background: rgba(20, 24, 34, 0.38);
    color: rgba(255, 255, 255, 0.82);
}

.user-dashboard-page .deck-row-sub.is-selected td {
    background: rgba(94, 162, 255, 0.08);
}

.user-dashboard-page .deck-expand {
    background: rgba(94, 162, 255, 0.08);
    border: 1px solid rgba(94, 162, 255, 0.14);
    color: #ffffff;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.user-dashboard-page .settings-trigger {
    background: rgba(21, 26, 36, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.settings-menu-wrap {
    position: relative;
    z-index: 3;
}

.settings-menu-wrap[open] {
    z-index: 20;
}

.user-dashboard-page .settings-menu-panel {
    background: rgba(16, 21, 31, 0.9);
    border: 1px solid rgba(94, 162, 255, 0.12);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
    z-index: 25;
}

.user-dashboard-page .settings-item:hover {
    background: #171d27;
}

.user-dashboard-page .desktop-dashboard-actions {
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.user-dashboard-page .btn {
    background: rgba(21, 26, 36, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.user-dashboard-page .btn-primary {
    background: linear-gradient(135deg, #3f73d6, #5ea2ff);
    border-color: transparent;
    color: #ffffff;
}

.user-dashboard-page .btn:not(.btn-primary):hover {
    filter: none;
    background: rgba(31, 38, 52, 0.78);
    color: #ffffff;
}

.user-dashboard-page .btn-primary:hover {
    filter: none;
    background: linear-gradient(135deg, #4f82e4, #72b1ff);
    color: #ffffff;
}

.user-dashboard-page .desktop-dashboard-actions .btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    border: 0;
}

.user-dashboard-page .desktop-dashboard-actions .btn-secondary {
    background: rgba(21, 26, 36, 0.82);
    color: rgba(255, 255, 255, 0.92);
}

.user-dashboard-page .desktop-dashboard-actions .btn-primary,
.user-dashboard-page .desktop-dashboard-actions .btn-secondary {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.user-dashboard-page .modal-backdrop {
    background: rgba(5, 10, 18, 0.62);
    backdrop-filter: blur(8px);
}

.user-dashboard-page .modal-card,
.user-dashboard-page .dashboard-modal-card,
.user-dashboard-page .dashboard-card-modal,
.user-dashboard-page .desktop-editor-panel {
    background: linear-gradient(180deg, rgba(20, 25, 35, 0.95), rgba(17, 21, 30, 0.94));
    border: 1px solid rgba(94, 162, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.user-dashboard-page .dashboard-modal-card {
    width: min(760px, calc(100% - 32px));
    padding: 18px;
}

.user-dashboard-page .dashboard-card-modal {
    width: min(900px, calc(100% - 32px));
}

.user-dashboard-page .modal-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(94, 162, 255, 0.1);
}

.user-dashboard-page .modal-header h3,
.user-dashboard-page .desktop-field-label {
    color: #ffffff;
}

.user-dashboard-page .modal-body,
.user-dashboard-page .desktop-card-form {
    gap: 14px;
}

.user-dashboard-page .field,
.user-dashboard-page .desktop-field-block {
    display: grid;
    gap: 8px;
}

.user-dashboard-page .field span,
.user-dashboard-page .desktop-field-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    font-weight: 700;
}

.user-dashboard-page .field input,
.user-dashboard-page .field select,
.user-dashboard-page .field textarea,
.user-dashboard-page .desktop-editor-textarea {
    width: 100%;
    background: rgba(21, 28, 38, 0.78);
    border: 1px solid rgba(94, 162, 255, 0.14);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.user-dashboard-page .field input,
.user-dashboard-page .field select {
    min-height: 40px;
    padding: 0 12px;
}

.user-dashboard-page .field textarea,
.user-dashboard-page .desktop-editor-textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
}

.user-dashboard-page .field input::placeholder,
.user-dashboard-page .field textarea::placeholder,
.user-dashboard-page .desktop-editor-textarea::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.user-dashboard-page .desktop-inline-preview .render-box {
    background: rgba(24, 31, 43, 0.82);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
}

.user-dashboard-page .btn-secondary,
.user-dashboard-page .btn-info {
    background: #111111;
    color: #ffffff;
}

body.user-panel-page,
body.admin-panel-page {
    background:
        radial-gradient(circle at 50% 10%, rgba(94, 162, 255, 0.07), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(44, 92, 188, 0.06), transparent 32%),
        linear-gradient(180deg, #0a0d13 0%, #0d1118 100%);
    color: #ffffff;
}

.user-panel-page .desktop-appbar,
.admin-panel-page .desktop-appbar {
    background: linear-gradient(180deg, rgba(13, 18, 28, 0.86), rgba(10, 14, 22, 0.94));
    border-bottom: 1px solid rgba(94, 162, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.user-panel-page .desktop-appbar-shell,
.admin-panel-page .desktop-appbar-shell {
    max-width: calc(var(--content-width) + 220px);
}

.user-panel-page .desktop-appbar-inner,
.admin-panel-page .desktop-appbar-inner {
    min-height: 62px;
}

.user-panel-page .desktop-tabs,
.admin-panel-page .desktop-tabs {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: auto;
    min-height: 42px;
    border-radius: 0;
    gap: 8px;
    margin: 0 auto;
    padding: 0;
    backdrop-filter: none;
}

.user-panel-page .desktop-tab,
.admin-panel-page .desktop-tab {
    min-width: auto;
    height: 38px;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border-right: 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.user-panel-page .desktop-tab.active,
.admin-panel-page .desktop-tab.active {
    background: linear-gradient(135deg, #3f73d6, #5ea2ff);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(61, 115, 214, 0.32);
}

.user-panel-page .desktop-tab:hover,
.admin-panel-page .desktop-tab:hover {
    background: rgba(94, 162, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.user-panel-page .desktop-userbar,
.admin-panel-page .desktop-userbar {
    color: rgba(255, 255, 255, 0.8);
}

.user-panel-page .desktop-profile-link,
.admin-panel-page .desktop-profile-link {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #ffffff;
    backdrop-filter: none;
}

.user-panel-page .desktop-avatar,
.admin-panel-page .desktop-avatar {
    background: rgba(94, 162, 255, 0.12);
    border: 1px solid rgba(94, 162, 255, 0.14);
    box-shadow: none;
    color: #ffffff;
}

.user-panel-page .desktop-logout,
.admin-panel-page .desktop-logout {
    width: 34px;
    height: 34px;
    background: rgba(58, 17, 23, 0.78);
    border: 1px solid rgba(255, 91, 117, 0.24);
    color: #ff5f72;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.user-panel-page .logout-icon,
.admin-panel-page .logout-icon {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-panel-page .content,
.admin-panel-page .content {
    max-width: calc(var(--content-width) + 220px);
    padding-top: 32px;
}

.user-panel-page .topbar,
.admin-panel-page .topbar {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 4px 0 10px;
}

.user-panel-page .flash,
.admin-panel-page .flash,
.user-panel-page .panel,
.user-panel-page .table-card,
.user-panel-page .control-card,
.user-panel-page .timeline-card,
.user-panel-page .stat-card,
.user-panel-page .mini-panel,
.user-panel-page .flashcard-preview,
.user-panel-page .hero-card,
.user-panel-page .preview-card,
.admin-panel-page .panel,
.admin-panel-page .table-card,
.admin-panel-page .control-card,
.admin-panel-page .timeline-card,
.admin-panel-page .stat-card,
.admin-panel-page .mini-panel,
.admin-panel-page .flashcard-preview,
.admin-panel-page .hero-card,
.admin-panel-page .preview-card {
    background: rgba(16, 20, 28, 0.56);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.admin-panel-page .profile-badge.panel,
.user-panel-page .profile-badge.panel {
    background: rgba(16, 20, 28, 0.56);
}

.user-panel-page h1,
.user-panel-page h2,
.user-panel-page h3,
.admin-panel-page h1,
.admin-panel-page h2,
.admin-panel-page h3,
.user-panel-page strong,
.admin-panel-page strong {
    color: #ffffff;
}

.user-panel-page .muted,
.user-panel-page small,
.user-panel-page label span,
.admin-panel-page .muted,
.admin-panel-page small,
.admin-panel-page label span {
    color: rgba(255, 255, 255, 0.62);
}

.user-panel-page .chip,
.user-panel-page .metric-badge,
.user-panel-page .render-box,
.admin-panel-page .chip,
.admin-panel-page .metric-badge,
.admin-panel-page .render-box {
    background: rgba(21, 26, 36, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
}

.user-panel-page input,
.user-panel-page select,
.user-panel-page textarea,
.admin-panel-page input,
.admin-panel-page select,
.admin-panel-page textarea {
    background: rgba(21, 26, 36, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
}

.user-panel-page input::placeholder,
.user-panel-page textarea::placeholder,
.admin-panel-page input::placeholder,
.admin-panel-page textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.user-panel-page .btn,
.admin-panel-page .btn {
    background: rgba(21, 26, 36, 0.58);
    border: 1px solid rgba(94, 162, 255, 0.12);
    color: #ffffff;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.user-panel-page .btn-primary,
.admin-panel-page .btn-primary {
    background: linear-gradient(135deg, #3f73d6, #5ea2ff);
    border-color: transparent;
    color: #ffffff;
}

.user-panel-page .btn:not(.btn-primary):hover,
.admin-panel-page .btn:not(.btn-primary):hover {
    filter: none;
    background: rgba(31, 38, 52, 0.78);
    color: #ffffff;
}

.user-panel-page .btn-primary:hover,
.admin-panel-page .btn-primary:hover {
    filter: none;
    background: linear-gradient(135deg, #4f82e4, #72b1ff);
    color: #ffffff;
}

.user-panel-page table,
.admin-panel-page table {
    color: #ffffff;
}

.user-panel-page th,
.user-panel-page td,
.admin-panel-page th,
.admin-panel-page td {
    border-bottom-color: rgba(94, 162, 255, 0.1);
}

.user-panel-page th,
.admin-panel-page th {
    color: rgba(255, 255, 255, 0.62);
}

.admin-panel-page .sidebar-wrap,
.user-panel-page .sidebar-wrap {
    display: none;
}

.admin-dashboard-intro {
    margin-bottom: 18px;
    padding: 18px 20px;
}

.admin-dashboard-intro h2 {
    margin-bottom: 8px;
}

.admin-dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
}

.admin-panel-page .stat-card {
    min-height: 92px;
    padding: 14px 16px;
}

.admin-panel-page .stat-card small {
    display: block;
    margin-bottom: 10px;
}

.admin-panel-page .table-card h3 {
    margin-bottom: 14px;
}

.admin-panel-page .action-row {
    flex-wrap: wrap;
    gap: 8px;
}

.admin-panel-page .action-row form {
    margin: 0;
}

.sub-actions-row {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.sub-actions-row .btn-compact {
    min-height: 40px;
    padding: 0 14px;
    line-height: 1.15;
    white-space: nowrap;
    border-radius: 12px;
}

.dashboard-quick-card-caption {
    margin: 6px 0 0;
}

.dashboard-quick-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-quick-card-pill {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(21, 28, 38, 0.78);
    border: 1px solid rgba(94, 162, 255, 0.14);
}

.dashboard-quick-card-pill small {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-quick-card-pill strong {
    display: block;
    margin-top: 6px;
    color: #ffffff;
    font-size: 0.98rem;
}

.dashboard-today-progress {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: rgba(16, 20, 28, 0.56);
    border: 1px solid rgba(94, 162, 255, 0.12);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.dashboard-today-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
}

.dashboard-today-progress-card {
    display: grid;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(21, 28, 38, 0.78);
    border: 1px solid rgba(94, 162, 255, 0.14);
    min-width: 0;
}

.dashboard-today-progress-card small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-today-progress-card strong {
    color: #ffffff;
    font-size: 0.92rem;
    line-height: 1.2;
}

.dashboard-today-progress-card span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    line-height: 1.3;
}

.dashboard-today-progress-note {
    margin: 0;
    text-align: center;
}

.reports-heatmap-card {
    display: grid;
    gap: 14px;
}

.reports-heatmap-grid,
.year-calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.reports-heatmap-cell {
    min-height: 72px;
    padding: 10px 8px;
    border-radius: 14px;
    display: grid;
    align-content: space-between;
    justify-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.reports-heatmap-cell strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
}

.reports-heatmap-cell span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.reports-heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.reports-heatmap-dot {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    display: inline-flex;
}

.reports-heatmap-empty {
    margin: 0;
}

.dashboard-activity-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.desktop-dashboard-note {
    text-align: center;
    font-size: 0.86rem;
}

.compact-summary {
    font-size: 0.9rem;
}

.desktop-editor-shell {
    max-width: 920px;
    margin: 8px auto 0;
}

.desktop-editor-panel {
    padding: 0;
    overflow: hidden;
}

.desktop-editor-toolbar {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #404040;
    flex-wrap: wrap;
}

.desktop-editor-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.desktop-editor-group span {
    color: #d3d3d3;
    font-size: 0.82rem;
}

.desktop-editor-group-wide {
    min-width: 180px;
}

.desktop-editor-group-deck {
    flex: 1;
}

.desktop-card-form {
    padding: 14px;
}

.desktop-select-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.desktop-field-block {
    display: grid;
    gap: 8px;
}

.desktop-field-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e3e3e3;
}

.desktop-editor-bottom {
    display: grid;
    gap: 14px;
}

.desktop-inline-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cards-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.cards-workspace.has-selected-card .cards-detail-panel {
    order: -1;
}

.cards-workspace.has-selected-card .cards-list-panel {
    order: 1;
}

.cards-search-panel {
    margin-bottom: 18px;
}

.cards-search-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.cards-search-field {
    flex: 1;
}

.cards-list-panel,
.cards-detail-panel {
    padding: 0;
    overflow: hidden;
}

.cards-panel-head-table {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.cards-panel-head {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(94, 162, 255, 0.12);
}

.cards-panel-head h3,
.cards-panel-head p {
    margin: 0;
}

.cards-table-wrap {
    padding: 8px 0 0;
}

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

.cards-bulk-count {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    font-weight: 600;
}

.cards-table-check {
    width: 36px;
    text-align: center;
}

.cards-table-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #5ea2ff;
    cursor: pointer;
}

.cards-table {
    min-width: 780px;
}

.cards-table th,
.cards-table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.cards-table th {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

.cards-table-row {
    transition: background 0.18s ease;
}

.cards-table-row:hover,
.cards-table-row.active {
    background: rgba(29, 43, 66, 0.44);
}

.cards-table-question {
    font-weight: 700;
    color: #ffffff;
}

.cards-table td[data-label]::before {
    content: attr(data-label);
    display: none;
}

.mobile-inline-select-trigger,
.mobile-inline-select-menu {
    display: none;
}

.cards-edit-form {
    padding: 16px;
}

.cards-preview-grid {
    margin-top: 2px;
}

.cards-page-head {
    gap: 12px;
}

.cards-action-row,
.cards-delete-form {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.cards-delete-form {
    padding-top: 0;
}

.cards-delete-form .btn {
    width: 100%;
}

.cards-empty-state {
    padding: 20px 14px;
    border-radius: 14px;
    background: rgba(21, 26, 36, 0.42);
    border: 1px dashed rgba(94, 162, 255, 0.16);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.cards-empty-state-wide {
    margin: 16px;
}

.render-box,
.formula-panel,
.flashcard-face,
.alarm-list,
.calendar-box,
.metric-badge {
    background: #3f3f3f;
    border: 1px solid #535353;
    border-radius: 8px;
    padding: 12px;
}

.formula-box {
    padding: 10px 12px;
    margin-top: 8px;
    border-radius: 8px;
    background: #444444;
    border: 1px solid #555555;
    overflow-x: auto;
}

.study-card {
    display: grid;
    gap: 14px;
}

.hidden-answer {
    display: none;
}

.hidden-answer.visible {
    display: block;
}

.category-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    background: #3f3f3f;
    border: 1px solid #515151;
}

.category-color {
    width: 48px;
    height: 5px;
    border-radius: 999px;
}

.compact-card {
    gap: 10px;
}

.compact-start {
    align-items: flex-start;
}

.stack-actions {
    align-items: stretch;
}

.stack-actions form {
    flex: 1 1 120px;
}

.stack-actions .btn {
    width: 100%;
}

.empty-state {
    padding: 14px;
    border-radius: 8px;
    border: 1px dashed #5e5e5e;
    color: #bbbbbb;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    z-index: 70;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-card {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 16px;
    border-radius: 10px;
    background: #3c3c3c;
    border: 1px solid #575757;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal-body {
    display: grid;
    gap: 12px;
}

.dashboard-modal-card {
    width: min(760px, 100%);
}

.dashboard-card-modal {
    width: min(900px, 100%);
}

.study-workspace {
    display: grid;
    gap: 18px;
    min-height: 620px;
}

.study-workspace-card {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 28px 28px;
    border: 1px solid rgba(94, 162, 255, 0.12);
    background: rgba(16, 20, 28, 0.56);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.empty-study-panel {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.study-session-title {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.study-session-title h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
    word-break: break-word;
}

.study-card-stage {
    min-height: 420px;
    display: grid;
    align-content: start;
    gap: 22px;
    padding: 18px 8px 0;
}

.study-question-panel {
    text-align: center;
    padding: 28px 18px 10px;
}

.study-question-panel h1 {
    font-size: 2rem;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
}

.study-answer-panel {
    display: none;
    gap: 18px;
    padding: 0 12px 24px;
    overflow: hidden;
}

.study-answer-panel.visible {
    display: grid;
}

.study-answer-separator {
    height: 1px;
    background: #646464;
}

.study-answer-body {
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    overflow-x: auto;
}

.study-answer-body .katex-display,
.study-question-panel .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.study-reveal-row {
    display: flex;
    justify-content: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.study-reveal-row .btn {
    width: min(100%, 220px);
    min-height: 46px;
    border-radius: 14px;
    font-weight: 700;
}

.study-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.study-tag-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #474747;
    border: 1px solid #5a5a5a;
    color: #d8d8d8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.study-tag-chip:hover {
    background: #5a5a5a;
    color: #fff;
}

.study-tag-chip.tag-gri {
    background: #474747;
    border-color: #5a5a5a;
    color: #d8d8d8;
}

.study-tag-chip.tag-kirmizi {
    background: #5c1a1a;
    border-color: #8b2020;
    color: #ffb8b8;
}

.study-tag-chip.tag-sari {
    background: #4a3c00;
    border-color: #7a6400;
    color: #ffd966;
}

.study-tag-chip.tag-yesil {
    background: #0d3320;
    border-color: #1a5c35;
    color: #7de8a8;
}

.tag-color-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-color-picker input[type="radio"] {
    display: none;
}

.tag-color-btn {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.1s;
}

.tag-color-btn:hover {
    transform: scale(1.15);
}

.tag-color-picker input[type="radio"]:checked + .tag-color-btn {
    border-color: #fff;
    transform: scale(1.2);
}

.tag-color-btn.tag-color-gri   { background: #888; }
.tag-color-btn.tag-color-kirmizi { background: #c0392b; }
.tag-color-btn.tag-color-sari    { background: #d4ac0d; }
.tag-color-btn.tag-color-yesil   { background: #27ae60; }

.study-card-notes {
    margin: 8px auto 0;
    max-width: 600px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #2d2d2d;
    border: 1px solid #3a3a3a;
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.study-quick-tag {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.study-quick-tag-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.study-quick-tag-input {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 0.9rem;
    width: 200px;
}

.study-quick-tag-input:focus {
    outline: none;
    border-color: #666;
}

/* study.php — tag color editor (cards that already have tags) */
.study-tags-editor,
.study-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 0;
}

.study-tags-above-question {
    justify-content: center;
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.tag-color-change-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 5px 8px;
}

.btn-tag-color-save {
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 3px 8px;
    line-height: 1;
    transition: background 0.15s;
}

.btn-tag-color-save:hover {
    background: #4a7a4a;
    border-color: #6a6;
    color: #fff;
}

/* cards.php — structured tag editor */
.field-label-text {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}

.tags-editor-section {
    margin-top: 12px;
}

.tags-editor-label {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tags-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
}

.tag-edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-edit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}

.tag-edit-chip.tag-gri    { background: #666; }
.tag-edit-chip.tag-kirmizi { background: #c0392b; }
.tag-edit-chip.tag-sari   { background: #b8860b; color: #111; }
.tag-edit-chip.tag-yesil  { background: #27ae60; }

.tag-edit-name {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2d2d2d;
    color: #e0e0e0;
    font-size: 0.88rem;
    height: 32px;
    width: auto;
    min-height: unset;
}

.tag-edit-name:focus {
    outline: none;
    border-color: #888;
}

.tag-edit-form select {
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2d2d2d;
    color: #e0e0e0;
    font-size: 0.85rem;
    cursor: pointer;
    height: 32px;
    flex-shrink: 0;
}

.btn-tag-save {
    background: #2a3d2a;
    border: 1px solid #4a7a4a;
    border-radius: 6px;
    color: #8fc88f;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 10px;
    height: 32px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-tag-save:hover {
    background: #3a5a3a;
    color: #aef0ae;
}

.study-decision-row {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 12px;
}

.study-decision-row.visible {
    display: flex;
}

.study-decision-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.study-decision-row .btn,
.study-next-link {
    width: min(100%, 172px);
    min-height: 46px;
    border-radius: 14px;
    font-weight: 700;
}

.study-next-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.study-session-note {
    margin: 0;
}

.study-settings-link {
    white-space: nowrap;
}

.study-settings-page {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.study-settings-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.study-settings-hero-copy {
    max-width: 720px;
}

.study-settings-hero-copy p {
    margin: 10px 0 0;
}

.study-settings-hero-actions,
.study-settings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.study-settings-form-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.study-settings-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.study-settings-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.study-settings-group-head p {
    margin: 8px 0 0;
}

.study-settings-chip,
.study-settings-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(220, 255, 244, 0.16);
    background: rgba(255, 255, 255, 0.05);
}

.study-settings-table-wrap {
    overflow-x: auto;
}

.study-settings-table {
    width: 100%;
}

.study-settings-table td {
    vertical-align: middle;
}

.study-settings-table td[data-label]::before {
    content: attr(data-label);
    display: none;
}

.study-settings-field {
    min-width: 160px;
}

.study-settings-field select {
    min-width: 160px;
}

.study-settings-count-complete {
    color: var(--info);
}

.study-settings-count-postpone {
    color: var(--warning);
}

.study-settings-focus td {
    background: rgba(126, 240, 196, 0.08);
}

.is-hidden {
    display: none !important;
}

.tool-panel-grid {
    display: grid;
    gap: 14px;
}

.dashboard-stats-grid {
    margin-bottom: 14px;
}

.backup-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 16px;
}

.backup-panel {
    min-height: 100%;
}

.backup-panel-wide {
    grid-column: span 3;
}

.backup-chooser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.backup-chooser-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.backup-format-note {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: #363636;
    border: 1px solid #4a4a4a;
}

.three-column {
    display: grid;
}

.calendar-page-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.calendar-note-panel {
    align-self: start;
}

.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.calendar-month-card {
    padding: 10px;
    border-radius: 10px;
    background: #373737;
    border: 1px solid #4a4a4a;
}

.calendar-month-card h4 {
    margin: 0 0 10px;
}

.year-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.calendar-head-cell,
.calendar-empty-cell,
.calendar-day-tile {
    min-height: 42px;
}

.calendar-day-tile {
    display: grid;
    align-content: start;
    padding: 6px;
    border-radius: 8px;
}

.calendar-day-tile strong {
    font-size: 0.82rem;
}

.calendar-day-tile small {
    margin-top: 3px;
    font-size: 0.68rem;
}

.profile-shell {
    display: grid;
    gap: 16px;
}

.profile-card {
    min-height: 100%;
}

.profile-hero-card {
    display: grid;
    gap: 16px;
}

.profile-hero-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar-large {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #5f5f5f;
}

.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #585858;
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-avatar-form {
    display: grid;
    gap: 12px;
}

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

.calendar-cell.has-plan {
    border-color: #78a8e5;
    background: #414a56;
}

.calendar-cell.has-plan small {
    display: block;
    margin-top: 6px;
    color: #d9ebff;
}

.landing-body {
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.landing-shell,
.auth-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hero-card,
.auth-card,
.preview-card {
    background: #3a3a3a;
}

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

@media (max-width: 1080px) {
    .dashboard-hero-grid,
    .dashboard-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-analysis-side,
    .dashboard-summary-strip,
    .dashboard-activity-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content {
        padding-bottom: 110px;
    }

    .sidebar-wrap {
        display: block;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(86vw, var(--sidebar-width));
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        z-index: 40;
    }

    .sidebar-wrap.open {
        transform: translateX(0);
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 35;
    }

    body.sidebar-open .sidebar-scrim {
        display: block;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 14px;
        transform: translateX(-50%);
        width: calc(100% - 24px);
        max-width: 540px;
        padding: 10px;
        display: flex;
        background: linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(12, 17, 27, 0.96));
        border: 1px solid rgba(94, 162, 255, 0.14);
        border-radius: 24px;
        box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        backdrop-filter: blur(16px);
        z-index: 32;
        overflow: visible;
    }

    .mobile-bottom-nav-track {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 8px;
    }

    .mobile-bottom-nav-link,
    .mobile-bottom-nav-menu-trigger {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        gap: 6px;
        min-height: 68px;
        padding: 10px 6px 8px;
        border-radius: 18px;
        color: rgba(227, 235, 248, 0.74);
        font-size: 0.78rem;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        outline: none;
        border: 0;
        background: transparent;
        cursor: pointer;
        list-style: none;
        transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    }

    .mobile-bottom-nav-menu-trigger::-webkit-details-marker {
        display: none;
    }

    .mobile-bottom-nav-menu {
        position: relative;
    }

    .mobile-bottom-nav-submenu {
        position: absolute;
        right: 0;
        bottom: calc(100% + 10px);
        min-width: 144px;
        padding: 6px;
        display: none;
        gap: 4px;
        border-radius: 14px;
        background: rgba(15, 21, 32, 0.96);
        border: 1px solid rgba(94, 162, 255, 0.16);
        box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-submenu {
        display: grid;
    }

    .mobile-bottom-nav-submenu-item {
        min-height: 38px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.82rem;
        font-weight: 700;
        text-decoration: none;
        background: transparent;
    }

    .mobile-bottom-nav-submenu-item:hover {
        background: rgba(31, 38, 52, 0.82);
    }

    .mobile-bottom-nav-submenu-item-danger {
        color: #ffb8c0;
    }

    .mobile-bottom-nav-icon {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        color: currentColor;
        font-size: 1rem;
        line-height: 1;
        background: rgba(255, 255, 255, 0.04);
        transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
    }

    .mobile-bottom-nav-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2.1;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav-label {
        font-size: 0.72rem;
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        letter-spacing: -0.01em;
    }

    .mobile-bottom-nav-link:hover,
    .mobile-bottom-nav-menu-trigger:hover {
        color: #ffffff;
    }

    .mobile-bottom-nav-link.active,
    .mobile-bottom-nav-menu-trigger.active,
    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-menu-trigger {
        color: #ffffff;
        background: linear-gradient(180deg, rgba(54, 106, 198, 0.24), rgba(24, 45, 85, 0.22));
        box-shadow: inset 0 0 0 1px rgba(94, 162, 255, 0.16);
    }

    .mobile-bottom-nav-link.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav-menu-trigger.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-menu-trigger .mobile-bottom-nav-icon {
        background: linear-gradient(180deg, #3f73d6, #5ea2ff);
        color: #ffffff;
        box-shadow: 0 10px 20px rgba(61, 115, 214, 0.24);
        transform: translateY(-1px);
    }

    .mobile-bottom-nav-link.active .mobile-bottom-nav-icon svg,
    .mobile-bottom-nav-menu-trigger.active .mobile-bottom-nav-icon svg,
    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-menu-trigger .mobile-bottom-nav-icon svg {
        width: 21px;
        height: 21px;
    }

    .mobile-bottom-nav-link.active .mobile-bottom-nav-label,
    .mobile-bottom-nav-menu-trigger.active .mobile-bottom-nav-label,
    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-menu-trigger .mobile-bottom-nav-label {
        color: #ffffff;
    }
}

@media (max-width: 780px) {
    .desktop-userbar,
    .desktop-tabs {
        display: none;
    }

    .desktop-brand-link {
        display: none;
    }

    .landing-shell,
    .auth-shell,
    .dashboard-hero-grid,
    .stats-grid,
    .dashboard-top-grid,
    .info-grid,
    .metrics-grid,
    .cards-grid,
    .dashboard-grid,
    .two-column,
    .tool-grid,
    .backup-layout-grid,
    .backup-chooser-grid,
    .backup-chooser-grid-two,
    .dashboard-period-grid,
    .dashboard-period-mini-grid,
    .calendar-page-grid,
    .calendar-year-grid,
    .desktop-select-row,
    .desktop-inline-preview {
        grid-template-columns: 1fr;
    }

    .desktop-appbar {
        padding: 0 10px;
    }

    .desktop-appbar-shell {
        padding: 10px 0 8px;
    }

    .desktop-appbar-inner {
        min-height: 48px;
        justify-content: center;
        gap: 10px;
    }

    .desktop-brand {
        min-width: 0;
        width: 100%;
        justify-content: center;
    }

    .desktop-brand-mark {
        display: none;
    }

    .desktop-brand-name {
        font-size: 1.05rem;
        text-align: center;
    }

    .dashboard-datetime-strip {
        width: 100%;
        min-height: 34px;
        margin-bottom: 12px;
        padding: 0 12px;
        gap: 8px;
        font-size: 0.76rem;
    }

    .dashboard-datetime-date {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-datetime-time {
        flex: 0 0 auto;
    }

    .content {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 20px;
        padding-bottom: 116px;
    }

    .user-dashboard-page .content {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 24px;
    }

    .user-panel-page .content,
    .admin-panel-page .content {
        padding-top: 24px;
    }

    .admin-dashboard-intro {
        margin-bottom: 14px;
        padding: 16px;
    }

    .admin-dashboard-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .topbar-row,
    .list-row,
    .section-head,
    .clock-widget,
    .dashboard-focus-head,
    .dashboard-analysis-head,
    .desktop-editor-toolbar,
    .desktop-dashboard-actions,
    .desktop-editor-actions,
    .action-row,
    .study-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .desktop-dashboard-actions .btn,
    .desktop-editor-actions .btn,
    .action-row .btn,
    .study-actions .btn,
    .stack-actions .btn,
    .study-decision-row .btn {
        width: 100%;
    }

    .desktop-dashboard-shell {
        margin-top: 0;
    }

    .study-decision-row,
    .profile-hero-row,
    .sub-actions-row,
    .study-settings-hero,
    .study-settings-group-head,
    .study-settings-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-panel-page .action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-panel-page .action-row .btn {
        width: 100%;
    }

    .backup-panel-wide {
        grid-column: span 1;
    }

    .user-dashboard-page .dashboard-analysis-panel,
    .user-dashboard-page .desktop-deck-list {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 8px 10px 12px;
        overflow: visible;
    }

    .user-dashboard-page .desktop-deck-table {
        width: 100%;
        table-layout: auto;
    }

    .user-dashboard-page .desktop-deck-table th,
    .user-dashboard-page .desktop-deck-table td {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 0.76rem;
        vertical-align: middle;
    }

    .user-dashboard-page .desktop-deck-table th:first-child,
    .user-dashboard-page .desktop-deck-table td:first-child {
        width: 46%;
        padding-left: 4px;
    }

    .user-dashboard-page .desktop-deck-table th:nth-child(2),
    .user-dashboard-page .desktop-deck-table td:nth-child(2),
    .user-dashboard-page .desktop-deck-table th:nth-child(3),
    .user-dashboard-page .desktop-deck-table td:nth-child(3),
    .user-dashboard-page .desktop-deck-table th:nth-child(4),
    .user-dashboard-page .desktop-deck-table td:nth-child(4) {
        width: 11%;
        text-align: center;
    }

    .user-dashboard-page .desktop-deck-table th:last-child,
    .user-dashboard-page .desktop-deck-table td:last-child {
        width: 21%;
        padding-left: 4px;
        padding-right: 4px;
        position: relative;
        overflow: visible;
    }

    .user-dashboard-page .deck-sub-name {
        padding-left: 8px;
    }

    .user-dashboard-page .deck-sub-link {
        margin-left: 0;
        line-height: 1.35;
        white-space: normal;
        font-size: 0.67rem;
        font-weight: 600;
        max-width: 100%;
        word-break: break-word;
    }

    .user-dashboard-page .sub-actions-row {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .user-dashboard-page .sub-actions-row .btn-compact {
        min-height: 30px;
        padding: 0 6px;
        font-size: 0.58rem;
        white-space: nowrap;
        border-radius: 10px;
        flex: 0 1 auto;
    }

    .user-dashboard-page .sub-actions-row .settings-menu-wrap {
        flex: 0 0 auto;
    }

    .user-dashboard-page .sub-actions-row .btn-info.btn-compact {
        max-width: 66px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-quick-card-meta {
        grid-template-columns: 1fr;
    }

    .dashboard-today-progress-grid {
        grid-template-columns: 1fr;
    }

    .user-dashboard-page .settings-trigger {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        font-size: 0.82rem;
    }

    .user-dashboard-page .desktop-dashboard-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .user-dashboard-page .desktop-dashboard-actions .btn {
        width: auto;
        min-width: 118px;
        padding: 0 14px;
        min-height: 38px;
    }

    .user-dashboard-page .settings-menu-panel {
        top: auto;
        bottom: calc(100% + 8px);
        right: -6px;
        min-width: 138px;
        max-width: calc(100vw - 28px);
    }

    .mobile-bottom-nav {
        width: calc(100% - 18px);
        border-radius: 20px;
    }

    .mobile-bottom-nav-track {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .mobile-bottom-nav-link,
    .mobile-bottom-nav-menu-trigger {
        min-height: 60px;
        padding: 8px 2px 6px;
        gap: 4px;
    }

    .user-panel-page .mobile-bottom-nav,
    .user-dashboard-page .mobile-bottom-nav {
        padding: 8px;
    }

    .user-panel-page .mobile-bottom-nav a,
    .user-dashboard-page .mobile-bottom-nav a,
    .user-panel-page .mobile-bottom-nav .mobile-bottom-nav-menu-trigger,
    .user-dashboard-page .mobile-bottom-nav .mobile-bottom-nav-menu-trigger {
        min-width: 0;
    }

    .mobile-bottom-nav-icon {
        width: 34px;
        height: 34px;
    }

    .mobile-bottom-nav-icon svg {
        width: 19px;
        height: 19px;
    }

    .mobile-bottom-nav-link.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav-menu-trigger.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav-menu[open] .mobile-bottom-nav-menu-trigger .mobile-bottom-nav-icon {
        width: 38px;
        height: 38px;
    }

    .mobile-bottom-nav-label {
        font-size: 0.62rem;
        line-height: 1.1;
        letter-spacing: 0;
    }

    .user-dashboard-page .field select:not([data-mobile-inline-select]),
    .user-dashboard-page .desktop-select-row select:not([data-mobile-inline-select]) {
        position: relative;
        z-index: 1;
        appearance: auto;
        -webkit-appearance: menulist;
        background-image: none;
    }

    .study-workspace-card {
        width: 100%;
        max-width: 100%;
        padding: 18px 12px 22px;
        min-height: auto;
        overflow: hidden;
    }

    .study-session-title h2 {
        font-size: 1.02rem;
        width: 100%;
    }

    .study-question-panel {
        padding: 10px 4px 4px;
    }

    .study-question-panel h1 {
        font-size: 1.22rem;
        line-height: 1.5;
    }

    .study-answer-panel {
        padding: 0 4px 14px;
    }

    .study-answer-body {
        font-size: 1rem;
        line-height: 1.65;
    }

    .study-reveal-row,
    .study-decision-row,
    .study-decision-form {
        flex-direction: column;
        align-items: center;
    }

    .study-reveal-row .btn,
    .study-decision-row .btn,
    .study-next-link {
        width: min(100%, 224px);
        min-height: 44px;
    }

    .study-settings-field,
    .study-settings-field select,
    .study-settings-link {
        width: 100%;
        min-width: 0;
    }

    .study-settings-hero-actions .btn,
    .study-settings-toolbar .btn,
    .study-settings-toolbar .study-settings-summary {
        width: 100%;
    }

    .study-settings-summary {
        text-align: center;
    }

    .study-settings-table-wrap {
        overflow: visible;
    }

    .study-settings-table thead {
        display: none;
    }

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

    .study-settings-table tbody {
        display: grid;
        gap: 12px;
    }

    .study-settings-table tr {
        padding: 12px;
        border-radius: 14px;
        border: 1px solid rgba(94, 162, 255, 0.12);
        background: rgba(17, 24, 35, 0.58);
        overflow: hidden;
    }

    .study-settings-table td {
        padding: 8px 0;
        border-bottom: 1px solid rgba(94, 162, 255, 0.08);
    }

    .study-settings-table td:last-child {
        border-bottom: 0;
    }

    .study-settings-table td[data-label]::before {
        display: block;
        margin-bottom: 5px;
        color: rgba(255, 255, 255, 0.54);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .study-settings-chip {
        align-self: flex-start;
    }

    .cards-search-form,
    .cards-action-row,
    .cards-workspace {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .cards-workspace.has-selected-card {
        display: flex;
        flex-direction: column;
    }

    .cards-workspace.has-selected-card .cards-detail-panel {
        order: -1;
    }

    .cards-workspace.has-selected-card .cards-list-panel {
        order: 1;
    }

    .cards-workspace.has-selected-card .cards-detail-panel {
        order: -1;
    }

    .cards-workspace.has-selected-card .cards-list-panel {
        order: 1;
    }

    .cards-search-form,
    .cards-action-row,
    .cards-delete-form {
        align-items: stretch;
    }

    .cards-search-form .btn,
    .cards-action-row .btn,
    .cards-delete-form .btn {
        width: 100%;
    }

    .cards-panel-head-table {
        align-items: stretch;
        flex-direction: column;
    }

    .cards-page-head {
        align-items: stretch;
    }

    .cards-page-head .chip {
        align-self: flex-start;
        min-height: 30px;
        padding: 0 12px;
    }

    .cards-search-panel {
        margin-bottom: 14px;
    }

    .cards-panel-head,
    .cards-edit-form,
    .cards-action-row,
    .cards-delete-form {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cards-panel-head {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .cards-panel-head h3 {
        font-size: 1rem;
    }

    .cards-panel-head p {
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .cards-edit-form {
        gap: 12px;
    }

    .dashboard-card-modal,
    .dashboard-card-modal .desktop-editor-panel,
    .dashboard-card-modal .desktop-card-form,
    .dashboard-card-modal .field,
    .cards-detail-panel,
    .cards-edit-form,
    .cards-edit-form .field {
        overflow: visible;
    }

    .mobile-inline-select-field {
        position: relative;
    }

    .cards-edit-form .desktop-select-row,
    .dashboard-card-modal .desktop-select-row,
    .cards-preview-grid {
        grid-template-columns: 1fr;
    }

    .user-dashboard-page .mobile-inline-select-field.mobile-inline-enabled select[data-mobile-inline-select][data-mobile-inline-ready="1"],
    .user-panel-page .mobile-inline-select-field.mobile-inline-enabled select[data-mobile-inline-select][data-mobile-inline-ready="1"] {
        position: absolute !important;
        inset: 0 !important;
        width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .user-dashboard-page .mobile-inline-select-field.mobile-inline-enabled .mobile-inline-select-trigger,
    .user-panel-page .mobile-inline-select-field.mobile-inline-enabled .mobile-inline-select-trigger {
        display: flex;
        width: 100%;
        min-height: 42px;
        padding: 0 14px;
        align-items: center;
        justify-content: space-between;
        border-radius: 10px;
        background: rgba(21, 26, 36, 0.58);
        border: 1px solid rgba(94, 162, 255, 0.12);
        color: #ffffff;
        text-align: left;
    }

    .mobile-inline-select-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-inline-select-arrow {
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.9rem;
        flex: 0 0 auto;
        margin-left: 10px;
    }

    .mobile-inline-select-menu {
        display: none;
        position: static;
        width: 100%;
        margin-top: 6px;
        padding: 6px;
        border-radius: 12px;
        background: rgba(12, 17, 25, 0.98);
        border: 1px solid rgba(94, 162, 255, 0.18);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
    }

    .user-dashboard-page .mobile-inline-select-field.mobile-inline-enabled.is-open .mobile-inline-select-menu,
    .user-panel-page .mobile-inline-select-field.mobile-inline-enabled.is-open .mobile-inline-select-menu {
        display: grid;
        gap: 4px;
    }

    .mobile-inline-select-option {
        width: 100%;
        min-height: 38px;
        padding: 0 12px;
        border-radius: 9px;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.84);
        text-align: left;
    }

    .mobile-inline-select-option.active {
        background: linear-gradient(135deg, #3f73d6, #5ea2ff);
        color: #ffffff;
    }

    .cards-edit-form .desktop-editor-textarea {
        min-height: 96px;
    }

    .cards-preview-grid {
        display: none;
    }

    .cards-action-row {
        padding-top: 4px;
    }

    .cards-delete-form {
        padding-bottom: 18px;
    }

    .cards-table {
        min-width: 100%;
    }

    .cards-table thead {
        display: none;
    }

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

    .cards-table-wrap {
        padding: 12px;
    }

    .cards-table-row {
        border: 1px solid rgba(94, 162, 255, 0.12);
        border-radius: 14px;
        background: rgba(17, 24, 35, 0.58);
        overflow: hidden;
    }

    .cards-table-row + .cards-table-row {
        margin-top: 10px;
    }

    .cards-table td {
        padding: 9px 12px;
        border-bottom: 1px solid rgba(94, 162, 255, 0.08);
    }

    .cards-table td:last-child {
        border-bottom: 0;
    }

    .cards-table td[data-label]::before {
        display: block;
        margin-bottom: 5px;
        color: rgba(255, 255, 255, 0.54);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .cards-table-question {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .cards-empty-state,
    .cards-empty-state-wide {
        margin: 12px;
        padding: 16px 12px;
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .cards-table td .btn {
        width: 100%;
    }

    .dashboard-search-form {
        min-width: 100%;
    }

    .dashboard-analysis-side,
    .dashboard-summary-strip,
    .dashboard-activity-footer {
        min-width: 100%;
        grid-template-columns: 1fr;
    }

    .reports-heatmap-grid,
    .year-calendar-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .reports-heatmap-cell {
        min-height: 64px;
        padding: 8px 6px;
    }

    .reports-heatmap-cell strong {
        font-size: 0.92rem;
    }

    .reports-heatmap-cell span {
        font-size: 0.7rem;
    }

    .reports-heatmap-legend {
        justify-content: center;
        flex-wrap: wrap;
    }

    .dashboard-hero-card {
        padding: 18px;
    }

    .dashboard-hero-meta {
        justify-items: start;
    }

    .dashboard-focus-card,
    .dashboard-analysis-panel {
        padding: 16px;
    }

    .dashboard-filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .dashboard-filter-pill {
        white-space: nowrap;
    }

    .dashboard-hero-card,
    .dashboard-focus-card,
    .dashboard-analysis-panel,
    .user-dashboard-page .desktop-deck-list,
    .dashboard-stat-card {
        border-radius: 14px;
    }
}

/* =============================================
   YILDIZ (ÖNEMLI) BUTONU — app.css sonuna ekle
   ============================================= */

/* Satır içi yıldız göstergesi (deck-sub-name içinde) */
.sub-star-badge {
    color: #f5a623;
    font-size: .85rem;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Yıldız toggle butonu (sub-actions-row içinde) */
.btn-star {
    background: transparent;
    border: 1px solid var(--border, #3a3a4a);
    color: var(--text-muted, #888);
    font-size: .9rem;
    padding: 2px 7px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    transition: color .15s, background .15s, border-color .15s;
}

.btn-star:hover {
    color: #f5a623;
    border-color: #f5a623;
    background: rgba(245, 166, 35, .07);
}

.btn-star.is-starred {
    color: #f5a623;
    border-color: #f5a623;
    background: rgba(245, 166, 35, .12);
}

.btn-star.is-starred:hover {
    color: var(--text-muted, #888);
    border-color: var(--border, #3a3a4a);
    background: transparent;
}
/* Tablo sarmalayicilarinin mobilde yatay kaydirilabilir olmasi (daha once hic tanimlanmamisti) */
.ps-block-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 780px) {
    .dashboard-today-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trash-table th, .trash-table td {
        padding: .45rem .4rem;
        font-size: .78rem;
    }

    .trash-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .trash-actions-bar .btn {
        width: 100%;
    }
}

/* Kart onizlemesi: cevaptaki satir bosluklarini (Enter) aynen goster */
.render-box {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Soru duzenlemede cevap kutusu daha uzun olsun */
textarea.desktop-editor-textarea[name="answer"] {
    min-height: 260px;
}
