/* ========================================
   Vrindopnishad Admin Panel - Modern UI
   Design System V3 - Premium & Engaging
   ======================================== */

:root {
    /* Golden Saffron Theme */
    --primary: #EDA638;
    --primary-dark: #D68C22;
    --primary-light: #FBCB6A;
    --primary-alpha-10: rgba(237, 166, 56, 0.1);
    --primary-alpha-20: rgba(237, 166, 56, 0.2);
    --primary-glow: rgba(237, 166, 56, 0.4);

    /* Accent Colors */
    --purple: #A855F7;
    --purple-alpha: rgba(168, 85, 247, 0.15);
    --blue: #3B82F6;
    --blue-alpha: rgba(59, 130, 246, 0.15);
    --pink: #EC4899;
    --pink-alpha: rgba(236, 72, 153, 0.15);
    --green: #10B981;
    --green-alpha: rgba(16, 185, 129, 0.15);
    --saffron: #FF9933;
    --saffron-alpha: rgba(255, 153, 51, 0.1);

    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Neutrals */
    --bg-base: #09090B;
    --bg-primary: #0C0C10;
    --bg-secondary: #131318;
    --bg-tertiary: #1A1A21;
    --bg-elevated: #222230;
    --bg-hover: #252532;

    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --text-inverse: #09090B;

    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 15px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Text styles */
.sanskrit-input,
.hindi-input,
.content-card-sanskrit {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ========================================
   Layout
   ======================================== */

.app {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Sidebar
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.logo-icon-wrapper {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(237, 166, 56, 0.3);
}

.logo-icon-wrapper svg {
    width: 22px;
    height: 22px;
    color: var(--text-inverse);
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    padding: 8px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s var(--ease-out);
    margin-bottom: 2px;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-alpha-10);
    color: var(--primary);
}

.nav-item.active svg {
    color: var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

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

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

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ========================================
   Main Content
   ======================================== */

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-base);
}

.header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-strong);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
}

.header-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.breadcrumb svg {
    width: 12px;
    height: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 280px;
    padding: 9px 12px 9px 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.2s var(--ease-out);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box .search-icon svg,
.search-box svg {
    width: 16px;
    height: 16px;
}

.search-shortcut {
    position: absolute;
    right: 10px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Content Area */
.content {
    padding: 24px;
    max-width: 1400px;
}

/* ========================================
   Tabs
   ======================================== */

.tab-content {
    display: none;
    animation: fadeSlide 0.3s var(--ease-out);
}

.tab-content.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Welcome Banner
   ======================================== */

.welcome-banner {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at 100% 50%, var(--primary-alpha-10) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-text h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Stats Grid
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.25s var(--ease-out);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-icon-primary {
    background: var(--primary-alpha-20);
    color: var(--primary);
}

.stat-icon-purple {
    background: var(--purple-alpha);
    color: var(--purple);
}

.stat-icon-blue {
    background: var(--blue-alpha);
    color: var(--blue);
}

.stat-icon-pink {
    background: var(--pink-alpha);
    color: var(--pink);
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}

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

.stat-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-full);
}

.stat-trend.up {
    background: var(--green-alpha);
    color: var(--green);
}

.stat-trend svg {
    width: 12px;
    height: 12px;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3,
.card-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.card-header .link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.card-header .link:hover {
    text-decoration: underline;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Recent Content */
.recent-section .content-list {
    padding: 12px;
}

.content-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.content-list-item:hover {
    background: var(--bg-tertiary);
}

.content-list-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.content-list-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Quick Actions */
.quick-actions .actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.action-btn:hover svg {
    color: var(--primary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-xl);
    text-align: center;
}

.empty-state-large svg {
    width: 56px;
    height: 56px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-large h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.empty-state-large p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* ========================================
   Enhanced Form Features
   ======================================== */

.form-mode-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.mode-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 8px;
    text-transform: uppercase;
}

.live-preview-container {
    padding: 16px;
    background: var(--bg-tertiary);
    min-height: 120px;
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.preview-sanskrit {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    font-family: 'Noto Sans Devanagari', serif;
}

.preview-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.preview-card {
    margin-top: 20px;
    border-color: var(--primary-alpha-20);
}

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

#add-content-form.mode-general .shloka-only {
    display: none;
}

#add-content-form.mode-shloka .general-only {
    display: none;
}

/* ========================================
   Forms
   ======================================== */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.form-main .card,
.form-sidebar .card {
    padding: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group label svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s var(--ease-out);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    background: var(--bg-tertiary);
}

.file-upload svg {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.file-upload p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.file-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-alpha-10);
}

.file-upload:hover svg {
    color: var(--primary);
}

.file-upload.dragover {
    border-color: var(--primary);
    background: var(--primary-alpha-20);
}

/* Form Actions */
.form-actions-sticky {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(237, 166, 56, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(237, 166, 56, 0.35);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-alpha-10);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 16px;
}

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

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

.btn-full {
    width: 100%;
}

.btn-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-icon-only svg {
    width: 18px;
    height: 18px;
}

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

/* ========================================
   Filter Bar
   ======================================== */

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.filter-left,
.filter-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.filter-group svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.filter-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
}

.search-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.search-inline svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-inline input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 180px;
}

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

.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--bg-tertiary);
    color: var(--primary);
}

/* ========================================
   Content Grid
   ======================================== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.content-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.25s var(--ease-out);
}

.content-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.content-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.content-card-category {
    padding: 4px 10px;
    background: var(--primary-alpha-20);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.content-card-sanskrit {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.content-card-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* ========================================
   Import Section
   ======================================== */

.import-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.import-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.import-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.import-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.import-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.import-card h4 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.import-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.template-section {
    margin-bottom: 24px;
}

.template-section .card-header {
    padding-bottom: 0;
    border-bottom: none;
}

.template-buttons {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
}

/* Import Preview */
.import-preview {
    margin-bottom: 24px;
}

.import-preview.hidden {
    display: none;
}

.preview-table-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 20px;
}

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

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

.preview-table th {
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}

.preview-table td {
    font-size: 0.85rem;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ========================================
   Categories
   ======================================== */

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.category-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
}

.category-tag svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.add-category-form {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.input-with-icon {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.input-with-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.input-with-icon input {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-with-icon input:focus {
    outline: none;
}

/* ========================================
   Modals
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s var(--ease-out);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
}

.modal-header svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

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

.modal-close:hover {
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Login Modal */
.login-modal {
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 28px;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-glow);
}

.login-logo svg {
    width: 36px;
    height: 36px;
    color: var(--text-inverse);
}

.login-header h2 {
    font-size: 1.35rem;
    margin-bottom: 6px;
}

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

.login-modal .form-group {
    text-align: left;
}

.login-modal .btn-primary {
    margin-top: 8px;
}

/* ========================================
   Toast Notifications
   ======================================== */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlide 0.3s var(--ease-out);
    font-size: 0.9rem;
}

.toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast.success {
    border-color: var(--green);
}

.toast.success svg {
    color: var(--green);
}

.toast.error {
    border-color: var(--danger);
}

.toast.error svg {
    color: var(--danger);
}

@keyframes toastSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Scrollbar
   ======================================== */

/* ========================================
   Login Modal Enhancements
   ======================================== */

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    gap: 12px !important;
    background: white !important;
    color: #1f1f1f !important;
    border-color: #dadce0 !important;
}

.btn-google:hover {
    background: #f8f9fa !important;
    border-color: #d2e3fc !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .form-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.4s var(--ease-out);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }

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

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .sidebar-close-btn {
        display: flex;
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 1001;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
        margin-right: 12px;
    }

    .header {
        padding: 0 16px;
        height: 64px;
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(12, 12, 16, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-strong);
    }

    .header-title h2 {
        font-size: 1.1rem;
    }

    .breadcrumb {
        display: none;
    }

    .search-box {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .welcome-banner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 24px 16px;
    }

    .welcome-banner .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

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

    .import-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .filter-left,
    .filter-right {
        width: 100%;
        gap: 12px;
    }

    .search-inline {
        width: 100%;
        max-width: none;
    }

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

    .modal-content {
        width: calc(100% - 32px);
        margin: 16px;
        padding: 20px;
        max-height: calc(100vh - 32px);
    }

    .login-modal {
        padding: 32px 20px;
    }

    .form-mode-selector {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
    }

    .form-mode-selector button {
        flex: 1;
        font-size: 0.85rem;
    }

    .form-main,
    .form-sidebar {
        width: 100%;
    }

    .form-actions-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px;
        background: rgba(12, 12, 16, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-strong);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
        z-index: 90;
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 12px;
    }

    .content-form {
        padding-bottom: 100px;
    }

    .preview-card {
        display: none;
    }
}