/* E-Kitap Admin Panel - Modern Dark Mode Design */

:root {
    --color-primary: #667eea;
    --color-primary-dark: #5568d3;
    --color-secondary: #764ba2;
    --color-success: #43e97b;
    --color-warning: #f5a623;
    --color-error: #f5576c;
    --color-info: #4facfe;

    --bg-primary: #0f1419;
    --bg-secondary: #1a1f29;
    --bg-tertiary: #252c3a;
    --bg-hover: #2d3548;

    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;

    --border-color: #2d3548;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font sizes */
    --font-xs: 11px;
    --font-sm: 13px;
    --font-md: 15px;
    --font-lg: 18px;
    --font-xl: 24px;
    --font-2xl: 32px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Performans: Spesifik transition'lar */
    --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-opacity: opacity 0.3s ease;
    --transition-colors: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-hover: #dee2e6;

    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;

    --border-color: #dee2e6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo .material-icons-round {
    font-size: 64px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .material-icons-round {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 20px;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(245, 87, 108, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

/* App Layout */
.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    font-size: 32px;
    color: var(--color-primary);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar.collapsed .user-details {
    display: none;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
}

#page-title {
    font-size: 24px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .material-icons-round {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 20px;
}

.search-box input {
    padding: 10px 16px 10px 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: 260px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    width: 320px;
}

.theme-toggle {
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    background: var(--bg-hover);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.page.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Stat Trend */
.stat-trend {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.stat-trend.up {
    color: var(--color-success);
}

.stat-trend.down {
    color: var(--color-error);
}

/* Activity Feed Items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content strong {
    color: var(--color-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
    transition: var(--transition);
}

.tag-cloud-item:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.05);
}

.tag-cloud-item.size-xl { font-size: 20px; padding: 8px 20px; }
.tag-cloud-item.size-lg { font-size: 17px; padding: 7px 18px; }
.tag-cloud-item.size-md { font-size: 14px; }
.tag-cloud-item.size-sm { font-size: 12px; padding: 4px 12px; }

/* Tabs Inline */
.tabs-inline {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
}

.tabs-inline .tab {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tabs-inline .tab.active {
    background: var(--color-primary);
    color: white;
}

/* Alert Cards */
.alert-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
}

.alert-card:last-child { margin-bottom: 0; }
.alert-card.alert-warning { background: rgba(245, 166, 35, 0.1); color: var(--color-warning); }
.alert-card.alert-info { background: rgba(79, 172, 254, 0.1); color: var(--color-info); }
.alert-card.alert-success { background: rgba(67, 233, 123, 0.1); color: var(--color-success); }
.alert-card.alert-error { background: rgba(245, 87, 108, 0.1); color: var(--color-error); }

/* Sortable Table Headers */
.table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.table th.sortable:hover {
    color: var(--color-primary);
}

.table th.sortable::after {
    content: 'unfold_more';
    font-family: 'Material Icons Round';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
}

.table th.sortable.asc::after {
    content: 'expand_less';
    color: var(--color-primary);
}

.table th.sortable.desc::after {
    content: 'expand_more';
    color: var(--color-primary);
}

/* Bulk Select Checkbox */
.bulk-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Export Button Group */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    min-width: 160px;
    display: none;
    overflow: hidden;
}

.export-menu.show { display: block; }

.export-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    border: none;
    background: none;
    width: 100%;
    transition: var(--transition);
}

.export-menu-item:hover {
    background: var(--bg-hover);
}

/* Card */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-filters {
    display: flex;
    gap: 12px;
}

.card-body {
    padding: 24px;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* Form Elements */
.input-text,
.input-select {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.input-text:focus,
.input-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header-actions {
    display: flex;
    gap: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-hover);
}

.pagination button.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--color-primary);
}

.toast.success {
    border-left-color: var(--color-success);
}

.toast.error {
    border-left-color: var(--color-error);
}

.toast.warning {
    border-left-color: var(--color-warning);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-success {
    background: rgba(67, 233, 123, 0.15);
    color: #43e97b;
}

.badge-warning {
    background: rgba(245, 166, 35, 0.15);
    color: #f5a623;
}

.badge-error {
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c;
}

.badge-info {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: var(--color-primary);
}

/* Button Variants */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--color-primary);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #0f1419;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-error {
    background: linear-gradient(135deg, #f5576c, #ff6b81);
    color: white;
}

.btn-error:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: linear-gradient(135deg, #f5a623, #f7c948);
    color: #0f1419;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-sm .material-icons-round {
    font-size: 16px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-group {
    display: flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Textarea */
textarea.input-text {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Code / Pre */
code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--color-primary);
}

pre {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    gap: 4px;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .material-icons-round {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 24px;
}

/* Detail Info Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 15px;
    color: var(--text-primary);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.progress-fill.warning {
    background: linear-gradient(135deg, #f5a623, #f7c948);
}

.progress-fill.error {
    background: linear-gradient(135deg, #f5576c, #ff6b81);
}

/* Avatar Group */
.avatar-group {
    display: flex;
}

.avatar-group .user-avatar {
    margin-left: -8px;
    border: 2px solid var(--bg-secondary);
}

.avatar-group .user-avatar:first-child {
    margin-left: 0;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Tag / Chip */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 12px;
    transition: var(--transition);
}

.tag:hover {
    background: var(--bg-hover);
}

.tag .tag-remove {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
}

.tag .tag-remove:hover {
    opacity: 1;
    color: var(--color-error);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    padding: 6px;
    display: none;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item.danger {
    color: var(--color-error);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Modal Large */
.modal.modal-lg {
    max-width: 800px;
}

.modal.modal-xl {
    max-width: 1000px;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-label-required::after {
    content: ' *';
    color: var(--color-error);
}

.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
    line-height: 1.5;
}

/* Switch/Toggle */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch input {
    display: none;
}

.switch-slider {
    width: 44px;
    min-width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
}

.switch-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.switch:hover .switch-slider {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.08);
}

.switch input:checked+.switch-slider {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.switch input:checked+.switch-slider::after {
    transform: translateX(20px);
}

/* Toggle item - enhanced styling for book form cards */
.toggle-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: var(--transition);
}

.toggle-item:hover {
    border-color: rgba(102, 126, 234, 0.2);
    background: rgba(102, 126, 234, 0.04);
}

.toggle-item .toggle-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.toggle-item .toggle-icon.icon-free {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.toggle-item .toggle-icon.icon-featured {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.toggle-item .toggle-icon.icon-editor {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.toggle-item .toggle-info {
    flex: 1;
    min-width: 0;
}

.toggle-item .toggle-info .toggle-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toggle-item .toggle-info .toggle-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.toggle-item .switch {
    margin-top: 4px;
}

/* Status indicator dot */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 6px;
}

.status-indicator.status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-indicator.status-published {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-indicator.status-hidden {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Checkbox */
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 2px;
    color: #f5a623;
}

.star-rating .material-icons-round {
    font-size: 18px;
}

/* Cover Image */
.book-cover {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.book-cover-lg {
    width: 160px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online {
    background: var(--color-success);
    box-shadow: 0 0 0 3px rgba(67, 233, 123, 0.2);
}

.status-dot.offline {
    background: var(--text-muted);
}

.status-dot.warning {
    background: var(--color-warning);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Confirm Dialog */
.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Color Indicator */
.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Notification Badge */
.nav-item .notification-badge {
    background: var(--color-error);
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Info Box */
.info-box {
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-box .material-icons-round {
    color: var(--color-info);
    font-size: 20px;
    flex-shrink: 0;
}

/* File Upload */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-zone .material-icons-round {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.text-warning {
    color: var(--color-warning);
}

.text-info {
    color: var(--color-info);
}

.text-primary {
    color: var(--color-primary);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        border-radius: var(--radius-sm);
    }

    .mobile-menu-btn:hover {
        background: var(--bg-hover);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .search-box input {
        width: 200px;
    }

    .search-box input:focus {
        width: 240px;
    }

    .page-content {
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .card-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        margin: 10px;
    }

    .table {
        font-size: 13px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }

    .book-form-layout {
        grid-template-columns: 1fr !important;
    }

    .book-files-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========== Book Detail Page - Premium Redesign ========== */

/* Entrance animation */
@keyframes bdSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bdCoverFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes bdShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes bdSpinner {
    to { transform: rotate(360deg); }
}

.bd-animate-in {
    animation: bdSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Top action bar */
.bd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.bd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.bd-back-btn .material-icons-round {
    font-size: 18px;
}

.bd-back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(102, 126, 234, 0.3);
}

.bd-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bd-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.bd-action-btn .material-icons-round {
    font-size: 18px;
}

.bd-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.bd-action-btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
}

.bd-action-btn--primary:hover {
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Loading state */
.bd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.bd-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: bdSpinner 0.7s linear infinite;
}

.bd-loading-spinner--sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.bd-loading-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* Hero card */
.bd-hero {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bd-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.04) 100%);
    pointer-events: none;
}

.bd-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 100%;
}

.bd-hero-content {
    display: flex;
    gap: 32px;
    padding: 32px;
    position: relative;
    z-index: 1;
}

/* Cover */
.bd-cover-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 12px 36px rgba(0, 0, 0, 0.25);
    animation: bdCoverFloat 4s ease-in-out infinite;
    animation-delay: 1s;
}

.bd-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bd-cover-wrapper:hover .bd-cover-img {
    transform: scale(1.06);
}

.bd-cover-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
}

.bd-cover-wrapper:hover .bd-cover-shine {
    animation: bdShine 0.8s ease-out;
}

.bd-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-cover-placeholder .material-icons-round {
    font-size: 56px;
    color: var(--text-muted);
    opacity: 0.35;
}

/* Info section */
.bd-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    justify-content: center;
}

/* Status chips */
.bd-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bd-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bd-status-chip .material-icons-round {
    font-size: 14px;
}

.bd-status-chip--success {
    background: rgba(67, 233, 123, 0.12);
    color: #43e97b;
}

.bd-status-chip--secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.bd-status-chip--warning {
    background: rgba(245, 166, 35, 0.12);
    color: #f5a623;
}

.bd-status-chip--free {
    background: rgba(79, 172, 254, 0.12);
    color: #4facfe;
}

.bd-status-chip--premium {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
    color: #b794f6;
}

/* Title & Author */
.bd-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 4px 0 0 0;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.bd-author {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

.bd-author .material-icons-round {
    font-size: 18px;
    color: var(--color-primary);
    opacity: 0.7;
}

.bd-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin: 4px 0 0 0;
    max-height: 72px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.bd-description::-webkit-scrollbar {
    width: 4px;
}

.bd-description::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Timestamps */
.bd-timestamps {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.bd-timestamp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.bd-timestamp .material-icons-round {
    font-size: 14px;
    opacity: 0.6;
}

/* Hero action buttons */
.bd-hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bd-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.bd-hero-btn .material-icons-round {
    font-size: 18px;
}

.bd-hero-btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bd-hero-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.bd-hero-btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.bd-hero-btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.06);
    transform: translateY(-1px);
}

.bd-hero-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
}

.bd-hero-btn--sm .material-icons-round {
    font-size: 16px;
}

/* Meta section */
.bd-meta-section {
    margin-bottom: 20px;
}

.bd-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bd-meta-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    animation: bdSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    overflow: hidden;
}

.bd-meta-card:hover {
    border-color: rgba(102, 126, 234, 0.35);
    background: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.bd-meta-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bd-meta-icon .material-icons-round {
    font-size: 19px;
    color: var(--color-primary);
}

.bd-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.bd-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.bd-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    white-space: nowrap;
}

/* Translations card */
.bd-translations-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.bd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.bd-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bd-section-title .material-icons-round {
    font-size: 22px;
    color: var(--color-primary);
    opacity: 0.8;
}

.bd-section-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.bd-section-body {
    padding: 20px 24px;
}

/* ========== Book Detail Responsive ========== */

/* Large tablet */
@media (max-width: 1100px) {
    .bd-hero-content {
        gap: 24px;
        padding: 28px;
    }

    .bd-cover-wrapper {
        width: 170px;
        height: 255px;
    }

    .bd-title {
        font-size: 24px;
    }

    .bd-meta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .bd-topbar {
        flex-wrap: wrap;
    }

    .bd-topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .bd-action-btn {
        justify-content: center;
        padding: 10px 12px;
    }

    .bd-action-btn .bd-action-label {
        display: inline;
    }

    .bd-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 28px 24px;
        gap: 20px;
    }

    .bd-cover-wrapper {
        width: 160px;
        height: 240px;
        animation: none;
    }

    .bd-info {
        align-items: center;
    }

    .bd-badges {
        justify-content: center;
    }

    .bd-title {
        font-size: 22px;
    }

    .bd-author {
        justify-content: center;
    }

    .bd-description {
        text-align: center;
        max-height: 60px;
    }

    .bd-timestamps {
        justify-content: center;
    }

    .bd-hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .bd-hero-btn {
        min-width: 0;
    }

    .bd-meta-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .bd-meta-card {
        padding: 12px;
        gap: 10px;
    }

    .bd-meta-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
    }

    .bd-meta-icon .material-icons-round {
        font-size: 17px;
    }

    .bd-meta-value {
        font-size: 13px;
    }

    .bd-meta-label {
        font-size: 10px;
    }

    .bd-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 20px;
    }

    .bd-section-header .bd-hero-btn--sm {
        width: 100%;
    }

    .bd-section-body {
        padding: 16px 20px;
    }
}

/* Small mobile */
@media (max-width: 580px) {
    .bd-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .bd-topbar {
        margin-bottom: 16px;
    }

    .bd-back-btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .bd-back-btn .bd-back-label {
        display: none;
    }

    .bd-topbar-actions {
        gap: 6px;
    }

    .bd-action-btn {
        padding: 8px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .bd-action-btn .bd-action-label {
        display: none;
    }

    .bd-action-btn .material-icons-round {
        font-size: 20px;
    }

    .bd-hero-content {
        padding: 20px 16px;
        gap: 16px;
    }

    .bd-cover-wrapper {
        width: 130px;
        height: 195px;
    }

    .bd-title {
        font-size: 19px;
    }

    .bd-author {
        font-size: 14px;
    }

    .bd-hero-actions {
        grid-template-columns: 1fr;
    }

    .bd-hero-btn {
        width: 100%;
    }

    .bd-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bd-meta-card {
        padding: 10px;
        gap: 8px;
    }

    .bd-meta-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 7px;
    }

    .bd-meta-icon .material-icons-round {
        font-size: 16px;
    }

    .bd-meta-value {
        font-size: 12px;
    }

    .bd-meta-label {
        font-size: 9px;
    }

    .bd-section-header {
        padding: 14px 16px;
    }

    .bd-section-body {
        padding: 14px 16px;
    }
}

/* Very small mobile */
@media (max-width: 360px) {
    .bd-meta-grid {
        grid-template-columns: 1fr;
    }

    .bd-meta-card {
        padding: 12px;
        gap: 10px;
    }

    .bd-meta-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .bd-meta-value {
        font-size: 13px;
    }

    .bd-meta-label {
        font-size: 10px;
    }

    .bd-topbar-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Book Form Pages ========== */
.book-form-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.book-form-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.book-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--topbar-height) + 32px);
}

.book-form-card {
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.book-form-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-md);
}

.book-form-card .card-header {
    padding: 16px 20px;
    background: rgba(102, 126, 234, 0.03);
}

.book-form-card .card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.book-form-card .card-body {
    padding: 20px;
}

.book-form-card .form-group {
    margin-bottom: 20px;
}

.book-form-card .form-group:last-child {
    margin-bottom: 0;
}

.book-form-card .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
}

.book-form-card .input-text,
.book-form-card .input-select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition);
}

.book-form-card .input-text:focus,
.book-form-card .input-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: var(--bg-primary);
}

.book-form-card textarea.input-text {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

/* Cover Preview */
.book-cover-preview {
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 280px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed var(--border-color);
    overflow: hidden;
    position: relative;
}

.book-cover-preview .material-icons-round {
    font-size: 48px;
    color: var(--text-muted);
    opacity: 0.5;
}

.book-cover-preview p {
    font-size: 13px;
    color: var(--text-muted);
}

.book-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Book Files Grid */
.book-files-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.book-file-upload-card {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.book-file-upload-card:hover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.book-file-upload-card .material-icons-round {
    font-size: 32px;
    color: var(--color-primary);
    opacity: 0.7;
}

.book-file-upload-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.book-file-upload-card p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Book Stat Row */
.book-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.book-stat-row:last-child {
    border-bottom: none;
}

/* Existing file item */
.book-existing-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.book-existing-file .material-icons-round {
    font-size: 24px;
    color: var(--color-info);
}

.book-existing-file .file-info {
    flex: 1;
}

.book-existing-file .file-name {
    font-weight: 500;
    font-size: 14px;
}

.book-existing-file .file-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== BOOK FORM ENHANCEMENTS ========== */

/* Slug Preview Container */
.slug-preview-container {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.slug-prefix {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(102, 126, 234, 0.05);
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
    user-select: none;
}

.slug-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 500;
    padding: 10px 12px !important;
    flex: 1;
    min-width: 0;
}

.slug-input:focus {
    box-shadow: none !important;
}

/* Character Counter */
.char-counter {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.form-help-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    gap: 12px;
}

/* Form Validation Messages */
.form-validation-msg {
    font-size: 12px;
    color: var(--color-error);
    margin-top: 4px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.input-error {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.15) !important;
}

/* Required Label */
.form-label-required::after {
    content: ' *';
    color: var(--color-error);
    font-weight: 400;
}

/* Spin animation for loading icons */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== CONTENT UPLOAD MODAL (Enhanced) ========== */

/* Drag & Drop Upload Zone */
.content-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--bg-tertiary);
}

.content-upload-zone:hover,
.content-upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.08);
    transform: scale(1.01);
}

.content-upload-zone.dragover {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.content-upload-zone .upload-icon {
    font-size: 56px;
    color: var(--color-primary);
    opacity: 0.6;
    margin-bottom: 16px;
    transition: var(--transition);
}

.content-upload-zone:hover .upload-icon,
.content-upload-zone.dragover .upload-icon {
    opacity: 1;
    transform: translateY(-4px);
}

.content-upload-zone h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.content-upload-zone p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.content-upload-zone .upload-formats {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.content-upload-zone .format-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Selected File Preview */
.content-file-preview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    animation: fadeInUp 0.3s ease;
}

.content-file-preview .file-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.content-file-preview .file-icon.pdf { background: rgba(244, 67, 54, 0.12); color: #f44336; }
.content-file-preview .file-icon.epub { background: rgba(76, 175, 80, 0.12); color: #4caf50; }
.content-file-preview .file-icon.docx { background: rgba(33, 150, 243, 0.12); color: #2196f3; }
.content-file-preview .file-icon.txt { background: rgba(158, 158, 158, 0.12); color: #9e9e9e; }

.content-file-preview .file-details {
    flex: 1;
    min-width: 0;
}

.content-file-preview .file-details .file-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-file-preview .file-details .file-meta-row {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.content-file-preview .file-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(245, 87, 108, 0.1);
    color: var(--color-error);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.content-file-preview .file-remove:hover {
    background: rgba(245, 87, 108, 0.2);
    transform: scale(1.1);
}

/* Upload Settings Grid */
.upload-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.upload-settings-grid .form-group {
    margin-bottom: 0;
}

.upload-settings-grid label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Upload Progress (Enhanced) */
.upload-progress-enhanced {
    margin-top: 20px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.upload-progress-enhanced .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upload-progress-enhanced .progress-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-progress-enhanced .progress-status .material-icons-round {
    font-size: 18px;
}

.upload-progress-enhanced .progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

.upload-progress-enhanced .progress-track {
    width: 100%;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.upload-progress-enhanced .progress-track .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
}

.upload-progress-enhanced .progress-track .progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 2s infinite;
}

.upload-progress-enhanced .progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Upload Result Summary */
.upload-result-summary {
    background: rgba(67, 233, 123, 0.08);
    border: 1px solid rgba(67, 233, 123, 0.25);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    animation: fadeInUp 0.4s ease;
}

.upload-result-summary .result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.upload-result-summary .result-header .material-icons-round {
    color: var(--color-success);
    font-size: 28px;
}

.upload-result-summary .result-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-success);
}

.upload-result-summary .result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.upload-result-summary .result-stat {
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
}

.upload-result-summary .result-stat .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.upload-result-summary .result-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== CONTENT EDITOR PAGE ========== */
.content-editor-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
    min-height: calc(100vh - var(--topbar-height) - 140px);
}

/* Page Sidebar */
.ce-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--topbar-height) + 32px);
    max-height: calc(100vh - var(--topbar-height) - 80px);
}

.ce-sidebar .card {
    overflow: hidden;
}

.ce-page-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(102, 126, 234, 0.03);
}

.ce-page-list-header h4 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-page-list-header .page-count {
    font-size: 11px;
    background: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.ce-page-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.ce-page-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}

.ce-page-search input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Page List */
.ce-page-list {
    overflow-y: auto;
    max-height: calc(100vh - var(--topbar-height) - 300px);
    padding: 4px;
}

.ce-page-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.ce-page-item:hover {
    background: var(--bg-hover);
}

.ce-page-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.ce-page-item .page-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.ce-page-item.active .page-number {
    background: var(--color-primary);
    color: white;
}

.ce-page-item .page-title {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ce-page-item .page-chars {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ce-page-item.modified .page-number {
    box-shadow: 0 0 0 2px var(--color-warning);
}

/* Page List Actions */
.ce-page-actions {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.ce-page-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
}

/* Editor Main Area */
.ce-editor-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ce-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    gap: 12px;
}

.ce-editor-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ce-editor-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-editor-toolbar .page-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-editor-toolbar .page-indicator .material-icons-round {
    font-size: 20px;
    color: var(--color-primary);
}

.ce-page-title-input {
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    width: 100%;
    transition: var(--transition);
}

.ce-page-title-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ce-page-title-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Content Textarea */
.ce-content-area {
    position: relative;
}

.ce-content-textarea {
    width: 100%;
    min-height: 500px;
    padding: 24px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.8;
    resize: vertical;
    transition: border-color 0.3s;
}

.ce-content-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ce-content-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-muted);
}

.ce-content-footer .footer-stats {
    display: flex;
    gap: 20px;
}

.ce-content-footer .footer-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty Content State */
.ce-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.ce-empty-state .material-icons-round {
    font-size: 72px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 20px;
}

.ce-empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ce-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 24px;
}

.ce-empty-state .btn {
    margin: 0 6px;
}

/* Content Info Cards */
.ce-info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.ce-info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.ce-info-card .info-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.ce-info-card .info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Save Status */
.ce-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ce-save-indicator.saved {
    background: rgba(67, 233, 123, 0.1);
    color: var(--color-success);
}

.ce-save-indicator.unsaved {
    background: rgba(245, 166, 35, 0.1);
    color: var(--color-warning);
}

.ce-save-indicator.saving {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
}

/* Delete Page Confirmation */
.delete-page-warning {
    background: rgba(245, 87, 108, 0.08);
    border: 1px solid rgba(245, 87, 108, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive content editor */
@media (max-width: 1024px) {
    .content-editor-layout {
        grid-template-columns: 1fr;
    }

    .ce-sidebar {
        position: static;
        max-height: none;
    }

    .ce-page-list {
        max-height: 200px;
    }

    .ce-info-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-settings-grid {
        grid-template-columns: 1fr;
    }

    .upload-result-summary .result-stats {
        grid-template-columns: 1fr;
    }
}

/* ========== SETTINGS PAGE - Modern Redesign ========== */

.settings-page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* Settings Hero Header */
.settings-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.settings-hero-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.settings-hero-icon .material-icons-round {
    font-size: 26px;
    color: white;
}

.settings-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.settings-hero-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.settings-hero-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Settings Navigation Pills */
.settings-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.settings-nav-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: inherit;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.settings-nav-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: transparent;
    transition: background 0.25s ease;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.settings-nav-pill:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.settings-nav-pill.active {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.06);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.settings-nav-pill.active::before {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.settings-pill-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.settings-pill-icon .material-icons-round {
    font-size: 19px;
}

.settings-nav-pill.active .settings-pill-icon {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-pill-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.settings-pill-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.settings-pill-desc {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.settings-nav-pill.active .settings-pill-label {
    color: var(--color-primary);
}

/* Settings Content Card */
.settings-content-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Settings Item Cards */
.settings-items-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(102, 126, 234, 0.02);
}

.settings-item-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: all 0.25s ease;
}

.settings-item:hover .settings-item-icon {
    background: rgba(102, 126, 234, 0.1);
}

.settings-item-icon .material-icons-round {
    font-size: 18px;
    color: var(--text-muted);
}

.settings-item:hover .settings-item-icon .material-icons-round {
    color: var(--color-primary);
}

.settings-item-info {
    flex: 0 0 200px;
    min-width: 0;
}

.settings-item-key {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.3;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

.settings-item-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

.settings-item-type.type-string {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
}

.settings-item-type.type-number {
    background: rgba(245, 166, 35, 0.1);
    color: #f5a623;
}

.settings-item-type.type-boolean {
    background: rgba(67, 233, 123, 0.1);
    color: #43e97b;
}

.settings-item-type.type-json {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.settings-item-input {
    flex: 1;
    min-width: 0;
}

.settings-item-input .input-text,
.settings-item-input .input-select {
    width: 100%;
}

.settings-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.settings-item-actions .btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-item-actions .btn-icon .material-icons-round {
    font-size: 18px;
}

.settings-item-actions .btn-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
}

.settings-item-actions .btn-icon.btn-delete:hover {
    background: rgba(245, 87, 108, 0.1);
    color: var(--color-error);
}

/* Settings toolbar inside card */
.settings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(102, 126, 234, 0.02);
}

.settings-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-toolbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-toolbar-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.settings-toolbar-right {
    display: flex;
    gap: 8px;
}

/* Settings Empty State */
.settings-empty {
    text-align: center;
    padding: 60px 24px;
}

.settings-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.settings-empty-icon .material-icons-round {
    font-size: 36px;
    color: var(--text-muted);
    opacity: 0.5;
}

.settings-empty h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.settings-empty p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Settings Responsive */
@media (max-width: 1200px) {
    .settings-nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .settings-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-hero-actions {
        width: 100%;
    }

    .settings-hero-actions .btn {
        flex: 1;
    }

    .settings-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .settings-nav-pill {
        padding: 10px 12px;
    }

    .settings-pill-desc {
        display: none;
    }

    .settings-item {
        flex-wrap: wrap;
        padding: 16px 18px;
        gap: 12px;
    }

    .settings-item-icon {
        display: none;
    }

    .settings-item-info {
        flex: 1 1 100%;
    }

    .settings-item-input {
        flex: 1 1 100%;
    }

    .settings-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .settings-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .settings-nav {
        grid-template-columns: 1fr;
    }

    .settings-nav-pill {
        padding: 10px 14px;
    }

    .settings-pill-desc {
        display: block;
    }
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: KİTAP KULÜBLERİ STİLLERİ ═══════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.club-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.club-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    font-size: 28px;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: BİLDİRİM STİLLERİ ══════════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.notification-preview {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.notification-preview-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.template-item:hover {
    background: var(--bg-hover);
    border-color: var(--color-primary);
    transform: translateX(4px);
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: RESPONSİVE TABLO İYİLEŞTİRMELERİ ══════════════ */
/* ══════════════════════════════════════════════════════════════ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

/* Mobilde kart görünümü */
@media (max-width: 768px) {
    .table-responsive .table {
        min-width: 600px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 14px !important;
    }

    .stat-card .stat-value {
        font-size: 20px !important;
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }

    .page-header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-header-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .card-filters {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .card-filters .input-select,
    .card-filters .input-text {
        width: 100% !important;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .club-avatar-lg {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .notification-compose-card .form-group {
        margin-bottom: 12px;
    }

    .modal {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px;
    }

    .modal-lg {
        width: 95vw !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .topbar-right .search-box {
        display: none;
    }

    .page-header-actions .btn span.material-icons-round {
        margin-right: 0;
    }
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: FORM DOĞRULAMA STİLLERİ ════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.input-error {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 2px rgba(245, 87, 108, 0.2) !important;
}

.input-success {
    border-color: var(--color-success) !important;
}

.field-error-msg {
    display: block;
    color: var(--color-error);
    font-size: 12px;
    margin-top: 4px;
    animation: fadeIn 0.2s ease;
}

.text-error {
    color: var(--color-error);
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: İNCELEME MODERASYON STİLLERİ ═══════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-star {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 36px;
    font-size: 13px;
    font-weight: 500;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #f5576c);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.rating-count {
    min-width: 32px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: CSV IMPORT STİLLERİ ════════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-zone p {
    margin: 8px 0 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

.import-format-info code {
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--color-primary);
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 2: DUYURU GELİŞTİRME STİLLERİ ════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.announcement-scheduled {
    border-left: 3px solid var(--color-warning);
}

.announcement-expired {
    opacity: 0.6;
}

.priority-badge-high {
    background: linear-gradient(135deg, #f5a623, #f093fb) !important;
    color: white !important;
}

.priority-badge-urgent {
    background: linear-gradient(135deg, #f5576c, #fa709a) !important;
    color: white !important;
    animation: pulse 2s infinite;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: ADMİN BİLDİRİM ZİLİ STİLLERİ ═══════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.admin-notification-bell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.admin-notification-bell:hover {
    background: var(--bg-hover);
}

.admin-notification-bell .material-icons-round {
    font-size: 22px;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--color-error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: bellPulse 2s infinite;
}

@keyframes bellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.notification-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 360px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.notification-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
}

.notification-dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.notification-dropdown-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.notification-dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-dropdown-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-content strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.notification-item-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-content small {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}


/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: ARAMA ANALİTİGİ STİLLERİ ═══════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.search-terms-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-term-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.search-term-item:hover {
    background: var(--bg-hover);
}

.search-term-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.search-term-info {
    flex: 1;
    min-width: 0;
}

.search-term-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.search-term-bar {
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
}

.search-term-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.search-term-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

.no-result-searches {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.no-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.no-result-term {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.no-result-count {
    font-size: 12px;
    color: var(--text-muted);
}


/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: SKELETON LOADER GELİŞMİŞ STİLLERİ ══════════════ */
/* ══════════════════════════════════════════════════════════════ */

.skeleton-loader-container {
    padding: 8px 0;
}

.skeleton-table-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease both;
}

.skeleton-table-row:last-child {
    border-bottom: none;
}

.skeleton-loader {
    padding: 16px 0;
}

.skeleton-row {
    height: 16px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-row:nth-child(2) {
    width: 75%;
}

.skeleton-row:nth-child(3) {
    width: 50%;
}


/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: KULLANICI DETAY ZENGİNLEŞTİRME STİLLERİ ════════ */
/* ══════════════════════════════════════════════════════════════ */

.user-profile-enhanced {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    flex-wrap: wrap;
}

.user-profile-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-profile-info {
    flex: 1;
    min-width: 200px;
}

.user-profile-info h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
}

.user-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Timeline */
.user-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 24px;
}

.user-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    position: relative;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-left: -24px;
}

.timeline-content p {
    margin: 0;
    font-size: 13px;
}

/* Social List */
.social-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.social-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}


/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: RETENTION RAPOR STİLLERİ ════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.retention-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.retention-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.retention-bar-label {
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    color: var(--text-secondary);
}

.retention-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
}

.retention-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.retention-bar-value {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Cohort table */
.cohort-container {
    overflow-x: auto;
}

.cohort-container .table td {
    text-align: center;
    font-size: 13px;
}


/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 3: RESPONSİVE EK İYİLEŞTİRMELER ══════════════════ */
/* ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -20px;
    }

    .user-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .user-profile-meta {
        align-items: center;
    }

    .search-term-item {
        flex-wrap: wrap;
    }

    .retention-bar-item {
        flex-wrap: wrap;
    }

    .retention-bar-label {
        min-width: 100%;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 280px;
        right: -40px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 4 - GÖREV 21: CANLI İZLEME STİLLERİ ════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #43e97b;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(67, 233, 123, 0); }
}

.live-activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

.live-activity-item:last-child {
    border-bottom: none;
}

.live-activity-time {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    min-width: 70px;
}

.live-activity-text {
    flex: 1;
    color: var(--text-secondary);
}

/* System Health */
.system-health-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.health-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.health-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.health-bar-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.health-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.health-value {
    font-size: 12px;
    color: var(--text-muted);
}

/* Error items */
.error-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.error-item:last-child {
    margin-bottom: 0;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.error-time {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}

.error-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 4 - GÖREV 22: TOPLU İŞLEM STİLLERİ ════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.bulk-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bulk-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.bulk-action-card:hover {
    background: var(--bg-hover);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.bulk-action-card .material-icons-round {
    font-size: 32px;
    color: var(--color-primary);
}

.bulk-action-card h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.bulk-action-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 4 - GÖREV 25: KİTAP ÖNİZLEME STİLLERİ ═════════════ */
/* ══════════════════════════════════════════════════════════════ */

.book-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-muted);
}

.book-preview-reader {
    max-width: 700px;
    margin: 0 auto;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.preview-header h3 {
    margin: 0;
    font-size: 18px;
}

.preview-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-page-info {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.preview-chapter-title {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 16px 0;
}

.preview-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-primary);
    font-family: 'Georgia', 'Times New Roman', serif;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    min-height: 200px;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 4 - GÖREV 28: DARK/LIGHT MOD ANİMASYON ═════════════ */
/* ══════════════════════════════════════════════════════════════ */

html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background-color 0.35s ease,
                color 0.35s ease,
                border-color 0.35s ease,
                box-shadow 0.35s ease,
                fill 0.35s ease,
                stroke 0.35s ease !important;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ FAZ 4: RESPONSİVE EK İYİLEŞTİRMELER ═══════════════════ */
/* ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .bulk-action-grid {
        grid-template-columns: 1fr;
    }

    .preview-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .live-activity-time {
        display: none;
    }

    .system-health-grid {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .bulk-action-card {
        padding: 14px 10px;
    }

    .bulk-action-card .material-icons-round {
        font-size: 24px;
    }

    .preview-content {
        font-size: 14px;
        padding: 14px;
    }
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: SKELETON LOADİNG & SHİMMER ═══════════════ */
/* ══════════════════════════════════════════════════════════════ */

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.lg { height: 28px; width: 120px; }
.skeleton-text.md { height: 20px; width: 80%; }
.skeleton-text.sm { height: 12px; width: 60%; }
.skeleton-icon { width: 64px; height: 64px; border-radius: var(--radius-md); }
.skeleton-cell { flex: 1; height: 16px; }
.skeleton-row {
    display: flex; gap: 16px; padding: 16px;
    border-bottom: 1px solid var(--border-color);
}
.skeleton-card {
    display: flex; align-items: center; gap: 20px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}
.skeleton-chart { height: 280px; border-radius: var(--radius-md); }

.skeleton-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: PAGE TRANSİTİON ══════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: pageEnter 0.25s ease-out forwards;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: İNLİNE STYLE → CSS CLASS ═════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.stat-icon--users { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon--books { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon--subs { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-icon--readers { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stat-icon--registrations { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-icon--reading { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.stat-icon--reviews { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.stat-icon--streaks { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); }

/* Inline style yerine kullanılan yardımcı class'lar */
.mb-24 { margin-bottom: 24px; }
.chart-canvas { max-height: 300px; }
.chart-canvas-sm { max-height: 280px; }

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: CSS PERFORMANS ════════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.sidebar { will-change: transform; }
.modal-overlay { will-change: opacity; }
.page { contain: content; }
.stat-card { contain: layout style; }

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: TOUCH HEDEFLERİ ══════════════════════════ */
/* ══════════════════════════════════════════════════════════════ */

.nav-item {
    min-height: 44px;
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ OPTİMİZASYON: TAM RESPONSİVE MEDIA QUERİES ════════════ */
/* ══════════════════════════════════════════════════════════════ */

/* ===== BÜYÜK EKRAN (1536px+) ===== */
@media (min-width: 1536px) {
    .page-content { padding: 40px 48px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ===== TABLET LANDSCAPE (1024px - 1280px) ===== */
@media (max-width: 1280px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .nav-text { display: none; }
    .sidebar .logo-text { display: none; }
    .sidebar .user-details { display: none; }
    .main-content { margin-left: var(--sidebar-collapsed); }
    .search-box input { width: 200px; }
    .search-box input:focus { width: 240px; }
}

/* ===== TABLET PORTRAIT (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-value { font-size: 24px; }
    .stat-icon { width: 52px; height: 52px; font-size: 26px; }
    .page-content { padding: 20px; }
    .topbar { padding: 0 20px; }
    .card-body { padding: 16px; }
    .card-header { padding: 16px 20px; }
}

/* ===== MOBİL (768px altı) - KONSOLIDE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 200;
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: flex; }
    .sidebar-toggle { display: none; }

    .mobile-overlay {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .mobile-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    #page-title { font-size: 18px; }
    .search-box { display: none; }
    .topbar { height: 56px; padding: 0 16px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; gap: 12px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 12px; }
    .stat-icon { width: 44px; height: 44px; font-size: 22px; }

    .page-content { padding: 16px; }
    .page-header { flex-direction: column; gap: 12px; align-items: stretch; }
    .page-header-actions { flex-wrap: wrap; }
    .page-header-actions .btn { flex: 1; min-width: 120px; }

    .card-filters { flex-wrap: wrap; }
    .card-filters .input-select { min-width: 120px; }

    .modal { width: 95%; max-height: 95vh; }
    .modal-header { padding: 16px 20px; }
    .modal-body { padding: 16px 20px; }
    .modal-footer { padding: 16px 20px; }

    .toast-container { top: 12px; right: 12px; left: 12px; }
    .toast { min-width: auto; width: 100%; }

    .table-responsive { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }

    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

/* ===== KÜÇÜK MOBİL (480px altı) ===== */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; gap: 8px; }
    .stat-card { padding: 12px 16px; }
    .login-card { padding: 24px; }
    .login-logo .material-icons-round { font-size: 48px; }
    .login-logo h1 { font-size: 24px; }
    .btn { padding: 10px 16px; font-size: 14px; }
    .page-header-actions .btn { min-width: 100px; font-size: 13px; }
    .topbar-right .search-box { display: none; }
}

/* ===== HOVER MEDYA SORGUSU ===== */
@media (hover: hover) {
    .stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
    .nav-item:hover { background: var(--bg-hover); }
    .btn-primary:hover { transform: translateY(-2px); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT ===== */
@media print {
    .sidebar, .topbar, .mobile-overlay, .toast-container { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
}

/* ══════════════════════════════════════════════════════════════ */
/* ═══ AYARLAR: KOD EDİTÖRÜ, JSON, RENK, URL, ŞİFRE ════════ */
/* ══════════════════════════════════════════════════════════════ */

/* Code Editor Wrapper */
.code-editor-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
    transition: border-color 0.2s ease;
}

.code-editor-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Code Editor Toolbar */
.code-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .code-editor-toolbar {
    background: rgba(0, 0, 0, 0.04);
}

.code-editor-lang {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.code-editor-actions {
    display: flex;
    gap: 4px;
}

/* Code Editor Textarea */
.code-editor {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    outline: none;
    resize: vertical;
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
}

.code-editor::placeholder {
    color: var(--text-muted);
}

.code-editor-lg {
    min-height: 400px;
    font-size: 14px;
}

/* Code Editor Status */
.code-editor-status {
    padding: 4px 10px;
    font-size: 11px;
    min-height: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.08);
    transition: color 0.2s ease;
}

[data-theme="light"] .code-editor-status {
    background: rgba(0, 0, 0, 0.02);
}

/* Code Editor Fullscreen Modal */
.code-editor-fullscreen {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.code-editor-fullscreen .code-editor-toolbar {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.code-editor-fullscreen .code-editor {
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Small icon button (for editor toolbars) */
.btn-icon-sm {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-icon-sm:hover {
    background: rgba(102, 126, 234, 0.12);
    color: var(--color-primary);
}

.btn-icon-sm .material-icons-round {
    font-size: 16px;
}

/* Setting Textarea */
.setting-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.6;
    font-family: inherit;
}

/* Color Input Wrapper */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-tertiary);
    transition: border-color 0.2s ease;
}

.color-picker:hover {
    border-color: var(--color-primary);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

/* URL Input Wrapper */
.url-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.url-input-wrapper .input-text {
    flex: 1;
}

.url-open-btn {
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-secondary);
}

.url-open-btn:hover {
    color: var(--color-primary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.password-input-wrapper .input-text {
    flex: 1;
    padding-right: 70px;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    letter-spacing: 1px;
}

.password-input-wrapper .btn-icon-sm {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
}

.password-input-wrapper .btn-icon-sm:last-child {
    right: 4px;
}

/* Settings Item Type Badges - New Types */
.settings-item-type.type-url {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.settings-item-type.type-color {
    background: rgba(245, 166, 35, 0.1);
    color: #f5a623;
}

.settings-item-type.type-code {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.settings-item-type.type-secret {
    background: rgba(245, 87, 108, 0.1);
    color: #f5576c;
}

.settings-item-type.type-text {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
}

/* Responsive adjustments for new input types */
@media (max-width: 768px) {
    .color-input-wrapper {
        flex-wrap: wrap;
    }

    .password-input-wrapper .input-text {
        padding-right: 60px;
    }

    .code-editor {
        font-size: 12px;
    }

    .code-editor-lg {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .code-editor-toolbar {
        padding: 4px 8px;
    }

    .code-editor {
        padding: 8px 10px;
        font-size: 11px;
    }

    .color-picker {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}