/* ==========================================================================
   INDIAN CLASSROOM SMARTBOARD & OPENBOARD MULTI-PAGE PDF STUDIO
   Default: English | Indian Language Support (Hindi, Tamil, Telugu, Kannada, etc.)
   ========================================================================== */

:root {
    --cs-primary: #10b981;
    --cs-primary-hover: #059669;
    --cs-accent-cyan: #06b6d4;
    --cs-accent-gold: #f59e0b;
    --cs-accent-purple: #8b5cf6;
    --cs-bg-panel: rgba(15, 23, 42, 0.94);
    --cs-bg-card: rgba(30, 41, 59, 0.85);
    --cs-border: rgba(255, 255, 255, 0.12);
    --cs-text-main: #f8fafc;
    --cs-text-muted: #94a3b8;
    --cs-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.2);
}

/* --- Floating Left Edge Toggle Handle --- */
.cs-sidebar-toggle-btn {
    position: fixed;
    left: 0;
    top: 45%;
    transform: translateY(-50%);
    z-index: 99991;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-left: none;
    border-radius: 0 16px 16px 0;
    padding: 14px 10px 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.6);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.cs-sidebar-toggle-btn:hover {
    padding-right: 14px;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.6), 0 0 22px rgba(52, 211, 153, 0.8);
}

.cs-sidebar-toggle-btn .cs-toggle-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.cs-sidebar-toggle-btn .cs-toggle-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.cs-sidebar-toggle-btn .cs-toggle-badge {
    background: #0f172a;
    color: #34d399;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

/* --- Left Sidebar Drawer Panel --- */
.cs-sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 390px;
    max-width: 92vw;
    background: var(--cs-bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1.5px solid var(--cs-border);
    box-shadow: 15px 0 50px rgba(0, 0, 0, 0.7);
    z-index: 99995;
    display: flex;
    flex-direction: column;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--cs-text-main);
    overflow: hidden;
}

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

/* Sidebar Backdrop */
.cs-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99992;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cs-sidebar-backdrop.open {
    display: block;
    opacity: 1;
}

/* Panel Header */
.cs-header {
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid var(--cs-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cs-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.cs-title-group:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cs-brand-edit-badge {
    font-size: 0.72rem;
    opacity: 0.45;
    transition: all 0.2s ease;
}

.cs-title-group:hover .cs-brand-edit-badge {
    opacity: 1;
    transform: scale(1.2);
}

.cs-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    flex-shrink: 0;
}

.cs-brand-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.cs-brand-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cs-accent-cyan);
    letter-spacing: 0.5px;
}

/* Language Selector Dropdown */
.cs-lang-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-lang-select {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.cs-lang-select:hover, .cs-lang-select:focus {
    border-color: #38bdf8;
    background: #0f172a;
}

.cs-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
}

/* Teacher User Login Status Bar */
.cs-user-bar {
    padding: 10px 18px;
    background: rgba(16, 185, 129, 0.12);
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}

.cs-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d1fae5;
    font-weight: 600;
}

.cs-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.cs-login-btn {
    background: #6366f1;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cs-login-btn:hover {
    background: #4f46e5;
}

/* Tabs Navigation */
.cs-tabs {
    display: flex;
    border-bottom: 1px solid var(--cs-border);
    background: rgba(15, 23, 42, 0.5);
}

.cs-tab-btn {
    flex: 1;
    padding: 12px 6px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--cs-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.cs-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.cs-tab-btn.active {
    color: #10b981;
    border-bottom-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

/* Tab Contents Container */
.cs-tab-content-container {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-tab-pane {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.cs-tab-pane.active {
    display: flex;
}

/* --- Page Slide Sorter View --- */
.cs-page-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.cs-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.cs-btn-primary:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-1px);
}

.cs-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.cs-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Page Cards List */
.cs-pages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-page-card {
    background: var(--cs-bg-card);
    border: 1.5px solid var(--cs-border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.cs-page-card:hover {
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.cs-page-card.active {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.cs-page-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-page-num-pill {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}

.cs-page-card.active .cs-page-num-pill {
    background: #10b981;
    color: #ffffff;
}

.cs-page-time-str {
    font-size: 0.72rem;
    color: var(--cs-text-muted);
}

.cs-page-thumb-wrapper {
    width: 100%;
    height: 110px;
    background: #142a1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-page-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.cs-page-thumb-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-style: italic;
}

.cs-page-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.cs-page-card:hover .cs-page-card-actions {
    opacity: 1;
}

.cs-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--cs-text-main);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.cs-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.cs-icon-btn.danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fca5a5;
}

/* --- Auto-Save Timeline View --- */
.cs-history-status-bar {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.cs-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: cs-pulse 2s infinite;
}

@keyframes cs-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.cs-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-timeline-date-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-date-header {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--cs-accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
}

.cs-history-card {
    background: var(--cs-bg-card);
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: all 0.2s ease;
}

.cs-history-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(30, 41, 59, 0.95);
    transform: translateX(2px);
}

.cs-history-thumb {
    width: 64px;
    height: 48px;
    background: #142a1e;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: contain;
    flex-shrink: 0;
}

.cs-history-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cs-history-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.cs-history-topic {
    font-size: 0.72rem;
    color: var(--cs-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-history-btn-restore {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.cs-history-btn-restore:hover {
    background: #10b981;
    color: #ffffff;
}

/* --- Active Class Selector & Group By Bar --- */
.cs-active-class-container {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cs-class-select-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-class-badge-icon {
    font-size: 1.35rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-class-header-micro {
    font-size: 0.65rem;
    font-weight: 800;
    color: #34d399;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cs-class-select-input {
    width: 100%;
    background: #0f172a;
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #f8fafc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-class-select-input:hover, .cs-class-select-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.cs-groupby-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}

.cs-groupby-pills {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    flex: 1;
}

.cs-groupby-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: var(--cs-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-groupby-pill:hover {
    color: #f8fafc;
}

.cs-groupby-pill.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.cs-filter-select {
    background: #0f172a;
    border: 1px solid var(--cs-border);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 8px;
    outline: none;
    cursor: pointer;
    max-width: 140px;
}

.cs-filter-select:hover {
    border-color: #38bdf8;
}

/* Timeline Group by Class Containers */
.cs-timeline-class-group {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.cs-timeline-class-group:hover {
    border-color: rgba(16, 185, 129, 0.25);
}

.cs-class-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border-left: 3px solid #64748b;
}

.cs-class-header.is-active-class {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.cs-class-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cs-class-header-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cs-class-header-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-class-header-subtitle {
    font-size: 0.68rem;
    color: var(--cs-text-muted);
}

.cs-class-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cs-btn-make-active {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
}

.cs-btn-make-active:hover {
    background: #0284c7;
    color: #ffffff;
}

.cs-class-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-history-time-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cs-history-date-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
}

.cs-history-class-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    margin-top: 2px;
}

.cs-history-card-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.cs-history-btn-del {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s;
}

.cs-history-btn-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* Toast notification */
.cs-studio-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #10b981;
    color: #f8fafc;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.3);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-studio-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Classroom Interactive Tools Pane --- */
.cs-tool-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--cs-accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
}

.cs-bg-switcher-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cs-bg-card-option {
    border: 2px solid var(--cs-border);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cs-bg-card-option:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.cs-bg-card-option.active {
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.cs-bg-color-swatch {
    width: 28px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cs-interactive-tools-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cs-tool-action-btn {
    background: var(--cs-bg-card);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 10px 8px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-tool-action-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    transform: translateY(-2px);
}

.cs-tool-action-btn span.tool-ico {
    font-size: 1.3rem;
}

/* --- Panel Footer (OpenBoard PDF Export) --- */
.cs-footer {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--cs-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-btn-export-pdf {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transition: all 0.2s;
}

.cs-btn-export-pdf:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

.cs-btn-export-sub {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--cs-border);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.cs-btn-export-sub:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Indian School Ruled Handwriting & Board Surface Themes */
.school-board-surface.board-ruled {
    background-color: #1a2f23 !important;
    background-image: 
        linear-gradient(to bottom, rgba(52, 211, 153, 0.35) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(239, 68, 68, 0.35) 1px, transparent 1px) !important;
    background-size: 100% 40px, 100% 120px !important;
}

.school-board-surface.board-grid {
    background-color: #0f172a !important;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px) !important;
    background-size: 30px 30px !important;
}

.school-board-surface.board-white {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* PDF Generation Modal */
.cs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 100005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cs-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cs-modal-box {
    background: #1e293b;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px 28px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}

.cs-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #10b981;
    border-radius: 50%;
    margin: 0 auto;
    animation: cs-spin 0.8s linear infinite;
}

@keyframes cs-spin {
    to { transform: rotate(360deg); }
}
