/* ===== Category Select & Filter UI ===== */
.form-group select,
.category-filter select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.2s;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-group select:focus,
.category-filter select:focus {
    outline: none;
    border-color: var(--primary);
}

.category-filter {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-filter label {
    font-weight: 600;
    color: var(--text-muted);
}

.category-filter .btn-link {
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: color 0.2s;
}
.category-filter .btn-link:hover {
    color: var(--primary-dark);
}
/* ===== Categories UI ===== */
.categories-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.categories-table th,
.categories-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.categories-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.categories-table tr:hover {
    background: var(--bg);
}

.category-form {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.category-form input[type="text"] {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.category-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.categories-table input[type="text"] {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s;
}

.categories-table input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.categories-table .btn,
.category-form .btn {
    margin-left: 0.5rem;
}

.categories-table .btn-danger {
    margin-left: 0.25rem;
}

.categories-table .btn[disabled],
.categories-table input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

.categories-table form.inline-form {
    display: inline;
}

.categories-table td {
    vertical-align: middle;
}

/* ===== CSS Variables (Notion-Inspired Clean Theme) ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    
    --forgot: #ef4444;
    --hard: #f59e0b;
    --good: #10b981;
    --easy: #06b6d4;
    
    --bg: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #f7f7f5;
    --bg-hover: rgba(55, 53, 47, 0.06);
    --bg-active: rgba(55, 53, 47, 0.1);
    
    --text: #37352f;
    --text-main: #1e293b;
    --text-muted: #787774;
    --border: rgba(55, 53, 47, 0.12);
    
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 8px;
    --radius-sm: 6px;

    /* ===== Central Typography Scale Tokens ===== */
    --font-xs: 0.75rem;       /* 12px - Micro badges, tiny tags, chevrons, count badges */
    --font-sm: 0.8125rem;     /* 13px - Secondary metadata, table headers, compact badges, action labels */
    --font-md: 0.875rem;      /* 14px - Primary UI text: table row previews, search inputs, list items, tabs, toolbar text */
    --font-base: 0.9375rem;   /* 15px - Body copy, subtitles, large UI labels */
    --font-lg: 1.0625rem;     /* 17px - Card headers, section subheadings */
    --font-xl: 1.25rem;       /* 20px - Section titles, modal titles, card titles */
    --font-2xl: 1.5rem;       /* 24px - Page main titles (h1 on notion layout) */
    --font-3xl: 1.875rem;     /* 30px - Large display titles */

    /* Typography Weights */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* ===== Sidebar Typography & Sizing Scale Tokens (Step 0: Normal / Varsayılan) ===== */
    --sidebar-default-width: 250px;
    --sidebar-width: var(--sidebar-default-width, 250px);
    --sidebar-font-size-base: 0.9375rem;
    --sidebar-font-size-title: 0.9375rem;
    --sidebar-font-size-tag: 0.6875rem;
    --sidebar-font-size-section: var(--font-xs, 0.75rem);
    --sidebar-font-size-xs: var(--font-xs, 0.75rem);
    --sidebar-font-size-user: 0.9375rem;
    --sidebar-row-height: 31px;
    --sidebar-icon-size: 1.05rem;
    --sidebar-tree-icon-size: 15.5px;

    /* ===== List & Table Typography Scale Tokens (Inherits Sidebar Reference) ===== */
    --list-font-size-base: var(--sidebar-font-size-base, 0.9375rem);
    --list-font-size-preview: var(--sidebar-font-size-base, 0.9375rem);
    --list-font-size-header: var(--font-sm, 0.8125rem);
    --list-font-size-meta: var(--font-sm, 0.8125rem);
    --list-font-size-tag: var(--font-xs, 0.75rem);
    --list-line-height: 1.45;

    /* ===== Note Typography Scale Tokens (Step 0: Normal / Varsayılan) ===== */
    --note-font-size-base: 1.05rem;
    --note-line-height: 1.75;
    --note-font-size-hint: 0.95rem;
    --note-heading-1: 1.6rem;
    --note-heading-2: 1.35rem;
    --note-heading-3: 1.15rem;
}

/* ===== Sidebar Font Scale Steps (Kullanıcı Bazlı) ===== */
body[data-sidebar-font-size="normal"],
body[data-sidebar-font-size="0"] {
    --sidebar-default-width: 250px;
    --sidebar-font-size-base: 0.9375rem;
    --sidebar-font-size-title: 0.9375rem;
    --sidebar-font-size-tag: 0.6875rem;
    --sidebar-font-size-section: var(--font-xs, 0.75rem);
    --sidebar-font-size-xs: var(--font-xs, 0.75rem);
    --sidebar-font-size-user: 0.9375rem;
    --sidebar-row-height: 31px;
    --sidebar-icon-size: 1.05rem;
    --sidebar-tree-icon-size: 15.5px;
    --list-font-size-base: 0.9375rem;
    --list-font-size-preview: 0.9375rem;
    --list-font-size-header: var(--font-sm, 0.8125rem);
    --list-font-size-meta: var(--font-sm, 0.8125rem);
    --list-font-size-tag: var(--font-xs, 0.75rem);
}

/* Step 1: Büyük (+1 Kademe / 1 Tık) */
body[data-sidebar-font-size="large"],
body[data-sidebar-font-size="1"] {
    --sidebar-default-width: 275px;
    --sidebar-font-size-base: 1.05rem;
    --sidebar-font-size-title: 1.0625rem;
    --sidebar-font-size-tag: var(--font-xs, 0.75rem);
    --sidebar-font-size-section: var(--font-sm, 0.8125rem);
    --sidebar-font-size-xs: var(--font-sm, 0.8125rem);
    --sidebar-font-size-user: 1.05rem;
    --sidebar-row-height: 35px;
    --sidebar-icon-size: 1.18rem;
    --sidebar-tree-icon-size: 17.5px;
    --list-font-size-base: 1.05rem;
    --list-font-size-preview: 1.05rem;
    --list-font-size-header: 0.875rem;
    --list-font-size-meta: 0.875rem;
    --list-font-size-tag: 0.8125rem;
}

/* Step 2: Çok Büyük (+2 Kademe / 2 Tık) */
body[data-sidebar-font-size="xlarge"],
body[data-sidebar-font-size="2"] {
    --sidebar-default-width: 295px;
    --sidebar-font-size-base: 1.1875rem;
    --sidebar-font-size-title: 1.1875rem;
    --sidebar-font-size-tag: var(--font-sm, 0.8125rem);
    --sidebar-font-size-section: var(--font-md, 0.875rem);
    --sidebar-font-size-xs: var(--font-md, 0.875rem);
    --sidebar-font-size-user: 1.1875rem;
    --sidebar-row-height: 39px;
    --sidebar-icon-size: 1.3rem;
    --sidebar-tree-icon-size: 19.5px;
    --list-font-size-base: 1.1875rem;
    --list-font-size-preview: 1.1875rem;
    --list-font-size-header: 0.9375rem;
    --list-font-size-meta: 0.9375rem;
    --list-font-size-tag: 0.875rem;
}

/* ===== Note Text Font Scale Steps (Kullanıcı Bazlı) ===== */
body[data-note-font-size="normal"],
body[data-note-font-size="0"] {
    --note-font-size-base: 1.05rem;
    --note-line-height: 1.75;
    --note-font-size-hint: 0.95rem;
    --note-heading-1: 1.6rem;
    --note-heading-2: 1.35rem;
    --note-heading-3: 1.15rem;
}

/* Step 1: Büyük (+1 Kademe / 1 Tık) */
body[data-note-font-size="large"],
body[data-note-font-size="1"] {
    --note-font-size-base: 1.22rem;
    --note-line-height: 1.8;
    --note-font-size-hint: 1.08rem;
    --note-heading-1: 1.82rem;
    --note-heading-2: 1.52rem;
    --note-heading-3: 1.28rem;
}

/* Step 2: Çok Büyük (+2 Kademe / 2 Tık) */
body[data-note-font-size="xlarge"],
body[data-note-font-size="2"] {
    --note-font-size-base: 1.4rem;
    --note-line-height: 1.85;
    --note-font-size-hint: 1.22rem;
    --note-heading-1: 2.05rem;
    --note-heading-2: 1.72rem;
    --note-heading-3: 1.42rem;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    height: 100%;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    width: 100vw;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Notion Split-Screen Layout ===== */
.notion-layout {
    display: flex;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--bg);
    position: relative;
    box-sizing: border-box;
}

/* Left Sidebar */
.notion-sidebar {
    width: var(--sidebar-width, 250px);
    min-width: 180px;
    max-width: 450px;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    user-select: none;
    z-index: 100;
    position: relative;
    box-sizing: border-box;
    transition: width 0.22s cubic-bezier(0.2, 0, 0.2, 1),
                opacity 0.15s ease,
                visibility 0.22s ease;
}

/* Disable transitions during drag resize for peak performance */
body.is-resizing-sidebar .notion-sidebar {
    transition: none !important;
    user-select: none !important;
}

body.is-resizing-sidebar {
    cursor: col-resize !important;
    user-select: none !important;
}

body.is-resizing-sidebar * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Collapsed Sidebar State */
.notion-layout.sidebar-collapsed .notion-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    border-right: none !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* Draggable Sidebar Resizer Splitter */
.notion-sidebar-resizer {
    position: absolute;
    top: 0;
    right: -6px;
    width: 12px;
    height: 100%;
    cursor: col-resize;
    z-index: 500;
    background: transparent;
    transition: background 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.notion-sidebar-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 5px;
    width: 2px;
    height: 100%;
    background: transparent;
    transition: background 0.15s ease;
    pointer-events: none;
}

.notion-sidebar-resizer:hover::after,
.notion-sidebar-resizer.is-dragging::after {
    background: var(--primary, #6366f1);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
}

.notion-layout.sidebar-collapsed .notion-sidebar-resizer {
    display: none !important;
}

.notion-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem 0.35rem 0.6rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.06);
    flex-shrink: 0;
    min-height: calc(var(--sidebar-row-height, 29px) + 9px);
    gap: 0.25rem;
}

.notion-workspace-switcher-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}

.notion-workspace-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text);
    border: none;
    background: none;
    border-radius: 6px;
    padding: 0.25rem 0.45rem;
    transition: background 0.12s;
    flex: 1;
    min-width: 0;
    min-height: var(--sidebar-row-height, 29px);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.notion-workspace-btn:hover {
    background: var(--bg-hover);
}

.notion-workspace-icon {
    font-size: calc(var(--sidebar-icon-size, 1rem) + 0.15rem);
    line-height: 1;
    flex-shrink: 0;
}

.notion-workspace-info {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}

.notion-workspace-name {
    font-weight: 600;
    font-size: var(--sidebar-font-size-title, 0.88rem);
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.notion-workspace-tag {
    font-size: var(--sidebar-font-size-tag, 0.65rem);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notion-workspace-caret {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.notion-workspace-btn:hover .notion-workspace-caret {
    opacity: 1;
    color: var(--text);
}

/* Notion Style Workspace Switcher Dropdown */
.notion-workspace-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 270px;
    max-width: 320px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 53, 47, 0.14));
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0.4rem 0;
    animation: wsDropdownSlide 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ws-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.85rem;
}

.ws-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ws-user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ws-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-dropdown-divider {
    height: 1px;
    background: var(--border, rgba(55, 53, 47, 0.08));
    margin: 0.35rem 0;
}

.ws-dropdown-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 0.35rem 0.85rem 0.2rem 0.85rem;
    text-transform: uppercase;
}

.ws-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.15rem 0.35rem;
}

.ws-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
    color: var(--text);
    position: relative;
}

.ws-item:hover {
    background: var(--bg-hover, rgba(55, 53, 47, 0.06));
}

.ws-item.active {
    background: var(--bg-hover, rgba(55, 53, 47, 0.09));
    font-weight: 600;
}

.ws-item-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1;
}

.ws-item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.ws-item-name {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ws-item-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.ws-item-check {
    font-size: 1rem;
    color: #2383e2;
    font-weight: 700;
}

.ws-item-settings-trigger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
}

.ws-item:hover .ws-item-settings-trigger,
.ws-item-settings-trigger:focus {
    opacity: 0.75;
}

.ws-item-settings-trigger:hover {
    opacity: 1 !important;
    background: rgba(55, 53, 47, 0.12);
    color: var(--text);
}

.ws-item-settings-trigger .material-symbols-outlined {
    font-size: 1.05rem;
}

.ws-dropdown-actions {
    padding: 0.2rem 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ws-action-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 0.84rem;
    color: var(--text);
    transition: background 0.12s;
    font-family: inherit;
}

.ws-action-btn:hover {
    background: var(--bg-hover, rgba(55, 53, 47, 0.06));
}

.ws-action-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Sidebar Collapse Button */
.notion-sidebar-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.notion-sidebar-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.notion-sidebar-collapse-btn .material-symbols-outlined {
    font-size: 1.15rem;
    line-height: 1;
}

.notion-sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
}

/* Desktop Expand Button (Topbar) */
.notion-desktop-expand-btn {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.45rem;
    margin-right: 0.75rem;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

.notion-desktop-expand-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.25);
}

.notion-desktop-expand-btn .material-symbols-outlined {
    font-size: 1.15rem;
    line-height: 1;
}

.notion-layout.sidebar-collapsed .notion-desktop-expand-btn {
    display: inline-flex !important;
}

/* Notion Quick Action Button (+ Yeni Not) */
.notion-sidebar-quick-action {
    padding: 0.45rem 0.5rem 0.25rem 0.5rem;
    flex-shrink: 0;
}

.notion-quick-new-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0 0.55rem;
    height: calc(var(--sidebar-row-height, 29px) + 3px);
    background: rgba(35, 131, 226, 0.08);
    border: 1px solid rgba(35, 131, 226, 0.25);
    color: var(--primary, #2383e2);
    border-radius: 6px;
    font-size: var(--sidebar-font-size-base, 13.5px);
    font-weight: 500;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.notion-quick-new-btn:hover {
    background: rgba(35, 131, 226, 0.15);
    border-color: rgba(35, 131, 226, 0.4);
    color: var(--primary, #2383e2);
    transform: translateY(-0.5px);
}

.notion-quick-btn-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.notion-quick-btn-label {
    flex: 1;
    font-weight: 600;
}

.notion-quick-kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.6875rem;
    font-family: inherit;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(35, 131, 226, 0.2);
    border-radius: 4px;
    color: var(--primary, #2383e2);
    line-height: 1;
}

/* Main Navigation */
.notion-sidebar-nav {
    padding: 0.35rem 0.4rem 0.25rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(55, 53, 47, 0.06);
}

.notion-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.45rem;
    height: var(--sidebar-row-height, 29px);
    min-height: var(--sidebar-row-height, 29px);
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    font-size: var(--sidebar-font-size-base, 13.5px);
    font-weight: 400;
    transition: background 0.12s, color 0.12s;
    line-height: 1.25;
}

.notion-nav-item:hover {
    background: var(--bg-hover);
}

.notion-nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 500;
    color: var(--primary);
}

.notion-nav-icon {
    font-size: var(--sidebar-icon-size, 1rem);
    line-height: 1;
    flex-shrink: 0;
    width: calc(var(--sidebar-icon-size, 1rem) + 4px);
    text-align: center;
}

.notion-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notion-badge {
    font-size: var(--sidebar-font-size-xs, 11px);
    font-weight: 600;
    padding: 0 5px;
    height: calc(var(--sidebar-font-size-xs, 11px) + 6px);
    line-height: calc(var(--sidebar-font-size-xs, 11px) + 6px);
    border-radius: 4px;
}

.notion-badge-due {
    background: #ef4444;
    color: #ffffff;
}

/* Categories Section */
.notion-sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.notion-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem 0.2rem 0.6rem;
    flex-shrink: 0;
}

.notion-section-title {
    font-size: var(--sidebar-font-size-section, 11px);
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.notion-section-actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.notion-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--sidebar-font-size-section, 11px);
    color: var(--text-muted);
    width: calc(var(--sidebar-font-size-section, 11px) + 9px);
    height: calc(var(--sidebar-font-size-section, 11px) + 9px);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    line-height: 1;
}

.notion-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.sidebar-quick-add-bar {
    display: none;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    background: rgba(99, 102, 241, 0.03);
    flex-shrink: 0;
}

.sidebar-quick-add-bar.open {
    display: block;
}

.sidebar-quick-add-bar .cat-quick-add-form {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.sidebar-quick-add-bar .cat-quick-add-input {
    flex: 1;
    padding: 0.2rem 0.45rem;
    font-size: var(--sidebar-font-size-base, 13.5px);
    height: calc(var(--sidebar-row-height, 29px) - 2px);
    border: 1px solid rgba(55, 53, 47, 0.15);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text);
}

.sidebar-quick-add-bar .cat-quick-add-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Category Tree Container */
.notion-tree-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0.4rem 1.5rem 0.4rem;
    -webkit-overflow-scrolling: touch;
}

.notion-tree-container::-webkit-scrollbar {
    width: 4px;
}

.notion-tree-container::-webkit-scrollbar-thumb {
    background: rgba(55, 53, 47, 0.15);
    border-radius: 4px;
}

/* Bottom Utility Navigation (İçerik Al & Çöp Kutusu) */
.notion-sidebar-utility {
    padding: 0.35rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    border-top: 1px solid rgba(55, 53, 47, 0.07);
    background: var(--bg-sidebar);
}

/* User Card at Bottom of Sidebar */
.notion-sidebar-user {
    position: relative;
    padding: 0.3rem 0.45rem;
    border-top: 1px solid rgba(55, 53, 47, 0.08);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    z-index: 105;
    box-sizing: border-box;
}

.notion-user-summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.4rem;
    height: calc(var(--sidebar-row-height, 29px) + 4px);
    border-radius: 4px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.12s;
}

@media (hover: hover) and (pointer: fine) {
    .notion-user-summary:hover {
        background: var(--bg-hover);
    }
}

.notion-user-summary:active {
    background: var(--bg-hover);
}

.notion-user-avatar {
    width: calc(var(--sidebar-font-size-user, 13px) + 8px);
    height: calc(var(--sidebar-font-size-user, 13px) + 8px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(55, 53, 47, 0.08);
    font-size: calc(var(--sidebar-font-size-user, 13px) - 3px);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notion-user-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.notion-user-name {
    font-size: var(--sidebar-font-size-user, 13px);
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notion-user-more {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

.notion-user-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0.5rem;
    right: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08);
    z-index: 1100;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.3rem 0;
}

.notion-user-menu.show {
    display: block;
}

.notion-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    min-height: 38px;
    color: var(--text);
    text-decoration: none;
    font-size: var(--sidebar-font-size-base, 13.5px);
    border: none;
    outline: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease;
    box-sizing: border-box;
    border-radius: 4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .notion-user-menu-item:hover {
        background: var(--bg-hover);
    }
}

.notion-user-menu-item:active {
    background: var(--bg-hover);
}

.notion-user-menu-item.admin-link {
    color: #7c3aed;
    font-weight: 600;
}

/* Right Main Container */
.notion-main-container {
    flex: 1;
    min-width: 0;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    box-sizing: border-box;
}

.notion-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 2rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    background: var(--bg);
    flex-shrink: 0;
    z-index: 10;
    min-height: 44px;
    box-sizing: border-box;
    gap: 1rem;
}

.notion-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}

.notion-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.notion-topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--font-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-root {
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb-current {
    font-weight: 600;
    color: var(--text);
}

.notion-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 30px;
    padding: 0 0.65rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

.topbar-search-btn {
    background: rgba(55, 53, 47, 0.04);
    border: 1px solid rgba(55, 53, 47, 0.12);
    color: var(--text-muted);
}

.topbar-search-btn:hover {
    background: rgba(55, 53, 47, 0.08);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.22);
}

.topbar-search-btn .material-symbols-outlined {
    font-size: 1.05rem;
    line-height: 1;
}

.topbar-kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.6875rem;
    font-family: inherit;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    color: var(--text-muted);
    line-height: 1;
    margin-left: 0.25rem;
}

.topbar-new-btn {
    background: var(--primary, #2383e2);
    border: 1px solid var(--primary, #2383e2);
    color: #ffffff;
    font-weight: 500;
}

.topbar-new-btn:hover {
    filter: brightness(1.08);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(35, 131, 226, 0.35);
}

.topbar-new-btn .material-symbols-outlined {
    font-size: 1.15rem;
    line-height: 1;
}

@media (max-width: 640px) {
    .notion-topbar {
        padding: 0.4rem 1rem;
    }
    .topbar-btn-text,
    .topbar-kbd {
        display: none !important;
    }
    .topbar-btn {
        padding: 0 0.45rem;
    }
}

.notion-flash-container {
    padding: 0.75rem 2.25rem 0 2.25rem;
    max-width: 100%;
    width: 100%;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.notion-flash-container:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.notion-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 2.25rem 3rem 2.25rem;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* ===== Notion Auth (Login & Register) ===== */
.notion-auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--bg-sidebar);
    box-sizing: border-box;
}

.notion-auth-box {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 12px;
    padding: 1.6rem 1.6rem 1.25rem 1.6rem;
    box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.05), 0 2px 8px -2px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notion-auth-box .alert {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.85rem;
    font-size: var(--font-sm);
    line-height: 1.4;
    box-sizing: border-box;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-brand-badge {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.45rem;
    border-radius: 10px;
    background: #f0f4ff;
    border: 1px solid rgba(99, 102, 241, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
}

.auth-heading {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.2rem 0;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.auth-subheading {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

/* Social SSO (Google) */
.auth-social-wrap {
    margin-bottom: 0.75rem;
    width: 100%;
}

.btn-google-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    height: 38px;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.18);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-google-sso:hover {
    background: #fbfbfa;
    border-color: rgba(55, 53, 47, 0.28);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-google-sso:active {
    background: #f2f2f0;
    transform: translateY(0);
    box-shadow: none;
}

.btn-google-sso .google-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.7rem 0 0.85rem 0;
    color: #9b9a97;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    width: 100%;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(55, 53, 47, 0.12);
}

.auth-divider span {
    padding: 0 0.75rem;
    background: transparent;
}

/* Auth Form & Inputs */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 100%;
    box-sizing: border-box;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.auth-label {
    font-size: 0.78125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: block;
    line-height: 1.2;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-label-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.auth-input,
.form-control {
    width: 100%;
    height: 38px;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.18);
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.auth-input-with-icon {
    padding-left: 2.15rem !important;
}

.auth-input-with-toggle {
    padding-right: 2.35rem !important;
}

.auth-input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
    background: #ffffff;
}

.auth-input::placeholder,
.form-control::placeholder {
    color: #9b9a97;
    opacity: 0.85;
    font-size: 0.8125rem;
}

/* Icon inside input */
.auth-input-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.05rem;
    color: #9b9a97;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Password Toggle Eye Button */
.auth-pw-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #787774;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    line-height: 1;
}

.auth-pw-toggle:hover {
    color: var(--text);
    background: rgba(55, 53, 47, 0.08);
}

.auth-pw-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* Primary Auth Submit Button */
.btn-auth-submit,
.btn-block {
    width: 100%;
    height: 38px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.25);
    margin-top: 0.2rem;
    box-sizing: border-box;
    text-decoration: none;
}

.btn-auth-submit:hover,
.btn-block:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.btn-auth-submit:active,
.btn-block:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}

.btn-auth-submit .btn-arrow {
    font-size: 1.05rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.btn-auth-submit:hover .btn-arrow {
    transform: translateX(3px);
}

/* Auth Footer */
.auth-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(55, 53, 47, 0.08);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    width: 100%;
    box-sizing: border-box;
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.35rem;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive adjustment for auth box on mobile */
@media (max-width: 480px) {
    .notion-auth-wrapper {
        padding: 0.75rem 0.5rem;
    }

    .notion-auth-box {
        padding: 1.25rem 1.15rem 0.95rem 1.15rem;
        border-radius: 10px;
        max-width: 100%;
    }

    .auth-brand-badge {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        margin-bottom: 0.35rem;
    }

    .auth-heading {
        font-size: 1.1rem;
    }
}

/* Mobile Drawer Responsive */
@media (max-width: 768px) {
    .notion-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        width: 280px !important;
        max-width: 85vw !important;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 0 0 30px rgba(0,0,0,0.2);
        box-sizing: border-box;
    }

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

    .notion-sidebar-close-btn {
        display: block;
    }

    .notion-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

    .notion-sidebar-backdrop.open,
    .notion-sidebar-backdrop.show {
        display: block;
    }

    .notion-mobile-toggle {
        display: block;
    }

    .notion-topbar {
        padding: 0.6rem 1rem;
    }

    .notion-content-area {
        padding: 0 1rem 2rem 1rem;
    }

    .notion-flash-container {
        padding: 0.5rem 1rem 0 1rem;
    }

    .notion-sidebar-user {
        padding-bottom: max(0.3rem, env(safe-area-inset-bottom, 0px));
    }
}

/* ===== Page Header ===== */
.page-header {
    padding-top: 1.25rem;
    margin-bottom: 1.75rem;
    text-align: left;
}

.page-header h1 {
    font-size: var(--font-2xl);
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
    text-align: left;
}

.subtitle {
    color: var(--text-muted);
    font-size: var(--font-base);
    text-align: left;
    line-height: 1.45;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-number.highlight {
    color: var(--danger);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #e0e7ff;
    color: #3730a3;
    border-left: 4px solid var(--primary);
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== Forms ===== */
.note-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    text-align: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

/* Review Buttons */
.btn-forgot {
    background: var(--forgot);
    color: white;
}

.btn-hard {
    background: var(--hard);
    color: white;
}

.btn-good {
    background: var(--good);
    color: white;
}

.btn-easy {
    background: var(--easy);
    color: white;
}

.btn-forgot:hover { filter: brightness(0.9); }
.btn-hard:hover { filter: brightness(0.9); }
.btn-good:hover { filter: brightness(0.9); }
.btn-easy:hover { filter: brightness(0.9); }

/* ===== Info Box ===== */
.info-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e0e7ff;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.info-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.info-box ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* ===== Cards ===== */
.cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.review-card {
    border-left: 4px solid var(--primary);
}

.card-content {
    padding: 1.5rem;
}

.note-text {
    font-size: var(--note-font-size-base, 1.05rem);
    line-height: var(--note-line-height, 1.75);
    margin-bottom: 1rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hint-text {
    font-size: var(--note-font-size-hint, 0.95rem);
    line-height: calc(var(--note-line-height, 1.75) * 0.95);
}

.note-text p,
.hint-text p {
    margin: 0 0 0.75rem;
}

.note-text p:last-child,
.hint-text p:last-child {
    margin-bottom: 0;
}

.note-text a,
.hint-text a,
.note-content-preview {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.note-text img,
.hint-text img {
    max-width: 100%;
    height: auto;
}

.note-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-actions {
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.action-label {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.review-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== Upcoming Section ===== */
.upcoming-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.upcoming-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.upcoming-time {
    min-width: 120px;
    font-weight: 600;
    color: var(--primary);
}

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

/* ===== Legend ===== */
.legend {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legend h3 {
    margin-bottom: 1rem;
}

.legend-items {
    display: grid;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    min-width: 80px;
    text-align: center;
}

.legend-badge.forgot { background: var(--forgot); }
.legend-badge.hard { background: var(--hard); }
.legend-badge.good { background: var(--good); }
.legend-badge.easy { background: var(--easy); }

/* ===== Review Section ===== */
.review-section h2 {
    margin-bottom: 1.5rem;
}

/* ===== Notion-Inspired Table (All Notes) ===== */
.notes-table-container {
    width: 100%;
    overflow: visible;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(55, 53, 47, 0.09);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    min-height: 180px;
    position: relative;
}

.notes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--list-font-size-base, 0.9375rem);
    text-align: left;
}

.notes-table th {
    background: rgba(247, 247, 245, 0.85);
    padding: 0.52rem 0.75rem;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--text-muted);
    font-size: var(--list-font-size-header, 0.8125rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
    border-right: 1px solid rgba(55, 53, 47, 0.05);
    white-space: nowrap;
    user-select: none;
    height: 36px;
}

.notes-table th:last-child {
    border-right: none;
}

.notes-table td {
    padding: 0.58rem 0.75rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.06);
    border-right: 1px solid rgba(55, 53, 47, 0.04);
    vertical-align: middle;
    color: var(--text);
    font-size: var(--list-font-size-base, 0.9375rem);
    transition: background-color 0.12s ease;
}

.notes-table td:last-child {
    border-right: none;
}

.notes-table tbody tr:last-child td {
    border-bottom: none;
}

.notes-table tbody tr {
    background: #ffffff;
    transition: background-color 0.12s ease;
}

.notes-table tbody tr:hover {
    background: rgba(55, 53, 47, 0.035);
}

.note-row {
    cursor: pointer;
    transition: background 0.12s ease;
}

.note-row:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
}

.note-row.is-selected,
.note-row.is-selected td {
    background: rgba(99, 102, 241, 0.08) !important;
}

.note-row.is-selected td:first-child {
    border-left: 3px solid var(--primary) !important;
}

.note-row.archived {
    opacity: 0.65;
    background: rgba(247, 247, 245, 0.4);
}

.note-row.archived:hover {
    opacity: 0.9;
    background: rgba(55, 53, 47, 0.04);
}

/* Fluid note column & tight metadata columns */
.notes-table .col-similarity {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.notes-table .col-note {
    width: auto;
    min-width: 200px;
    padding-left: 0.85rem;
}

.notes-table .col-created {
    width: 1%;
    white-space: nowrap;
}

.notes-table .col-reps {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.notes-table .col-due {
    width: 1%;
    white-space: nowrap;
}

.notes-table .col-status {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.notes-table .col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    padding-right: 0.55rem;
}

/* Note Content Box & Preview */
.note-content-box {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.note-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.18rem 0.5rem;
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: 4px;
    font-size: var(--list-font-size-tag, 0.75rem);
    font-weight: var(--font-weight-medium, 500);
    color: #4338ca;
    line-height: 1.25;
    white-space: nowrap;
    flex-shrink: 0;
}

.note-cat-icon {
    font-size: var(--font-sm);
    display: inline-flex;
    align-items: center;
}

.note-cat-text {
    line-height: 1;
}

.note-content-preview {
    font-weight: var(--font-weight-regular, 400);
    color: var(--text);
    line-height: var(--list-line-height, 1.45);
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: var(--list-font-size-preview, 0.9375rem);
}

/* Text formats */
.date-text {
    font-size: var(--list-font-size-meta, 0.8125rem);
    color: var(--text-muted);
    white-space: nowrap;
}

.due-text {
    font-size: var(--list-font-size-meta, 0.8125rem);
    font-weight: var(--font-weight-medium, 500);
    color: var(--text);
    white-space: nowrap;
}

/* Repetition Badge */
.rep-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 0.4rem;
    border-radius: 10px;
    background: rgba(55, 53, 47, 0.05);
    color: #475569;
    font-size: var(--font-xs);
    font-weight: var(--font-weight-semibold, 600);
    border: 1px solid rgba(55, 53, 47, 0.08);
}

/* Sortable Headers */
.notes-table th.sortable-column {
    padding: 0;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    height: 100%;
    padding: 0.45rem 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: var(--font-weight-semibold, 600);
    font-size: var(--font-sm);
    transition: color 0.12s ease, background-color 0.12s ease;
    box-sizing: border-box;
}

.notes-table th.col-reps .sort-link,
.notes-table th.col-status .sort-link {
    justify-content: center;
}

.sort-link:hover {
    color: var(--text);
    background: rgba(55, 53, 47, 0.04);
}

.sortable-column.is-sorted .sort-link {
    color: var(--primary);
}

.sort-indicator {
    font-size: var(--font-sm);
    opacity: 0.45;
    transition: opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.sortable-column.is-sorted .sort-indicator {
    opacity: 1;
    font-weight: 700;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: var(--font-xs);
    font-weight: var(--font-weight-medium, 500);
    line-height: 1.25;
    white-space: nowrap;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-badge.due {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.status-badge.due .status-dot {
    background: #ef4444;
}

.status-badge.learning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}

.status-badge.learning .status-dot {
    background: #f59e0b;
}

.status-badge.mastered {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.status-badge.mastered .status-dot {
    background: #22c55e;
}

.status-badge.archived {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.status-badge.archived .status-dot {
    background: #94a3b8;
}

/* Row Actions (3-Dot Kebab Menu) */
.row-actions-dropdown {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}

.btn-kebab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: #787774;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: all 0.12s ease;
    user-select: none;
    opacity: 0.45;
}

.note-row:hover .btn-kebab,
.btn-kebab:focus-visible,
.row-actions-dropdown.active .btn-kebab {
    opacity: 1;
}

.btn-kebab:hover,
.row-actions-dropdown.active .btn-kebab {
    background: rgba(55, 53, 47, 0.08);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.12);
}

.kebab-icon {
    display: inline-block;
    transform: translateY(-1px);
    font-size: 1.15rem;
}

.kebab-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 3px);
    z-index: 1000;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 0.25rem;
    animation: kebabFadeIn 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.row-actions-dropdown.active .kebab-menu {
    display: block;
}

.row-actions-dropdown.dropup .kebab-menu {
    top: auto;
    bottom: calc(100% + 3px);
}

@keyframes kebabFadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kebab-form {
    display: block;
    margin: 0;
    padding: 0;
}

.kebab-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.38rem 0.6rem;
    border: none;
    background: none;
    border-radius: 4px;
    font-size: var(--font-sm);
    font-weight: 450;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.1s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.kebab-item:hover {
    background: rgba(55, 53, 47, 0.06);
    color: var(--text);
}

.kebab-item-icon {
    font-size: var(--font-sm);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    width: 18px;
    justify-content: center;
}

.kebab-item-danger {
    color: var(--danger);
}

.kebab-item-danger:hover {
    background: #fef2f2;
    color: var(--danger-dark);
}

.kebab-divider {
    height: 1px;
    background: rgba(55, 53, 47, 0.08);
    margin: 0.2rem 0;
}

/* Action Buttons */
.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: flex-end;
}

.action-buttons .inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    background: transparent;
    font-family: inherit;
    line-height: 1.2;
}

.btn-action .action-icon {
    font-size: var(--font-sm);
    line-height: 1;
}

/* Edit Action */
.btn-action-edit {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-dark);
    border-color: rgba(99, 102, 241, 0.2);
}

.btn-action-edit:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

/* Archive Action */
.btn-action-archive {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.2);
}

.btn-action-archive:hover {
    background: #64748b;
    color: #ffffff;
    border-color: #64748b;
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
}

/* Unarchive Action */
.btn-action-unarchive {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-action-unarchive:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

/* Danger / Delete Action */
.btn-action-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-action-danger:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

/* Note Modal Enhancements */
.note-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.note-modal-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.note-modal-actions-bar .inline-form {
    display: inline;
    margin: 0;
}

.edit-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.edit-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.delete-link {
    background: none;
    border: none;
    color: var(--danger, #ef4444);
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.delete-link:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* ===== Note Info Box ===== */
.note-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.note-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.note-info ul {
    list-style: none;
    padding: 0;
}

.note-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.note-info li:last-child {
    border-bottom: none;
}

/* ===== Secondary & Ghost Buttons (Notion-Style) ===== */
.btn-secondary {
    background: var(--bg, #ffffff);
    color: var(--text, #37352f);
    border: 1px solid rgba(55, 53, 47, 0.16);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: var(--bg-hover, rgba(55, 53, 47, 0.06));
    border-color: rgba(55, 53, 47, 0.28);
    color: var(--text, #37352f);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ===== Hint Styles ===== */
.hint-container {
    margin: 1rem 0;
}

.btn-hint {
    background: #fef3c7;
    color: #b45309;
    border: 2px solid #f59e0b;
}

.btn-hint:hover {
    background: #fde68a;
}

.hint-text {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: var(--radius-sm);
    border-left: 4px solid #f59e0b;
    color: #92400e;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ===== Mobile Card Layout for Table (max-width: 768px) ===== */
.mobile-card-footer {
    display: none;
}

.desktop-only-actions {
    display: block;
}

@media (max-width: 768px) {
    /* Hide horizontal scroll and table container border on mobile */
    .notes-table-container {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin-bottom: 1.25rem !important;
    }

    /* Convert table to block container */
    .notes-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    /* 1. Hide thead on mobile */
    .notes-table thead {
        display: none !important;
    }

    /* Tbody as vertical stack of cards */
    .notes-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    /* 1. Each tr becomes a modern, rounded card */
    .notes-table tbody tr.note-row {
        display: block !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid var(--border, #e5e7eb) !important;
        border-radius: var(--radius, 10px) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        padding: 0.85rem 0.95rem !important;
        box-sizing: border-box !important;
        transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease !important;
        position: relative !important;
        cursor: pointer !important;
    }

    .notes-table tbody tr.note-row:active {
        transform: scale(0.995);
        background: #fafafa !important;
    }

    .notes-table tbody tr.note-row.is-selected {
        border-color: var(--primary) !important;
        background: rgba(99, 102, 241, 0.04) !important;
    }

    .notes-table tbody tr.note-row td {
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
    }

    /* Similarity Bar on Mobile */
    .notes-table .col-similarity {
        display: block !important;
        width: 100% !important;
        padding-bottom: 0.4rem !important;
        text-align: left !important;
    }

    /* 2. Primary Column: Note & Category */
    .notes-table .col-note {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        min-width: 0 !important;
    }

    .note-content-box {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.35rem !important;
    }

    .note-category-tag {
        font-size: var(--list-font-size-tag, 0.75rem) !important;
        padding: 0.15rem 0.45rem !important;
    }

    .note-content-preview {
        font-size: var(--list-font-size-preview, 0.9375rem) !important;
        line-height: var(--list-line-height, 1.45) !important;
        color: var(--text) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        white-space: normal !important;
    }

    /* 2. Secondary Columns: Hidden by default on mobile */
    .notes-table .col-created,
    .notes-table .col-reps,
    .notes-table .col-due,
    .notes-table .col-status {
        display: none !important;
    }

    /* 3. Accordion: When expanded, show secondary columns with data-label */
    .notes-table tbody tr.note-row.details-expanded .col-created,
    .notes-table tbody tr.note-row.details-expanded .col-reps,
    .notes-table tbody tr.note-row.details-expanded .col-due,
    .notes-table tbody tr.note-row.details-expanded .col-status {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.4rem 0 !important;
        border-top: 1px dashed rgba(55, 53, 47, 0.08) !important;
        font-size: var(--list-font-size-meta, 0.8125rem) !important;
        width: 100% !important;
        text-align: right !important;
    }

    .notes-table tbody tr.note-row.details-expanded .col-created::before,
    .notes-table tbody tr.note-row.details-expanded .col-reps::before,
    .notes-table tbody tr.note-row.details-expanded .col-due::before,
    .notes-table tbody tr.note-row.details-expanded .col-status::before {
        content: attr(data-label) !important;
        font-weight: 500 !important;
        color: var(--text-muted) !important;
        font-size: var(--font-xs) !important;
        text-align: left !important;
    }

    /* 4. Touch-friendly Actions Footer */
    .notes-table .col-actions {
        display: block !important;
        width: 100% !important;
        padding-top: 0.65rem !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid rgba(55, 53, 47, 0.06) !important;
        text-align: left !important;
    }

    .desktop-only-actions {
        display: none !important;
    }

    .mobile-card-footer {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .btn-card-details-toggle {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
        background: transparent !important;
        border: 1px solid rgba(55, 53, 47, 0.12) !important;
        border-radius: 6px !important;
        padding: 0.32rem 0.6rem !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        color: var(--text-muted) !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        min-height: 36px !important;
        user-select: none !important;
    }

    .btn-card-details-toggle:active {
        background: var(--bg-hover) !important;
        color: var(--text) !important;
    }

    .btn-card-details-toggle .toggle-icon {
        font-size: 0.7rem !important;
        transition: transform 0.18s ease !important;
    }

    .note-row.details-expanded .btn-card-details-toggle .toggle-icon {
        transform: rotate(180deg) !important;
    }

    .note-row.details-expanded .btn-card-details-toggle {
        background: rgba(99, 102, 241, 0.08) !important;
        color: var(--primary) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
    }

    .mobile-action-buttons {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }

    .mobile-action-buttons .inline-form {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .btn-mobile-touch-action {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: var(--bg-sidebar, #f7f7f5) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
        font-size: 0.95rem !important;
        cursor: pointer !important;
        text-decoration: none !important;
        transition: all 0.15s ease !important;
        padding: 0 !important;
    }

    .btn-mobile-touch-action:active {
        background: var(--bg-hover) !important;
        transform: scale(0.94);
    }

    .btn-mobile-danger:active {
        background: #fee2e2 !important;
        color: #ef4444 !important;
        border-color: #fca5a5 !important;
    }
}

/* ===== Notion-Style Full Page Note Detail View ===== */
.all-notes-view-container {
    width: 100%;
    position: relative;
}

.notes-table-pane {
    width: 100%;
    transition: opacity 0.15s ease;
}

.note-full-detail-pane {
    width: 100%;
    max-width: 880px;
    margin: 0;
    animation: fullDetailFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fullDetailFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.note-full-detail-card {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    background: transparent;
    padding-bottom: 3rem;
}

/* Minimal Top Action & Navigation Bar */
.detail-top-nav-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0 0.55rem 0;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg, #ffffff);
    flex-wrap: nowrap;
    width: 100%;
}

.detail-nav-left,
.detail-nav-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.btn-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-md);
    font-weight: 500;
    color: var(--text);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.3;
}

.btn-detail-back:hover {
    background: var(--bg-hover);
    border-color: rgba(55, 53, 47, 0.25);
}

.btn-detail-back .back-icon {
    font-size: var(--font-md);
    line-height: 1;
}

.detail-nav-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

.detail-time-text {
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.btn-detail-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.3;
    white-space: nowrap;
}

.btn-detail-action:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.25);
}

.btn-detail-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* Properties Panel */
.detail-properties-panel {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 0.95rem;
    background: var(--bg-sidebar, #f7f7f5);
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
}

.detail-prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 26px;
}

.detail-prop-label {
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-muted);
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
}

.detail-prop-value {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: var(--font-xs);
    font-weight: 500;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}

.detail-cat-badge .cat-icon-sym {
    font-size: var(--font-sm);
    line-height: 1;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: var(--font-xs);
    font-weight: 500;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Note Content Canvas */
.detail-content-canvas {
    padding: 0.5rem 0.25rem;
    min-height: 120px;
}

.detail-note-body {
    font-size: var(--note-font-size-base, 1.05rem);
    line-height: var(--note-line-height, 1.75);
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Hint Box */
.detail-hint-box {
    background: #fffdfa;
    border: 1px solid #fef3c7;
    border-radius: var(--radius, 8px);
    padding: 0.65rem 0.85rem;
}

.btn-detail-hint-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font-size: var(--font-sm);
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
    padding: 0;
}

.btn-detail-hint-toggle:hover {
    color: #b45309;
    text-decoration: underline;
}

.detail-hint-content {
    margin-top: 0.5rem;
    font-size: var(--note-font-size-hint, 0.95rem);
    color: #92400e;
    line-height: 1.55;
    border-top: 1px dashed #fde68a;
    padding-top: 0.5rem;
}

/* Forgetting Curve Bottom Card */
.detail-forgetting-curve-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}

.detail-forgetting-curve-card .curve-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.detail-forgetting-curve-card .curve-title {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text);
}

.detail-forgetting-curve-card .curve-badge {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .detail-time-text {
        display: none;
    }
    .detail-nav-divider {
        display: none;
    }
    .btn-detail-action .action-label {
        display: none;
    }
    .btn-detail-action {
        padding: 0.3rem 0.45rem;
    }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.footer-slogan {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.4rem;
    font-style: italic;
    letter-spacing: 0.01em;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand {
        text-align: center;
        align-items: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .review-buttons {
        flex-direction: column;
    }
    
    .review-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .note-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== How It Works Page ===== */
.info-hero {
    text-align: center;
    margin: 2rem 0;
}

.info-hero .hero-image {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.info-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.info-section h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.info-section p {
    line-height: 1.7;
    color: var(--text);
}

.timeline-container {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.timeline-item {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
}

.timeline-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8d7da, #f5c2c7);
}

.timeline-icon.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Flow Diagram */
.flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.flow-step.highlight {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(40,167,69,0.05), rgba(40,167,69,0.1));
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-content h4 {
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.95rem;
    margin: 0;
}

.step-content code {
    background: var(--bg-card);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-dark);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.flow-arrow.loop {
    font-size: 2rem;
    color: var(--primary);
}

/* Rating Grid */
.rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.rating-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rating-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.rating-card.forgot { border-color: #dc3545; }
.rating-card.hard { border-color: #fd7e14; }
.rating-card.good { border-color: #28a745; }
.rating-card.easy { border-color: #17a2b8; }

.rating-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.rating-label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.rating-effect {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Interval Timeline */
.interval-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.interval-step {
    background: var(--bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 100px;
}

.interval-step.highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.interval-step.highlight .interval-label {
    color: rgba(255,255,255,0.9);
}

.interval-day {
    font-weight: 700;
    font-size: 1.1rem;
}

.interval-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.interval-connector {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Tips Section */
.info-section.tips ul {
    list-style: none;
    padding: 0;
}

.info-section.tips li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

.info-section.tips li:last-child {
    border-bottom: none;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 3rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Modern Notion-Inspired Toolbar ===== */
.notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

/* Minimal Notion Filter Tabs */
.notion-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: rgba(55, 53, 47, 0.04);
    border-radius: 6px;
    border: 1px solid rgba(55, 53, 47, 0.06);
}

.notion-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    font-size: var(--font-md);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    line-height: 1.3;
}

.notion-filter-tab:hover {
    color: var(--text);
    background: rgba(55, 53, 47, 0.05);
}

.notion-filter-tab.active {
    background: #ffffff;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(55, 53, 47, 0.08);
}

.filter-tab-icon {
    font-size: var(--font-md);
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.filter-tab-label {
    line-height: 1.2;
}

/* Notes Search Box (Compact & Sleek) */
.notes-search-box {
    display: flex;
    align-items: center;
}

.notes-search-box .search-form,
.search-form {
    display: flex;
    align-items: center;
    margin: 0;
    width: 250px;
}

.notes-search-box .search-input-wrapper,
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.notes-search-box .search-icon,
.search-icon {
    position: absolute;
    left: 0.65rem;
    font-size: var(--font-md);
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}

.notes-search-box input[type="text"],
.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 0.32rem 1.8rem 0.32rem 2.1rem;
    border: 1px solid rgba(55, 53, 47, 0.14);
    border-radius: 6px;
    font-size: var(--font-md);
    background: #ffffff;
    color: var(--text);
    transition: all 0.15s ease;
    height: 32px;
    box-sizing: border-box;
}

.notes-search-box input[type="text"]:focus,
.search-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.notes-search-box input[type="text"]::placeholder,
.search-input-wrapper input[type="text"]::placeholder {
    color: #9b9a97;
    font-size: var(--font-md);
    opacity: 0.85;
}

.notes-search-box .search-clear,
.search-clear {
    position: absolute;
    right: 0.45rem;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(55, 53, 47, 0.15);
    color: #ffffff;
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 700;
    transition: background 0.15s ease;
    z-index: 2;
}

.notes-search-box .search-clear:hover,
.search-clear:hover {
    background: var(--danger);
}

.search-btn {
    display: none;
}

/* Compact Search Info Banner */
.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.85rem;
    margin-bottom: 0.85rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    font-size: var(--font-md);
}

.search-info-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.45rem;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-dark);
    border-radius: 4px;
    font-size: var(--font-xs);
    font-weight: 600;
}

.search-result-count {
    color: var(--text);
    font-size: var(--font-md);
}

.search-info-clear-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.15);
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all 0.15s ease;
}

.search-info-clear-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: #fef2f2;
}

/* Similarity bar */
.similarity-bar-container {
    width: 80px;
    height: 22px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 11px;
    position: relative;
    overflow: hidden;
}

.similarity-bar {
    height: 100%;
    border-radius: 11px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
    transition: width 0.5s ease;
    min-width: 2px;
}

.similarity-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.search-result-row {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.search-result-row:nth-child(1) { animation-delay: 0.05s; }
.search-result-row:nth-child(2) { animation-delay: 0.1s; }
.search-result-row:nth-child(3) { animation-delay: 0.15s; }
.search-result-row:nth-child(4) { animation-delay: 0.2s; }
.search-result-row:nth-child(5) { animation-delay: 0.25s; }
.search-result-row:nth-child(6) { animation-delay: 0.3s; }
.search-result-row:nth-child(7) { animation-delay: 0.35s; }
.search-result-row:nth-child(8) { animation-delay: 0.4s; }
.search-result-row:nth-child(9) { animation-delay: 0.45s; }
.search-result-row:nth-child(10) { animation-delay: 0.5s; }

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

.nav-search-link {
    position: relative;
}

/* Responsive search */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .search-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .similarity-bar-container {
        width: 60px;
    }
}

/* ===== Notion-Style Ebbinghaus Forgetting Curve Component ===== */
.notion-ebbinghaus-card,
.forgetting-curve-wrapper,
.detail-forgetting-curve-card {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 53, 47, 0.12));
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.notion-ebbinghaus-card:hover,
.forgetting-curve-wrapper:hover,
.detail-forgetting-curve-card:hover {
    border-color: rgba(35, 131, 226, 0.3);
}

.ebbinghaus-header,
.curve-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ebbinghaus-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.ebbinghaus-titles {
    display: flex;
    flex-direction: column;
}

.ebbinghaus-title,
.curve-title {
    font-size: var(--font-sm, 13px);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.ebbinghaus-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.ebbinghaus-chips {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.ebbinghaus-chip,
.curve-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    line-height: 1;
    letter-spacing: 0.02em;
    box-sizing: border-box;
}

.chip-stage {
    background: rgba(35, 131, 226, 0.1);
    color: #2383e2;
}

.chip-retention {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.chip-retention.ret-good {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.chip-retention.ret-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.chip-retention.ret-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.chip-interval {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.ebbinghaus-chart-box,
.chart-container {
    position: relative;
    height: 165px;
    width: 100%;
}

.ebbinghaus-footer {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border, rgba(55, 53, 47, 0.08));
}

.ebbinghaus-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-line {
    width: 16px;
    height: 2.5px;
    border-radius: 2px;
    display: inline-block;
}

.line-active {
    background: #2383e2;
}

.line-future {
    background: repeating-linear-gradient(90deg, rgba(35, 131, 226, 0.7) 0, rgba(35, 131, 226, 0.7) 3px, transparent 3px, transparent 6px);
}

.line-baseline {
    background: repeating-linear-gradient(90deg, #94a3b8 0, #94a3b8 3px, transparent 3px, transparent 6px);
}

.line-threshold {
    background: repeating-linear-gradient(90deg, #f59e0b 0, #f59e0b 2px, transparent 2px, transparent 4px);
}

.ebbinghaus-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    background: var(--bg-hover, rgba(55, 53, 47, 0.04));
    border-radius: 6px;
    font-size: 0.76rem;
    color: var(--text);
    line-height: 1.45;
    border-left: 3px solid #2383e2;
}

.callout-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.callout-text {
    flex: 1;
}

/* ===== Notion-Style Full-Height Category Sidebar & Layout ===== */
.page-with-sidebar {
    display: flex;
    gap: 1.75rem;
    align-items: stretch;
    position: relative;
    width: 100%;
    min-height: calc(100vh - 120px);
    margin-top: 0.5rem;
}

.category-sidebar {
    width: 290px;
    min-width: 290px;
    flex-shrink: 0;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed state */
.category-sidebar.collapsed {
    width: 56px;
    min-width: 56px;
}

.category-sidebar.collapsed .sidebar-title,
.category-sidebar.collapsed .sidebar-btn-action,
.category-sidebar.collapsed .cat-tree-name,
.category-sidebar.collapsed .cat-tree-count,
.category-sidebar.collapsed .cat-tree-actions,
.category-sidebar.collapsed .cat-drag-handle,
.category-sidebar.collapsed .cat-tree-children,
.category-sidebar.collapsed .sidebar-quick-add-bar,
.category-sidebar.collapsed .cat-drop-zone-root {
    display: none !important;
}

.category-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0.85rem 0.4rem;
}

.category-sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.category-sidebar.collapsed .cat-tree-row {
    justify-content: center;
    padding: 0.5rem 0.25rem;
    margin: 0.2rem 0.2rem;
}

.category-sidebar.collapsed .cat-tree-toggle,
.category-sidebar.collapsed .cat-tree-toggle-spacer {
    display: none !important;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border-bottom: 1px solid var(--border, #e5e7eb);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    flex-shrink: 0;
    user-select: none;
}

.sidebar-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text, #1f2937);
    white-space: nowrap;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sidebar-btn-action,
.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-btn-action:hover,
.sidebar-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary, #6366f1);
}

.toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.sidebar-quick-add-bar {
    display: none;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    background: rgba(99, 102, 241, 0.03);
    flex-shrink: 0;
}

.sidebar-quick-add-bar.open {
    display: block;
}

.sidebar-quick-add-bar .cat-quick-add-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.sidebar-quick-add-bar .cat-quick-add-input {
    flex: 1;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 6px;
    background: var(--bg-card, #ffffff);
    color: var(--text, #1f2937);
}

.sidebar-quick-add-bar .cat-quick-add-input:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 0.5rem 5rem 0.5rem;
}

.sidebar-content::-webkit-scrollbar {
    width: 5px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border, #e5e7eb);
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted, #9ca3af);
}

.sidebar-all-item {
    margin-bottom: 0.35rem;
}

.sidebar-all-item .cat-tree-row {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
}

.cat-tree-link {
    color: inherit;
    text-decoration: none;
}

.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.notes-table-container {
    width: 100%;
    overflow: visible;
}

/* Responsive sidebar */
@media (max-width: 768px) {
    .page-with-sidebar {
        flex-direction: column;
        min-height: auto;
    }

    .category-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        position: relative;
        top: 0;
        margin-bottom: 1rem;
    }

    .category-sidebar.collapsed .sidebar-content,
    .category-sidebar.collapsed .sidebar-quick-add-bar {
        display: none !important;
    }

    .category-sidebar.collapsed .sidebar-title {
        display: inline !important;
    }

    .category-sidebar.collapsed .toggle-icon {
        transform: rotate(-90deg);
    }

    .toggle-icon {
        transform: rotate(90deg);
    }
}

/* ===== Categories Table Hierarchy ===== */
.cat-name-with-indent {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tree-indent {
    color: var(--text-muted, #6b7280);
    font-size: 0.85rem;
    user-select: none;
}

.category-row.depth-1 {
    background: rgba(99, 102, 241, 0.02);
}

.category-row.depth-2 {
    background: rgba(99, 102, 241, 0.04);
}

.category-row.depth-3 {
    background: rgba(99, 102, 241, 0.06);
}

/* Updated form grid for parent selector */
.category-form-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.category-form-grid-v2 .form-group:nth-child(3) {
    grid-column: 1 / -1;
}

.category-form-grid-v2 .btn-add-cat {
    grid-column: 1 / -1;
    justify-self: start;
}

@media (max-width: 768px) {
    .category-form-grid-v2 {
        grid-template-columns: 1fr;
    }
}

/* ===== Group Badges ===== */
.group-badge, .group-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.2em 0.7em;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.group-badge-sm {
    font-size: 0.65rem;
    padding: 0.15em 0.5em;
}
.group-badge-bronze {
    background: linear-gradient(135deg, #cd7f32, #e8a862);
    color: #fff;
}
.group-badge-silver {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    color: #1e293b;
}
.group-badge-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1e293b;
}
.group-badge-admin {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
}

/* ===== Profile Page ===== */
.profile-page {
    max-width: 960px;
    margin: 0;
    padding-top: 1.25rem;
}

.profile-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.profile-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.profile-identity h1 {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.75rem;
}

.stat-card-header h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-numbers {
    display: flex;
    align-items: baseline;
    gap: 0.2em;
    margin-bottom: 0.5rem;
}

.stat-current {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.stat-separator {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.stat-limit {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.stat-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Progress Bars */
.progress-bar-container {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.progress-normal {
    background: linear-gradient(90deg, var(--primary), #818cf8);
}

.progress-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.progress-success {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-unlimited {
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    opacity: 0.4;
}

/* Group Info Table */
.profile-group-info {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.profile-group-info h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.group-info-table {
    width: 100%;
    border-collapse: collapse;
}

.group-info-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}

.group-info-table td:first-child {
    font-weight: 600;
    color: var(--text-muted);
    width: 50%;
}

/* ===== Admin Page ===== */
.admin-page {
    max-width: 1200px;
    margin: 0;
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.admin-nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.2s;
}

.admin-nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.admin-nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

/* Admin Summary Grid */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-summary-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-icon {
    font-size: 2rem;
}

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Admin Toolbar (Search & Filter) */
.admin-toolbar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.admin-search-wrapper {
    position: relative;
    flex: 1 1 280px;
    max-width: 440px;
    display: flex;
    align-items: center;
}

.search-icon-inside {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.admin-search-input {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 2.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.admin-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.clear-search-btn:hover {
    color: var(--text);
    background: rgba(55, 53, 47, 0.1);
}

.admin-filters-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.filter-label {
    font-weight: 500;
    color: var(--text-muted);
}

.admin-filter-select {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.admin-filter-select:focus {
    border-color: var(--primary);
}

.admin-toolbar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
}

.user-count-badge {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Admin Table */
.admin-table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 240px;
}

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

.admin-table th {
    background: var(--bg);
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-table th.sortable-th {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-table th.sortable-th:hover {
    background: rgba(55, 53, 47, 0.08);
    color: var(--text);
}

.admin-table th.sortable-th .th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.admin-table th.sortable-th .sort-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.admin-table th.sortable-th.sort-asc .sort-icon,
.admin-table th.sortable-th.sort-desc .sort-icon {
    opacity: 1;
    color: var(--primary);
    font-weight: bold;
}

.admin-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: var(--bg);
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.limit-info {
    color: var(--text-muted);
    font-size: 0.8em;
}

.admin-group-form {
    display: inline;
}

.admin-group-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg-card);
    cursor: pointer;
}

.admin-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
    position: relative;
}

.admin-table .row-actions-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.admin-table .row-actions-dropdown .btn-kebab {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
    opacity: 0.65;
}

.admin-table tr:hover .btn-kebab,
.admin-table .btn-kebab:focus-visible,
.admin-table .row-actions-dropdown.active .btn-kebab {
    opacity: 1;
}

.admin-table .btn-kebab:hover,
.admin-table .row-actions-dropdown.active .btn-kebab {
    background: rgba(55, 53, 47, 0.08);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.12);
}

.admin-table .row-actions-dropdown .kebab-menu {
    min-width: 180px;
    z-index: 100;
}

.kebab-item.kebab-item-warning {
    color: #d97706;
}
.kebab-item.kebab-item-warning:hover {
    background: rgba(217, 119, 6, 0.1);
}

.kebab-item.kebab-item-success {
    color: #10b981;
}
.kebab-item.kebab-item-success:hover {
    background: rgba(16, 185, 129, 0.1);
}

.user-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.user-status-pill.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.user-status-pill.status-suspended {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.user-status-pill.status-blacklisted {
    background: rgba(147, 51, 234, 0.15);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.35);
}

.admin-table tr.row-suspended {
    opacity: 0.75;
    background: rgba(239, 68, 68, 0.04);
}

.admin-table tr.row-blacklisted {
    opacity: 0.85;
    background: rgba(147, 51, 234, 0.04);
}
.admin-table tr.row-blacklisted:hover {
    background: rgba(147, 51, 234, 0.08);
}

/* Security Panel & Blacklist Management Styles */
.security-section-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.security-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.security-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.security-section-header .section-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.security-inline-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--bg);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.security-inline-form .form-group-inline {
    display: flex;
    align-items: center;
}

.security-inline-form .form-group-inline.flex-grow {
    flex-grow: 1;
    min-width: 220px;
}

.security-inline-form .form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.security-inline-form .form-input:focus {
    border-color: var(--primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-purple {
    background: rgba(147, 51, 234, 0.15);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.35);
}

/* Admin Groups Grid */
.admin-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.admin-group-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--border);
}

.group-card-bronze { border-top-color: #cd7f32; }
.group-card-silver { border-top-color: #94a3b8; }
.group-card-gold { border-top-color: #f59e0b; }
.group-card-admin { border-top-color: #7c3aed; }

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.group-card-header h3 {
    font-size: 1.1rem;
}

.group-user-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.2em 0.6em;
    border-radius: 999px;
}

.group-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.group-edit-row {
    display: grid;
    grid-template-columns: 1fr 80px;
    align-items: center;
    gap: 0.5rem;
}

.group-edit-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.group-edit-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

.group-edit-input:focus {
    outline: none;
    border-color: var(--primary);
}

.group-edit-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    text-align: right;
    margin-top: -0.4rem;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-avatar-section {
        flex-direction: column;
    }
    .profile-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .admin-summary-grid {
        grid-template-columns: 1fr;
    }
    .admin-groups-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Archive & Action Links ===== */
.archive-link {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.archive-link:hover {
    color: #64748b;
    text-decoration: underline;
}

.unarchive-link {
    background: none;
    border: none;
    color: var(--success, #10b981);
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.unarchive-link:hover {
    color: #059669;
    text-decoration: underline;
}

.btn-archive {
    background: #94a3b8;
    color: white;
}

.btn-archive:hover {
    background: #64748b;
}

.note-archive-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .notes-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .notion-filter-tabs {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .notion-filter-tab {
        flex: 1;
        justify-content: center;
        padding: 0.25rem 0.35rem;
    }

    .notes-search-box {
        width: 100%;
    }

    .notes-search-box .search-form {
        width: 100%;
    }

    .notes-table-container {
        border-radius: 6px;
    }

    .notes-table th,
    .notes-table td {
        padding: 0.45rem 0.5rem;
    }

    .notes-table .col-note {
        min-width: 160px;
    }

    .notes-table .col-actions {
        width: 1%;
        white-space: nowrap;
    }

    .btn-kebab {
        opacity: 0.85;
    }
}

/* ===== Category Tree (Notion-like Compact Hierarchy) ===== */
.cat-quick-add-bar {
    margin-bottom: 0.5rem;
}

.cat-quick-add-form {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.cat-quick-add-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12.5px;
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.15s;
    height: 26px;
}

.cat-quick-add-input:focus {
    outline: none;
    border-color: var(--primary);
}

.cat-tree-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.cat-tree {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cat-tree-item {
    position: relative;
    margin: 0;
    transition: background 0.12s;
}

.cat-tree-item.dragging {
    opacity: 0.35;
    background: var(--bg-hover);
}

.cat-tree-item.drop-target-active {
    outline: none;
}

.cat-tree-item.menu-open,
.cat-tree-item:has(.cat-context-menu.open) {
    z-index: 1000 !important;
}

/* Category Row: Scalable height, draggable, 0 extra borders */
.cat-tree-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    height: var(--sidebar-row-height, 29px);
    min-height: var(--sidebar-row-height, 29px);
    cursor: pointer;
    border: none;
    transition: background 0.12s, color 0.12s;
    border-radius: 4px;
    margin: 0;
    background: transparent;
    position: relative;
    color: var(--text);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cat-tree-link {
    text-decoration: none;
    color: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cat-tree-row.menu-open,
.cat-tree-row:has(.cat-context-menu.open) {
    z-index: 1000 !important;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .cat-tree-row:hover {
        background: var(--bg-hover);
    }
}

.cat-tree-row:active {
    background: rgba(99, 102, 241, 0.14);
}

.cat-tree-item.active > .cat-tree-row,
.cat-tree-item.focused-category > .cat-tree-row {
    background: rgba(99, 102, 241, 0.15) !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    border-left: 3.5px solid var(--primary);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.cat-tree-item.active > .cat-tree-row .cat-tree-name,
.cat-tree-item.focused-category > .cat-tree-row .cat-tree-name {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

.cat-tree-item.active > .cat-tree-row .cat-tree-icon,
.cat-tree-item.focused-category > .cat-tree-row .cat-tree-icon {
    color: var(--primary) !important;
    transform: scale(1.08);
    transition: transform 0.15s ease;
}

@keyframes catFocusPulse {
    0% {
        background-color: rgba(99, 102, 241, 0.38) !important;
        box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
    }
    50% {
        background-color: rgba(99, 102, 241, 0.24) !important;
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
    }
    100% {
        background-color: rgba(99, 102, 241, 0.15) !important;
        box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
    }
}

.cat-tree-item.focused-category > .cat-tree-row {
    animation: catFocusPulse 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1;
}

/* Toggle: compact chevron */
.cat-tree-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    min-width: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    height: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 3px;
    transition: background 0.12s;
    flex-shrink: 0;
}

.cat-tree-toggle:hover {
    background: rgba(55, 53, 47, 0.1);
    color: var(--text);
}

.cat-tree-toggle .toggle-arrow {
    font-size: calc(var(--sidebar-font-size-xs, 11px) * 0.7);
    line-height: 1;
    display: inline-block;
    transition: transform 0.15s ease;
    opacity: 0.7;
}

.cat-tree-toggle.expanded .toggle-arrow {
    transform: rotate(90deg);
}

.cat-tree-toggle:not(.expanded) .toggle-arrow {
    transform: rotate(0deg);
}

.cat-tree-toggle-spacer {
    width: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    min-width: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    height: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
    flex-shrink: 0;
}

/* Category Icon */
.cat-tree-icon {
    font-size: var(--sidebar-tree-icon-size, 14.5px);
    flex-shrink: 0;
    width: calc(var(--sidebar-tree-icon-size, 14.5px) + 4px);
    min-width: calc(var(--sidebar-tree-icon-size, 14.5px) + 4px);
    height: calc(var(--sidebar-tree-icon-size, 14.5px) + 4px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-right: 3px;
}

.cat-tree-icon .material-symbols-outlined {
    font-size: calc(var(--sidebar-tree-icon-size, 14.5px) + 2px);
}

/* Category Name */
.cat-tree-name {
    font-size: var(--sidebar-font-size-base, 13.5px);
    font-weight: 400;
    color: inherit;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    line-height: 1.25;
}

.sidebar-all-item .cat-tree-name {
    font-weight: 500;
}

.cat-tree-item[data-depth="0"] > .cat-tree-row .cat-tree-name {
    font-weight: 500;
}

.cat-rename-input {
    width: 100%;
    height: calc(var(--sidebar-row-height, 29px) - 6px);
    padding: 0 4px;
    border: 1.5px solid var(--primary);
    border-radius: 3px;
    font-size: var(--sidebar-font-size-base, 13.5px);
    font-weight: inherit;
    background: var(--bg-card);
    color: var(--text);
}

.cat-rename-input:focus {
    outline: none;
}

/* Note Count */
.cat-tree-count {
    font-size: var(--sidebar-font-size-xs, 11px);
    color: var(--text-muted);
    background: transparent;
    padding: 0 2px;
    border-radius: 3px;
    flex-shrink: 0;
    opacity: 0.6;
    line-height: 1;
    min-width: 18px;
    text-align: right;
    margin-right: 2px;
}

.cat-due-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600;
    opacity: 1 !important;
    font-size: var(--sidebar-font-size-xs, 11px);
    padding: 0 4px;
    height: calc(var(--sidebar-font-size-xs, 11px) + 5px);
    line-height: calc(var(--sidebar-font-size-xs, 11px) + 5px);
    border-radius: 4px;
    min-width: auto;
    text-align: center;
}

/* Actions: Standardized right column across all categories */
.cat-tree-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    width: calc(var(--sidebar-row-height, 29px) + 12px);
    min-width: calc(var(--sidebar-row-height, 29px) + 12px);
    flex-shrink: 0;
}

.cat-action-spacer {
    width: calc(var(--sidebar-row-height, 29px) - 9px);
    height: calc(var(--sidebar-row-height, 29px) - 9px);
    display: inline-block;
    flex-shrink: 0;
}

.cat-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: calc(var(--sidebar-row-height, 29px) - 9px);
    height: calc(var(--sidebar-row-height, 29px) - 9px);
    padding: 0;
    font-size: var(--sidebar-font-size-section, 11px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: var(--text-muted);
    transition: opacity 0.12s, background 0.12s, color 0.12s;
    line-height: 1;
    opacity: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .cat-tree-row:hover .cat-action-btn,
    .cat-tree-row.menu-open .cat-action-btn,
    .cat-tree-row:focus-within .cat-action-btn {
        opacity: 0.7;
    }

    .cat-action-btn:hover {
        opacity: 1 !important;
        background: rgba(55, 53, 47, 0.1);
        color: var(--text);
    }
}

/* Dokunmatik Cihazlar (Mobil & Tablet):
   :hover ile buton görünürlüğü tetiklenerek ilk tıklamanın "hover" olarak yutulmasını önle.
   Aksiyon butonları dokunmatik ekranlarda doğrudan hafif opaklıkla erişilebilir olur. */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
    .cat-tree-actions {
        opacity: 1 !important;
    }
    .cat-action-btn {
        opacity: 0.75 !important;
        visibility: visible !important;
    }
    .cat-drag-handle {
        display: none !important;
    }
}

/* Context Menu */
.cat-context-menu-wrapper {
    position: relative;
    z-index: 1001;
}

.cat-context-menu-wrapper.menu-open,
.cat-context-menu-wrapper:has(.cat-context-menu.open) {
    z-index: 1001 !important;
}

.cat-context-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 1002;
    overflow: hidden;
    padding: 0.2rem 0;
}

.cat-context-menu.open {
    display: block;
}

/* Sidebar'ın altında yer yoksa yukarı doğru aç */
.cat-context-menu.open-up {
    top: auto;
    bottom: calc(100% + 2px);
}

.ctx-menu-item {
    display: block;
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: var(--sidebar-font-size-base, 13.5px);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s;
}

.ctx-menu-item:hover {
    background: var(--bg-hover);
}

.ctx-menu-item.ctx-danger {
    color: var(--danger);
}

.ctx-menu-item.ctx-danger:hover {
    background: #fef2f2;
}

.ctx-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.2rem 0;
}

/* Inline Add Form */
.cat-inline-add {
    display: flex;
    gap: 3px;
    align-items: center;
    padding: 2px 4px;
    margin: 2px 2px 2px 14px;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 4px;
}

.cat-inline-input {
    flex: 1;
    height: calc(var(--sidebar-row-height, 29px) - 5px);
    padding: 0 6px;
    border: 1px solid var(--primary);
    border-radius: 3px;
    font-size: var(--sidebar-font-size-base, 13.5px);
    background: var(--bg-card);
    color: var(--text);
}

.cat-inline-input:focus {
    outline: none;
}

/* Subcategories Indentation: Compact 13px per level with subtle guide line */
.cat-tree-children {
    display: none;
    margin-left: 13px;
    padding-left: 0;
    border-left: 1px solid rgba(55, 53, 47, 0.08);
}

.cat-tree-children.expanded {
    display: block;
}

/* Drag-over states */
.cat-tree-item.drag-over-before > .cat-tree-row {
    box-shadow: inset 0 2px 0 var(--primary);
}

.cat-tree-item.drag-over-after > .cat-tree-row {
    box-shadow: inset 0 -2px 0 var(--primary);
}

.cat-tree-item.drag-over-into > .cat-tree-row {
    background: rgba(99, 102, 241, 0.12);
    box-shadow: inset 0 0 0 1.5px var(--primary);
    border-radius: 4px;
}

/* Root drop zone */
.cat-drop-zone-root {
    padding: 0.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px dashed var(--border);
    transition: all 0.15s;
    display: none;
    margin-top: 4px;
}

.cat-drop-zone-root.drop-target-active {
    display: block;
}

.cat-drop-zone-root.drag-over {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

/* Icon Modal */
.cat-icon-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-icon-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.cat-icon-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
}

.cat-icon-modal-content h3 {
    margin: 0 0 1rem 0;
    color: var(--text);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.icon-option {
    padding: 0.6rem;
    font-size: 1.4rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.icon-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.1);
}

/* Toast */
.cat-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.cat-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cat-toast-success {
    background: #10b981;
}

.cat-toast-error {
    background: #ef4444;
}

.cat-toast-info {
    background: #6366f1;
}

/* Responsive */
@media (max-width: 768px) {
    .cat-tree-actions {
        opacity: 1;
    }

    .cat-drag-handle {
        display: none !important;
    }

    .cat-tree-row {
        flex-wrap: nowrap;
    }

    .cat-tree-count {
        display: inline-flex;
        font-size: 11px;
    }

    .icon-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Modern Notion-Style Edit Note Page ===== */
.notion-breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s ease;
}

.notion-breadcrumb-link:hover {
    color: var(--text);
    text-decoration: underline;
}

.notion-breadcrumb-link .note-cat-icon {
    font-size: 1rem;
    vertical-align: middle;
}

.breadcrumb-current-page {
    font-weight: 600;
    color: var(--text);
}

.edit-note-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 0 2rem 0;
    box-sizing: border-box;
}

/* 1. Üst Aksiyon Çubuğu (Sticky Header) */
.edit-sticky-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--bg, #ffffff);
    padding: 0.45rem 0 0.55rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.edit-header-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.edit-actions-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hdr-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 0.15rem;
    flex-shrink: 0;
}

.btn-hdr-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.55rem;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-hdr-action .hdr-icon {
    font-size: var(--font-sm);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-hdr-action:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(55, 53, 47, 0.25);
}

.btn-hdr-unarchive:hover {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.btn-hdr-archive:hover {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.btn-hdr-properties.is-active,
.btn-hdr-properties:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.hdr-cat-preview {
    font-size: var(--font-xs);
    color: var(--text-muted);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
}

.btn-hdr-save {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.8rem;
    font-size: var(--font-sm);
    font-weight: 600;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary-dark);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    line-height: 1.3;
    flex-shrink: 0;
}

.btn-hdr-save .save-icon {
    font-size: var(--font-sm);
    line-height: 1;
}

.btn-hdr-save:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-hdr-save:active {
    transform: translateY(0);
}

/* Header Autosave Controls */
.hdr-autosave-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    margin-left: 2px;
}

.hdr-autosave-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 !important;
}

.hdr-autosave-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hdr-autosave-switch {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 15px;
    background-color: var(--border, #cbd5e1);
    border-radius: 15px;
    transition: background-color 0.2s ease;
}

.hdr-autosave-switch::before {
    position: absolute;
    content: "";
    height: 11px;
    width: 11px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hdr-autosave-checkbox:checked + .hdr-autosave-switch {
    background-color: #10b981;
}

.hdr-autosave-checkbox:checked + .hdr-autosave-switch::before {
    transform: translateX(11px);
}

.hdr-autosave-text {
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.hdr-autosave-status {
    font-size: var(--font-xs);
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

/* 2. Sayfa Özellikleri Popup (Metadata Popup) */
.properties-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.properties-popup-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    width: 320px;
    max-width: calc(100vw - 20px);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    padding: 0.85rem 1rem;
    animation: popupSlideDown 0.15s ease;
}

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

.prop-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border);
}

.prop-popup-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.prop-popup-icon {
    font-size: var(--font-md);
}

.prop-popup-title {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text);
}

.prop-popup-close {
    background: none;
    border: none;
    font-size: var(--font-sm);
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}

.prop-popup-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.prop-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prop-popup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 28px;
}

.prop-popup-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
    min-width: 95px;
    flex-shrink: 0;
}

.prop-popup-label .prop-icon {
    font-size: var(--font-sm);
    line-height: 1;
}

.prop-popup-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex: 1;
    flex-wrap: wrap;
}

.prop-category-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 180px;
}

.prop-category-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.25rem 1.4rem 0.25rem 0.5rem;
    background: var(--bg-sidebar, #f7f7f5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.3;
}

.prop-category-select:hover {
    border-color: rgba(55, 53, 47, 0.25);
    background: #ffffff;
}

.prop-category-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.prop-select-chevron {
    position: absolute;
    right: 0.45rem;
    pointer-events: none;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.prop-chips-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 3. Main Edit Form & Note Canvas */
.edit-note-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.edit-content-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

/* Secondary Hint Section */
.edit-hint-section {
    margin-top: 0.5rem;
    width: 100%;
}

.edit-hint-box {
    background: #fffdfa;
    border: 1px solid #fef3c7;
    border-radius: var(--radius, 8px);
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.edit-hint-box:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.edit-hint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.edit-hint-label {
    font-size: 0.775rem;
    font-weight: 600;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    margin: 0 !important;
}

.edit-hint-label .hint-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.edit-hint-desc {
    font-size: 0.715rem;
    color: #b45309;
    opacity: 0.85;
}

/* Mobile Specific Optimizations */
@media (max-width: 640px) {
    .edit-sticky-header {
        padding: 0.25rem 0 0.35rem 0;
        gap: 0.3rem;
    }

    .edit-actions-group {
        gap: 0.25rem;
    }

    .btn-hdr-action .hdr-text {
        display: none !important;
    }

    .hdr-cat-preview {
        display: none !important;
    }

    .hdr-divider {
        display: none !important;
    }

    .btn-hdr-action {
        padding: 0.28rem 0.45rem;
        min-width: 30px;
        justify-content: center;
    }

    .btn-hdr-save {
        padding: 0.28rem 0.6rem;
    }

    .btn-hdr-save .save-text {
        display: inline !important;
    }

    .properties-popup-menu {
        right: 0;
        left: auto;
        width: calc(100vw - 20px);
    }
}

/* ==========================================================================
   PWA & Web Share Target Styles
   ========================================================================== */

.share-resolve-container {
    max-width: 860px;
    margin: 0;
    padding: 1.5rem 1rem 3rem;
}

.share-resolve-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}

.share-resolve-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-hover, rgba(255,255,255,0.06));
    color: var(--text, #e2e8f0);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.15s;
}

.back-link:hover {
    background: var(--primary, #6366f1);
    color: #fff;
}

.share-meta-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

.share-badge-source {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.share-badge-ttl {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.share-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.share-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text, #f8fafc);
    margin-bottom: 0.25rem;
}

.share-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 1.25rem;
}

.share-url-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg, #0f172a);
    border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    overflow: hidden;
}

.share-url-link {
    color: var(--primary-light, #818cf8);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
}

.share-url-link:hover {
    text-decoration: underline;
}

.share-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.share-image-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg, #0f172a);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    display: flex;
    flex-direction: column;
}

.share-image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.share-image-name {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AI / Rule-based Suggestions */
.ai-suggestion-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.12));
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 10px;
    margin-top: 0.75rem;
}

.suggestion-icon {
    font-size: 1.4rem;
}

.suggestion-body {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text, #e2e8f0);
}

.confidence-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: #4f46e5;
    color: #fff;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 0.4rem;
}

.suggestion-reason {
    font-size: 0.78rem;
    color: #a5b4fc;
    margin-top: 0.2rem;
}

/* Similar Notes List */
.similar-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.similar-note-card {
    padding: 0.75rem 1rem;
    background: var(--bg, #0f172a);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.similar-note-card:hover {
    border-color: var(--primary, #6366f1);
    transform: translateY(-1px);
}

.similar-note-card.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.similar-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.similar-note-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #f8fafc);
}

.similarity-score {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    font-weight: 600;
}

.similar-note-snippet {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.4;
}

.similar-note-reason {
    margin-top: 0.3rem;
    color: #94a3b8;
}

/* Action Sections */
.resolve-action-section {
    padding: 1.25rem;
    background: var(--bg, #0f172a);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 10px;
}

.section-badge-header h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text, #f1f5f9);
    margin-bottom: 0.5rem;
}

.resolve-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fff;
}

.info-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
}

.info-tip-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.info-tip-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text, #e2e8f0);
}

/* ==========================================================================
   Push Notification Styles
   ========================================================================== */

.profile-push-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.push-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.push-card-title-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.push-card-title-group h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text, #f8fafc);
    margin: 0;
}

.push-controls-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

.push-control-item {
    flex: 1;
    min-width: 200px;
}

.push-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-muted {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ===== Backup & Restore Management Styles ===== */
.backup-info-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
}

.backup-info-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.backup-info-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color, #e2e8f0);
}

.backup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-auto {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-manual {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-safety {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Backup Modal */
.backup-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.backup-modal-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.backup-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.backup-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-color, #f8fafc);
}

.backup-modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.backup-modal-close:hover {
    color: var(--text-color, #f8fafc);
}

.backup-modal-body {
    padding: 1.5rem;
}

.backup-target-filename {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #60a5fa;
    margin: 0.75rem 0;
    word-break: break-all;
}

.backup-warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #fca5a5;
    margin: 1rem 0;
}

.backup-warning-box ul {
    margin: 0.4rem 0 0 1.2rem;
    padding: 0;
}

.backup-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-color, #e2e8f0);
}

.backup-checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.backup-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ===== Çöp Kutusu (Trash) Stilleri ===== */
.notion-badge-trash {
    background: rgba(120, 119, 116, 0.2);
    color: var(--text-muted);
    font-size: 0.7rem;
}

.notion-nav-item:hover .notion-badge-trash,
.notion-nav-item.active .notion-badge-trash {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.trash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.trash-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trash-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trash-header-icon {
    font-size: var(--font-2xl);
    line-height: 1;
}

.trash-page-title {
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.trash-count-badge {
    font-size: var(--font-xs);
    font-weight: 600;
    background: rgba(55, 53, 47, 0.08);
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.trash-subtitle {
    font-size: var(--font-md);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.trash-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-empty-trash {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: var(--font-sm);
    font-weight: 600;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-empty-trash:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.trash-days-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: var(--font-xs);
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.trash-days-normal {
    background: rgba(55, 53, 47, 0.06);
    color: var(--text-muted);
}

.trash-days-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.trash-days-critical {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: pulseCritical 2s infinite ease-in-out;
}

@keyframes pulseCritical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.trash-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.btn-trash-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    font-size: var(--font-sm);
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.3;
}

.btn-trash-restore {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-trash-restore:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.btn-trash-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-trash-delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-detail-action-success {
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.btn-detail-action-success:hover {
    background: #10b981 !important;
    color: #ffffff !important;
}

.btn-detail-action-danger {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.btn-detail-action-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.btn-mobile-success {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

@media (max-width: 768px) {
    .trash-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .trash-actions-row {
        justify-content: space-between;
    }
    
    .trash-actions-row .notes-search-box {
        flex: 1;
    }
    
    .trash-actions-row .search-input-wrapper {
        width: 100%;
    }
}

/* ==================================================
   ÇALIŞMA ORTAMI (STUDY WORKSPACE) STİLLERİ
================================================== */

/* Global Study Modal Overlay & Backdrop */
.notion-modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    animation: modalFadeIn 0.2s ease-out;
}

.study-modal-card {
    max-width: 540px;
    width: 92%;
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    z-index: 1000000;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.study-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1rem;
}

.study-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.study-modal-icon {
    font-size: 1.4rem;
}

.study-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.study-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.study-modal-close:hover {
    background: var(--bg-hover, #f1f5f9);
    color: var(--text-main, #0f172a);
}

.study-modal-note-preview {
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.note-preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    display: block;
    margin-bottom: 0.25rem;
}

.note-preview-text {
    font-size: 0.9rem;
    color: var(--text-main, #1e293b);
    margin: 0;
    line-height: 1.4;
}

.study-modal-options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.study-modal-option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.study-modal-option-card:hover {
    border-color: var(--primary-color, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.option-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.option-icon-quiz { background: rgba(37, 99, 235, 0.1); }
.option-icon-mem { background: rgba(168, 85, 247, 0.1); }
.option-icon-hub { background: rgba(100, 116, 139, 0.1); }

.option-content-box {
    flex: 1;
}

.option-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.option-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
}

.option-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--primary-color, #2563eb);
    color: #ffffff;
    font-weight: 500;
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.35;
}

.option-arrow {
    font-size: 1.1rem;
    color: var(--text-muted, #94a3b8);
    transition: transform 0.2s ease;
}

.study-modal-option-card:hover .option-arrow {
    transform: translateX(3px);
    color: var(--primary-color, #2563eb);
}

/* Quick Action Buttons */
.study-action-btn {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.15s ease;
}

.study-action-btn:hover {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}

.btn-hdr-study {
    color: var(--primary-color, #2563eb) !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.btn-hdr-study:hover {
    background: var(--primary-color, #2563eb) !important;
    color: #ffffff !important;
}

.btn-detail-study {
    color: var(--primary-color, #2563eb);
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(37, 99, 235, 0.06);
}

.btn-detail-study:hover {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}

.btn-mobile-study {
    color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.08);
}

/* ═══════════════════════════════════════════════════════
   WORKSPACE MODALS (Notion Aesthetic)
   ═══════════════════════════════════════════════════════ */
.workspace-modal-card {
    max-width: 480px;
    width: 92%;
    padding: 1.6rem;
    border-radius: 14px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(55, 53, 47, 0.16));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    z-index: 1000000;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border, rgba(55, 53, 47, 0.08));
}

.workspace-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workspace-modal-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.workspace-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.workspace-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.workspace-modal-close:hover {
    background: var(--bg-hover, rgba(55, 53, 47, 0.08));
    color: var(--text);
}

.workspace-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.workspace-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, rgba(55, 53, 47, 0.08));
}

.form-group-notion {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label-notion {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input-notion {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border, rgba(55, 53, 47, 0.18));
    border-radius: 6px;
    background: var(--bg-main, #ffffff);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input-notion:focus {
    border-color: #2383e2;
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.2);
}

.ws-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.ws-emoji-btn {
    font-size: 1.35rem;
    padding: 0.4rem 0.2rem;
    background: var(--bg-hover, rgba(55, 53, 47, 0.04));
    border: 1.5px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    line-height: 1;
}

.ws-emoji-btn:hover {
    transform: scale(1.15);
    background: var(--bg-hover, rgba(55, 53, 47, 0.09));
}

.ws-emoji-btn.active {
    border-color: #2383e2;
    background: rgba(35, 131, 226, 0.12);
    transform: scale(1.08);
}

.ws-color-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ws-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

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

.ws-color-btn.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2.5px #2383e2, 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: scale(1.12);
}

.ws-danger-zone {
    margin-top: 0.5rem;
    padding: 0.9rem;
    border-radius: 8px;
    background: rgba(231, 76, 60, 0.06);
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.ws-danger-zone-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.25rem;
}

.ws-danger-zone-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.65rem;
}

.notion-btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.notion-btn-danger:hover {
    background: #c0392b;
}

.notion-btn-primary {
    background: #2383e2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.notion-btn-primary:hover {
    background: #1b6fc2;
}

.notion-btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border, rgba(55, 53, 47, 0.18));
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.notion-btn-secondary:hover {
    background: var(--bg-hover, rgba(55, 53, 47, 0.06));
    color: var(--text);
}

/* Study Hub Page */
.study-hub-container {
    max-width: 960px;
    margin: 0;
    padding: 1.5rem 1rem;
}

.study-hub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.study-hub-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.study-hub-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.study-hub-icon {
    font-size: 2rem;
}

.study-hub-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    color: var(--text-main, #0f172a);
}

.study-hub-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.study-note-preview-card {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
}

.study-note-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.study-badge-cat, .study-badge-time, .study-badge-hint {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-subtle, #f1f5f9);
    color: var(--text-muted, #475569);
    font-weight: 500;
}

.study-note-body {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main, #1e293b);
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.study-note-hint-box {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    font-size: 0.85rem;
    color: #92400e;
}

.study-modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.study-mode-card {
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color, #e2e8f0);
}

.mode-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mode-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mode-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-main, #0f172a);
}

.mode-desc {
    font-size: 0.825rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.4;
}

.mode-card-features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-muted, #475569);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-study-start {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    border-radius: 8px;
}

/* History in Hub */
.study-history-section {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.btn-link-subtle {
    font-size: 0.85rem;
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    font-weight: 500;
}

.badge-qtype, .badge-diff {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-subtle, #f1f5f9);
    font-weight: 500;
}

.score-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.score-high { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.score-mid { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.score-low { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

.btn-action-small {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    background: var(--bg-subtle, #f1f5f9);
    color: var(--text-main, #0f172a);
    border: 1px solid var(--border-color, #e2e8f0);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.btn-action-small:hover {
    background: var(--bg-hover, #e2e8f0);
}

/* New Exam Page */
.new-exam-container {
    max-width: 780px;
    margin: 0;
    padding: 1.5rem 1rem;
}

.new-exam-card {
    padding: 1.75rem;
    border-radius: 14px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.exam-header-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.banner-icon {
    font-size: 2rem;
}

.banner-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-main, #0f172a);
}

.banner-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.note-summary-box {
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.25rem;
}

.summary-content {
    font-size: 0.9rem;
    color: var(--text-main, #1e293b);
    line-height: 1.4;
}

.summary-hint {
    margin-top: 0.4rem;
    font-size: 0.825rem;
    color: #92400e;
}

.form-label-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    margin-bottom: 0.75rem;
}

.label-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color, #2563eb);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.type-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-card-label {
    cursor: pointer;
}

.type-radio-input {
    display: none;
}

.type-card {
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transition: all 0.15s ease;
    background: var(--bg-card, #ffffff);
    height: 100%;
}

.type-radio-input:checked + .type-card {
    border-color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.04);
}

.type-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.2rem;
    color: var(--text-main, #0f172a);
}

.type-desc {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    line-height: 1.3;
}

.pill-options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.pill-option-label {
    cursor: pointer;
}

.pill-radio {
    display: none;
}

.pill-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    transition: all 0.15s ease;
}

.pill-radio:checked + .pill-btn,
.pill-btn.active {
    background: var(--primary-color, #6366f1) !important;
    border-color: var(--primary-color, #6366f1) !important;
    color: #ffffff !important;
}

/* Soru Sayısı Stepper & Aksiyon Butonu */
.stepper-action-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: fit-content;
}

.exam-stepper-container {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    box-shadow: var(--shadow-sm);
}

.btn-stepper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-stepper:hover {
    background: var(--hover);
    color: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
}

.btn-stepper .material-symbols-outlined {
    font-size: 1.25rem;
}

.stepper-number-input {
    width: 58px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper-number-input::-webkit-outer-spin-button,
.stepper-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-stepper-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.35rem;
    height: 42px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary, #6366f1);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
    transition: all 0.2s ease;
}

.btn-stepper-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

.btn-stepper-submit.is-loading,
.btn-retake-new.is-loading {
    opacity: 0.88;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: var(--primary-hover, #4f46e5) !important;
    transform: none !important;
    box-shadow: none !important;
}

.countdown-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    margin-left: 0.3rem;
    letter-spacing: 0.02em;
}

.stepper-hint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.stepper-hint-badge.badge-quick {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stepper-hint-badge.badge-balanced {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stepper-hint-badge.badge-comprehensive {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.stepper-hint-badge.badge-intensive {
    background: rgba(236, 72, 153, 0.12);
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.form-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Exam Taking View */
.exam-taking-container {
    max-width: 880px;
    margin: 0;
    padding: 1.5rem 1rem;
}

.exam-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.exam-type-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color, #2563eb);
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.exam-progress-wrapper {
    width: 100%;
    height: 6px;
    background: var(--bg-subtle, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.exam-progress-bar {
    height: 100%;
    background: var(--primary-color, #2563eb);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sınav Soru Kaynağı Banner'ı */
.exam-source-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.45;
}

.banner-ai-source {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--text-main, #0f172a);
}

.banner-fallback-source {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    color: #92400e;
}

.source-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.source-banner-content {
    flex: 1;
}

.source-banner-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.source-banner-title strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.source-model-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-color, #2563eb);
    text-transform: uppercase;
}

.banner-fallback-source .source-model-tag {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.source-banner-desc {
    margin: 0;
    font-size: 0.825rem;
    color: var(--text-muted, #475569);
}

.banner-fallback-source .source-banner-desc {
    color: #78350f;
}

.source-mini-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.source-mini-tag.ai-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color, #2563eb);
}

.source-mini-tag.fallback-tag {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.badge-source-mini {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.3rem;
    display: inline-block;
}

.badge-source-mini.badge-ai {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color, #2563eb);
}

.badge-source-mini.badge-local {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.question-card {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.qcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.q-number-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color, #2563eb);
}

.qcard-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.option-row {
    cursor: pointer;
    margin: 0;
}

.opt-radio {
    display: none;
}

.opt-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    transition: all 0.15s ease;
}

.opt-radio:checked + .opt-box {
    border-color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.06);
}

.opt-letter-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-subtle, #f1f5f9);
    color: var(--text-muted, #475569);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.opt-radio:checked + .opt-box .opt-letter-circle {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}

.opt-label-text {
    font-size: 0.95rem;
    color: var(--text-main, #1e293b);
}

.open-ended-textarea {
    width: 100%;
    font-size: 0.95rem;
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #cbd5e1);
    background: var(--bg-input, #ffffff);
    color: var(--text-main, #0f172a);
    resize: vertical;
}

.rubric-hint-box {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    background: var(--bg-subtle, #f8fafc);
}

.exam-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

/* Exam Result Page */
.exam-result-container {
    max-width: 960px;
    margin: 0;
    padding: 1.5rem 1rem;
}

.result-hero-card {
    padding: 1.75rem;
    border-radius: 14px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.result-hero-grid {
    display: grid;
    grid-template-columns: 160px 1fr 140px;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .result-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.result-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-circular-badge {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.score-badge-high { background: #22c55e; color: #ffffff; }
.score-badge-mid { background: #f59e0b; color: #ffffff; }
.score-badge-low { background: #ef4444; color: #ffffff; }

.score-num {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.score-lbl {
    font-size: 0.7rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

.score-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
}

.stat-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.stat-correct { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.stat-wrong { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.stat-empty { background: rgba(148, 163, 184, 0.2); color: #475569; }

.ai-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ai-feedback-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main, #0f172a);
}

.ai-feedback-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main, #1e293b);
    margin-bottom: 0.75rem;
}

.ai-meta-info {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    display: flex;
    gap: 0.4rem;
}

.result-actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.section-title-clean {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main, #0f172a);
}

.result-qa-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qa-detail-card {
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.qa-card-correct {
    border-left: 4px solid #22c55e;
}

.qa-card-wrong {
    border-left: 4px solid #ef4444;
}

.qa-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.qa-badge-order {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.qa-status-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.pill-correct { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.pill-wrong { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

.qa-question-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    margin-bottom: 0.75rem;
}

.qa-options-review {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.opt-review-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
}

.opt-is-correct {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #15803d;
    font-weight: 600;
}

.opt-is-wrong-user {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #b91c1c;
    font-weight: 600;
}

.opt-tag-user {
    font-size: 0.75rem;
    color: #ef4444;
    margin-left: auto;
}

.opt-tag-correct {
    font-size: 0.75rem;
    color: #15803d;
    margin-left: auto;
}

.open-answer-box {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.user-answer-box {
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
}

.ideal-answer-box {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.box-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #475569);
    display: block;
    margin-bottom: 0.25rem;
}

.box-text {
    color: var(--text-main, #0f172a);
    line-height: 1.4;
}

.qa-explanation-box {
    background: rgba(241, 245, 249, 0.7);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.825rem;
    color: var(--text-main, #334155);
}

.feedback-sub-item {
    margin-bottom: 0.3rem;
}
.feedback-sub-item:last-child {
    margin-bottom: 0;
}

/* 5-Stage Memorization View */
.memorize-container {
    max-width: 960px;
    margin: 0;
    padding: 1.5rem 1rem;
}

.memorize-header {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

.header-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stage-main-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.stage-badge-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.15);
    color: #7e22ce;
}

.stage-stepper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
}

.step-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    cursor: pointer;
    transition: all 0.15s ease;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-subtle, #f1f5f9);
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
}

.step-btn.active {
    border-color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.08);
}
.step-btn.active .step-num {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}
.step-btn.active .step-label {
    color: var(--primary-color, #2563eb);
}

.step-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.stage-card {
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.stage-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stage-banner-icon {
    font-size: 1.8rem;
}

.stage-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    color: var(--text-main, #0f172a);
}

.stage-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.memorize-full-text-box {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main, #0f172a);
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.25rem;
}

.memorize-hint-box {
    padding: 0.75rem;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    font-size: 0.875rem;
    color: #92400e;
    margin-bottom: 1.25rem;
}

.stage-progress-bar-wrap {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-subtle, #e2e8f0);
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.stage-progress-bar {
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.stage-prog-text {
    position: absolute;
    right: 0;
    top: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.interactive-text-flow {
    font-size: 1.15rem;
    line-height: 2.2;
    padding: 1.25rem;
    border-radius: 8px;
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 1.5rem;
}

.word-input-unit {
    display: inline-flex;
    align-items: center;
    margin-right: 0.35rem;
}

.char-input {
    width: 22px;
    height: 30px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    padding: 0;
    margin-right: 1px;
    outline: none;
    transition: all 0.15s ease;
}

.char-input:focus {
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.char-correct {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.15) !important;
    color: #15803d !important;
}

.char-wrong {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c !important;
    animation: shake 0.2s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.word-rest {
    color: var(--text-main, #1e293b);
}

/* Stage 3 Faded */
.stage3-faded-flow .word-faded-full {
    opacity: 0.45;
    color: var(--text-main, #334155);
}

/* Stage 4 Sentences */
.sentences-flow {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sentence-row {
    display: flex;
    gap: 0.6rem;
    padding: 0.85rem;
    border-radius: 8px;
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    font-size: 1.05rem;
    line-height: 1.6;
}

.sent-num {
    font-weight: 700;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.word-blank-input {
    border: 1px solid #94a3b8;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    min-width: 90px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
}

.blank-correct {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.15) !important;
    color: #15803d !important;
}

.blank-wrong {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c !important;
}

/* Stage 5 Recall */
.stage5-textarea {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.6;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #cbd5e1);
    background: var(--bg-input, #ffffff);
    color: var(--text-main, #0f172a);
    margin-bottom: 1.25rem;
}

.stage-result-box {
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--bg-subtle, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    text-align: center;
    margin-top: 1.5rem;
}

.result-score-display {
    margin-bottom: 1rem;
}

.res-pct {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color, #2563eb);
    display: block;
}

.res-msg {
    font-size: 1rem;
    font-weight: 600;
}

.result-btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.recall-diff-box {
    text-align: left;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.diff-tokens-wrap {
    margin-top: 0.5rem;
}

.diff-w-correct {
    color: #15803d;
    background: rgba(34, 197, 94, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 600;
}

.diff-w-wrong {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    text-decoration: line-through;
}

.diff-w-missing {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.stage-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ================================================== */
/* NATIVE-APP BUTTON STATES & MICRO-INTERACTIONS      */
/* ================================================== */
.btn:active:not(:disabled),
.btn-mobile-touch-action:active:not(:disabled),
.btn-detail-action:active:not(:disabled),
.cat-action-btn:active:not(:disabled) {
    transform: scale(0.95);
    transition: transform 0.06s ease;
}

.btn:disabled,
.btn-mobile-touch-action:disabled,
.btn-detail-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8 !important;
}

.btn-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: native-spin 0.6s linear infinite;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes native-spin {
    to { transform: rotate(360deg); }
}

/* Animasyonlu kart & satır kaldırma */
.item-dismissing {
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s ease, padding 0.35s ease, margin 0.35s ease !important;
    opacity: 0 !important;
    transform: translateX(40px) scale(0.96) !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Global Native Toast Bildirimi */
.native-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 4px solid var(--primary, #6366f1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 0.925rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: nativeToastIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 420px;
    line-height: 1.4;
}

.native-toast span {
    color: #1e293b !important;
}

.native-toast.toast-success {
    border-left-color: #10b981;
}

.native-toast.toast-success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.native-toast.toast-error {
    border-left-color: #ef4444;
}

.native-toast.toast-error::before {
    content: "✕";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.native-toast.toast-info {
    border-left-color: #3b82f6;
}

.native-toast.toast-info::before {
    content: "ℹ";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

/* ===== Appearance & Typography Preferences UI ===== */
.profile-appearance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.appearance-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
}

.appearance-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.appearance-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.appearance-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.appearance-control-group {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.appearance-control-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.appearance-control-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.appearance-control-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.font-scale-stepper {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.scale-step-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.4rem;
    border: 1.5px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s ease;
    text-align: center;
    user-select: none;
}

.scale-step-btn:hover {
    background: var(--bg-hover);
}

.scale-step-btn.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.scale-step-sample {
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
    font-weight: 700;
}

.scale-step-label {
    font-size: 0.78rem;
    color: inherit;
    font-weight: 600;
}

.scale-step-tag {
    font-size: 0.68rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* Appearance Live Preview Box */
.appearance-preview-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.appearance-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.appearance-preview-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.appearance-save-status {
    font-size: 0.82rem;
    color: var(--success);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.appearance-save-status.show {
    opacity: 1;
}

.appearance-preview-content {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow: hidden;
}

.preview-sidebar-mock {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.45rem;
    height: var(--sidebar-row-height, 29px);
    border-radius: 4px;
    font-size: var(--sidebar-font-size-base, 13.5px);
    color: var(--text);
}

.preview-sidebar-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.preview-sidebar-item .item-icon {
    font-size: var(--sidebar-icon-size, 1rem);
}

.preview-note-mock {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-note-mock .preview-note-text {
    font-size: var(--note-font-size-base, 1.05rem);
    line-height: var(--note-line-height, 1.75);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.preview-note-mock .preview-note-hint {
    font-size: var(--note-font-size-hint, 0.95rem);
    color: #92400e;
    background: #fffdfa;
    border: 1px solid #fef3c7;
    border-radius: 4px;
    padding: 0.35rem 0.55rem;
}

@media (max-width: 640px) {
    .appearance-preview-content {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   RUTİNLER & GÖREV TAKİBİ (HABITS & HÜMA BIRD VISUALIZER) STYLES
   ========================================================================== */

.notion-badge-routine {
    background: #6366f1;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-left: auto;
}

.routines-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 0 0 0;
}

.routines-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.routines-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.routines-icon-badge {
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.routines-title {
    font-size: var(--font-2xl, 1.35rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.routines-subtitle {
    font-size: var(--font-sm, 0.85rem);
    color: var(--text-muted);
    margin: 0.2rem 0 0 0;
    line-height: 1.35;
}

.routines-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tarih Gezinti Çubuğu */
.routines-date-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.date-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.btn-icon-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-sidebar);
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-icon-nav:hover {
    background: var(--hover);
    color: var(--primary);
}

.date-picker-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.routine-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.date-display-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    user-select: none;
}

.date-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.date-badge-today { background: #dcfce7; color: #166534; }
.date-badge-past { background: #fef3c7; color: #92400e; }
.date-badge-future { background: #e0e7ff; color: #3730a3; }

/* 2-Kolonlu Ana Izgara */
.routines-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.75rem;
    align-items: start;
}

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

/* Günlük İlerleme Kartı */
.routine-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-counts {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.completed-count {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #6366f1);
}

.separator {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.total-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.progress-counts .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.progress-percent {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.routine-progress-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.routine-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #10b981);
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Görev Grupları & Kartları */
.task-group {
    margin-bottom: 1.5rem;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-pending { background: #f59e0b; }
.dot-completed { background: #10b981; }

.group-badge {
    font-size: 0.7rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.task-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.routine-task-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--task-color, #6366f1);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.routine-task-card:hover {
    border-color: var(--border-hover, #cbd5e1);
    box-shadow: var(--shadow-md);
}

.routine-task-card.is-completed {
    opacity: 0.75;
    background: var(--bg-sidebar);
}

.routine-task-card.is-completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-check-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s ease, transform 0.1s ease;
}

.task-check-btn:hover {
    color: var(--primary);
    transform: scale(1.15);
}

.routine-task-card.is-completed .task-check-btn {
    color: #10b981;
}

.task-check-btn .check-icon {
    font-size: 1.45rem;
}

.task-card-content {
    flex: 1;
    cursor: pointer;
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.task-color-tag {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.task-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0 0;
    line-height: 1.4;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
    flex-wrap: wrap;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.task-badge .material-symbols-outlined {
    font-size: 0.85rem;
}

.task-card-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-card-action {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-card-action:hover {
    background: var(--hover);
    color: var(--text);
}

.routine-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.empty-icon {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
}

/* SAĞ KOLON: Hüma Kuşu & Başarı Kartı */
.huma-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.huma-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.huma-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.huma-icon {
    font-size: 1.75rem;
}

.huma-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.huma-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.1rem 0 0 0;
}

.huma-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-huma-view-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-sidebar);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-huma-view-toggle:hover,
.btn-huma-view-toggle.active {
    background: var(--hover);
    color: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
}

.btn-huma-view-toggle .material-symbols-outlined {
    font-size: 1.1rem;
}

.huma-illumination-pill {
    font-size: 0.75rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

/* Hüma Kuşu Piksel Grid & Master Canvas */
.huma-canvas-wrapper {
    position: relative;
    background: #110d28;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 210px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Orijinal Master Sanat Eseri Katmanı */
.huma-master-artwork-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

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

/* Saf Sanat Eseri Görünümü Modu */
.huma-canvas-wrapper.view-mode-artwork .huma-master-artwork-layer {
    opacity: 1 !important;
    filter: saturate(1.1) brightness(1.05) !important;
}

.huma-canvas-wrapper.view-mode-artwork .huma-pixel-grid {
    opacity: 0.2;
}

.huma-pixel-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5px;
    user-select: none;
    transition: opacity 0.3s ease;
}

.huma-grid-row {
    display: flex;
    gap: 1.5px;
}

.huma-pixel {
    width: 6.5px;
    height: 6.5px;
    border-radius: 1px;
    position: relative;
    transition: all 0.15s ease;
}

@media (min-width: 1200px) {
    .huma-pixel {
        width: 7.2px;
        height: 7.2px;
    }
}

.pixel-empty {
    background: transparent;
}

.pixel-unplanned {
    background: rgba(32, 25, 70, 0.4);
}

.pixel-planned {
    background: rgba(245, 158, 11, 0.2);
    border: 0.5px solid rgba(245, 158, 11, 0.6);
}

.pixel-active {
    background-color: var(--pixel-color, #6366f1);
    transform: scale(1.12);
    z-index: 5;
    box-shadow: 0 0 4px var(--pixel-color, #6366f1);
}

/* Tooltip on hover */
.huma-pixel[data-tooltip]:not([data-tooltip=""]):hover {
    transform: scale(1.8);
    z-index: 100;
    box-shadow: 0 0 8px #ffffff;
}

.huma-pixel[data-tooltip]:not([data-tooltip=""]):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #334155;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.huma-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.85rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-box {
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.box-active { background: #6366f1; }
.box-planned { background: rgba(245, 158, 11, 0.3); border: 1px solid #f59e0b; }
.box-empty { background: rgba(148, 163, 184, 0.2); border: 1px solid rgba(148, 163, 184, 0.3); }

.huma-footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

.huma-footer-meta .icon {
    font-size: 0.9rem;
}

/* Başarı Yılı Kartı */
.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.achievement-icon {
    font-size: 1.6rem;
}

.achievement-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.achievement-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0.1rem 0 0 0;
}

.achievement-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.stat-box {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.stat-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary, #6366f1);
}

.stat-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.achievement-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-sidebar);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.achievement-footer .material-symbols-outlined {
    font-size: 1rem;
    color: #10b981;
}

/* Modallar & Form Bileşenleri */
.notion-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 1rem;
}

.notion-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.notion-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.2));
    transform: translateY(15px);
    transition: transform 0.2s ease;
}

.notion-modal.modal-lg { max-width: 680px; }
.notion-modal.modal-md { max-width: 480px; }

.notion-modal-overlay.active .notion-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

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

.recurrence-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.recurrence-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

.days-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.day-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
}

.color-picker-palette {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.color-swatch-label {
    position: relative;
    cursor: pointer;
}

.color-swatch-label input {
    position: absolute;
    opacity: 0;
}

.color-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch-label input:checked + .color-swatch {
    transform: scale(1.15);
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg-card);
}

/* Rutin Yönetimi Modalı */
.manage-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.manage-tabs .tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.manage-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 450px;
    overflow-y: auto;
}

.manage-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.manage-item-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.manage-item-info {
    flex: 1;
}

.manage-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.manage-item-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.manage-item-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-danger-outline {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 4px;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
    font-size: 0.78rem;
}

.btn-danger-outline:hover {
    background: #fef2f2;
}

/* Ay Takvimi Modalı */
.cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cal-nav h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s ease;
    padding: 2px;
}

.cal-cell:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.cal-cell.is-today {
    border: 2px solid var(--primary);
}

.cal-cell.is-selected {
    background: #e0e7ff;
}

.cal-cell.status-full {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}

.cal-cell.status-partial {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.cal-badge {
    font-size: 0.6rem;
    padding: 0.05rem 0.25rem;
    border-radius: 3px;
    margin-top: 2px;
}

.cal-badge.status-full { background: #dcfce7; color: #166534; }
.cal-badge.status-partial { background: #fef3c7; color: #92400e; }
.cal-badge.status-empty { background: #fee2e2; color: #991b1b; }

.cal-legend {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.cal-leg-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-full { background: #10b981; }
.dot-partial { background: #f59e0b; }
.dot-empty { background: #ef4444; }

/* ==========================================================================
   Rutinler - Yeni Tekrar Tipleri, Arama & Geçmiş Denetim Stilleri
   ========================================================================== */

/* Tekrar Alanları Detay Grupları */
.recurrence-detail-group {
    background: var(--bg-hover, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    animation: fadeInRecurrence 0.2s ease-in-out;
}

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

.form-callout-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary, #6366f1);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text);
    font-size: 0.85rem;
}

.form-callout-info .callout-icon {
    color: var(--primary, #6366f1);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-callout-info p {
    margin: 0.2rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.form-sublabel {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Rutinleri Yönet Arama ve Filtreleme Araç Çubuğu */
.manage-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.manage-search-box {
    position: relative;
    flex: 1 1 240px;
    display: flex;
    align-items: center;
}

.manage-search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    pointer-events: none;
}

.manage-search-box .search-input {
    padding-left: 2.25rem;
    padding-right: 2rem;
    width: 100%;
}

.manage-search-box .btn-clear-search {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem;
}

.manage-filter-selects {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 240px;
}

.manage-filter-selects select {
    flex: 1;
    font-size: 0.85rem;
}

.manage-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.manage-empty-state .empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Rutin Geçmişi & Denetim Modalı */
.history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-color-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary, #6366f1);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.history-subtitle-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.history-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 72vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* KPI Kartları */
.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
}

.history-stat-box {
    background: var(--bg-sidebar, #f9fafb);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: transform 0.15s ease;
}

.history-stat-box:hover {
    transform: translateY(-1px);
}

.history-stat-box .stat-number {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.history-stat-box .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

.history-stat-box.stat-done .stat-number { color: #10b981; }
.history-stat-box.stat-missed .stat-number { color: #ef4444; }
.history-stat-box.stat-rate .stat-number { color: var(--primary, #6366f1); }
.history-stat-box.stat-streak .stat-number { color: #f59e0b; }

/* Filtre Araç Çubuğu */
.history-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-hover, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.history-filter-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.history-preset-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.history-preset-btn:hover {
    color: var(--text);
    border-color: var(--primary);
}

.history-preset-btn.active {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: var(--primary, #6366f1);
}

.history-custom-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-date-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.form-input-sm {
    padding: 0.25rem 0.45rem;
    font-size: 0.78rem;
}

/* Izgara & Liste Başlıkları */
.history-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.history-sub-header .sub-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.matrix-legend {
    display: flex;
    gap: 0.75rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.matrix-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.matrix-box.box-completed { background: #10b981; }
.matrix-box.box-missed { background: #e5e7eb; border: 1px solid #d1d5db; }

/* Günlük Kontrol Kutuları Izgarası */
.history-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
    background: var(--bg-sidebar, #f9fafb);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    max-height: 160px;
    overflow-y: auto;
}

.matrix-day-box {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    position: relative;
}

.matrix-day-box:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.matrix-day-box.box-completed {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.matrix-day-box.box-missed {
    background: var(--bg-hover, #f3f4f6);
    border: 1px dashed var(--border, #d1d5db);
    color: var(--text-muted, #9ca3af);
}

.matrix-day-box .box-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.matrix-day-box .box-date-tag {
    font-size: 0.58rem;
    opacity: 0.85;
    margin-top: 1px;
}

/* Detaylı Kronolojik Denetim Listesi */
.history-audit-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.history-audit-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-sidebar, #f9fafb);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    transition: background 0.15s ease;
}

.history-audit-row:hover {
    background: var(--bg-hover, #f3f4f6);
}

.history-audit-row.is-completed {
    border-left: 3px solid #10b981;
}

.history-audit-row.is-missed {
    border-left: 3px solid #ef4444;
}

.btn-audit-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.history-audit-row.is-completed .btn-audit-toggle {
    color: #10b981;
}

.history-audit-row.is-missed .btn-audit-toggle:hover {
    color: #10b981;
}

.btn-audit-toggle .check-icon {
    font-size: 1.3rem;
}

.audit-row-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    flex: 1;
}

.audit-day-name {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.audit-today-badge {
    background: var(--primary, #6366f1);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

.audit-row-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.audit-status-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-audit-done {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.badge-audit-missed {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.audit-time {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.history-loading, .history-error, .history-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.history-loading .spin-icon {
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 0.3rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL MODAL BACKDROP & CARD (Not Pazarı & Genel)
   ═══════════════════════════════════════════════════════════ */
.modal-backdrop,
.mp-modal-backdrop,
#marketplacePublishModalBackdrop,
#importModalBackdrop {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal-card,
.mp-publish-modal-card,
.mp-import-modal-card {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-radius: 14px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45) !important;
    border: 1px solid #e2e8f0 !important;
    position: relative !important;
    max-width: 580px !important;
    width: 95% !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.modal-card > form,
.modal-form-flex {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.modal-body {
    padding: 20px !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: calc(90vh - 140px);
    -webkit-overflow-scrolling: touch;
}

.modal-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 14px 20px !important;
    border-top: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}










/* Tüm Notlar: detay kartı isteğe bağlı yüklenirken gösterilen durum */
.note-detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 56px 16px;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
}

.note-detail-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: noteDetailSpin 0.7s linear infinite;
}

@keyframes noteDetailSpin {
    to { transform: rotate(360deg); }
}

/* Hatırla: sıradaki kart partisi yüklenirken */
.review-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
}

/* ===== Tüm Notlar: not detayı içerik alanının genişliğine uyum sağlar ===== */
.note-full-detail-pane {
    max-width: none;
    container-type: inline-size;
    container-name: note-detail;
}

/* Genel .action-label (Hatırla sayfası) kuralı buton yazısını yukarı itiyordu */
.btn-detail-action .action-label {
    margin: 0;
}

.detail-top-nav-bar {
    flex-wrap: wrap;
    row-gap: 0.4rem;
}

.detail-nav-left {
    flex-shrink: 1;
    min-width: 0;
}

.detail-time-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-nav-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}

/* Alan daraldıkça önce buton yazıları, sonra tarih bilgisi gizlenir (ekran değil, detay alanının genişliği) */
@container note-detail (max-width: 860px) {
    .btn-detail-action .action-label {
        display: none;
    }
    .btn-detail-action {
        padding: 0.3rem 0.45rem;
    }
}

@container note-detail (max-width: 560px) {
    .detail-time-text,
    .detail-nav-divider {
        display: none;
    }
}

/* ===== Sol menü: alt bölüm HTML'de ağaçtan önce gelir, görsel olarak en altta durur ===== */
.notion-sidebar-section {
    order: 1;
}

.notion-sidebar-utility {
    order: 2;
}

.notion-sidebar-user {
    order: 3;
}

/* ===== Sayfa geçişleri: "yenileniyor" hissi olmadan yumuşak geçiş (View Transitions) =====
   Sol menü geçişte sabit kalır; yalnızca içerik alanı çok kısa bir geçişle değişir.
   Desteklemeyen tarayıcılar bu kuralları yok sayar ve normal geçiş yapar. */
@view-transition {
    navigation: auto;
}

.notion-sidebar {
    view-transition-name: app-sidebar;
}

/* Üst çubuk (Ara / + Yeni Not) da geçişte solup açılmaz */
.notion-topbar {
    view-transition-name: app-topbar;
}

::view-transition-group(app-sidebar),
::view-transition-old(app-sidebar),
::view-transition-new(app-sidebar),
::view-transition-group(app-topbar),
::view-transition-old(app-topbar),
::view-transition-new(app-topbar) {
    animation: none;
}

::view-transition-old(app-sidebar),
::view-transition-old(app-topbar) {
    display: none;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 120ms;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

/* ===== Material simgeleri: font yüklenene kadar simge adı ("edit_square", "add"…) görünmez metin olarak
   yer kaplayıp yanındaki yazıyı itiyordu. Genişlik her zaman tek simge (1em) kadar sabitlenir. ===== */
.material-symbols-outlined {
    display: inline-block;
    width: 1em;
    min-width: 1em;
    max-width: 1em;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Sağ kenar hizası: kategori değişince içerik sağa/sola oynamasın =====
   Uzun listelerde kaydırma çubuğu çıkıp tabloyu daraltıyordu, kısa listelerde çıkmıyordu.
   Çubuk payı her zaman ayrılır ve üst çubuk aynı pay + aynı kenar boşluğuyla hizalanır. */
:root {
    --content-pad-x: 2.25rem;
}

@media (max-width: 768px) {
    :root {
        --content-pad-x: 1rem;
    }
}

.notion-content-area {
    scrollbar-gutter: stable;
    padding-left: var(--content-pad-x);
    padding-right: var(--content-pad-x);
}

.notion-topbar {
    padding-left: var(--content-pad-x);
    padding-right: calc(var(--content-pad-x) + var(--scrollbar-gutter-w, 0px));
}

/* ===== Profil: Arama & Gizlilik ===== */
.search-pref-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.search-pref-option {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.search-pref-option:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.search-pref-option:hover { background: var(--bg-hover); }
.search-pref-option.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.06); }
.search-pref-option.disabled { opacity: 0.55; cursor: not-allowed; }
.search-pref-option input { position: absolute; opacity: 0; pointer-events: none; }
.spo-title { font-weight: 600; font-size: 0.98rem; }
.spo-desc { font-size: 0.85rem; line-height: 1.45; color: var(--text-muted); }
.spo-meta { font-size: 0.78rem; color: var(--text-muted); }
.spo-meta:empty { display: none; }
.search-pref-status {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
