/* ============================================
   E-RAPAT UNIVERSITAS SAMUDRA - DESIGN SYSTEM
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Primary Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    
    /* Slate Colors */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Semantic Colors */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    
    /* Guest/Teal Theme */
    --guest-50: #f0fdfa;
    --guest-100: #ccfbf1;
    --guest-500: #14b8a6;
    --guest-600: #0d9488;
    
    /* Developer/Purple Theme */
    --dev-50: #faf5ff;
    --dev-100: #f3e8ff;
    --dev-500: #a855f7;
    --dev-600: #9333ea;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-primary: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* --- Quill Editor Customization --- */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--slate-200) !important;
    background-color: #f8fafc;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.ql-container.ql-snow {
    border: none !important;
    font-family: var(--font-sans) !important;
    font-size: 15px !important;
    color: var(--slate-800);
    background-color: white;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}
.ql-editor {
    padding: 2rem 3rem !important;
    min-height: 500px;
    line-height: 1.7 !important;
}
@media (max-width: 640px) {
    .ql-editor {
        padding: 1.5rem 1rem !important;
    }
}
.ql-editor p, .ql-editor ol, .ql-editor ul, .ql-editor pre, .ql-editor blockquote, .ql-editor h1, .ql-editor h2, .ql-editor h3, .ql-editor h4, .ql-editor h5, .ql-editor h6 {
    margin-bottom: 0.75em;
}
.ql-editor h1 { font-size: 1.5em !important; font-weight: 700; }
.ql-editor h2 { font-size: 1.25em !important; font-weight: 700; }
.ql-editor.ql-blank::before {
    font-style: normal !important;
    color: var(--slate-400) !important;
    left: 3rem !important;
}
@media (max-width: 640px) {
    .ql-editor.ql-blank::before { left: 1rem !important; }
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--slate-50);
    color: var(--slate-800);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Typography Utilities --- */
.text-balance {
    text-wrap: balance;
}

.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* --- Glass Morphism --- */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
}

/* --- Card Components --- */
.card {
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.card-interactive {
    cursor: pointer;
    transition: all var(--transition-base);
}

.card-interactive:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-200);
}

.card-interactive:active {
    transform: translateY(0);
}

/* --- Button Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.btn-ghost {
    background: transparent;
    color: var(--slate-600);
}

.btn-ghost:hover {
    background: var(--slate-100);
    color: var(--slate-800);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--error-600) 0%, #b91c1c 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.btn-icon { padding: 0.625rem; aspect-ratio: 1; }

/* --- Form Components --- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    transition: all var(--transition-base);
    outline: none;
}

.form-input:hover {
    border-color: var(--slate-300);
}

.form-input:focus {
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder {
    color: var(--slate-400);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    margin-bottom: var(--space-2);
}

.form-group {
    margin-bottom: var(--space-4);
}

/* --- Badge Components --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.25rem 0.625rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
}

.badge-success {
    background: var(--success-100);
    color: var(--success-600);
    border: 1px solid var(--success-200);
}

.badge-warning {
    background: var(--warning-100);
    color: var(--warning-600);
    border: 1px solid var(--warning-200);
}

.badge-error {
    background: var(--error-100);
    color: var(--error-600);
    border: 1px solid var(--error-200);
}

.badge-guest {
    background: var(--guest-100);
    color: var(--guest-600);
    border: 1px solid var(--guest-200);
}

.badge-dev {
    background: var(--dev-100);
    color: var(--dev-600);
    border: 1px solid var(--dev-200);
}

/* --- Status Indicators --- */
.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.status-online { background: var(--success-500); box-shadow: 0 0 0 2px var(--success-100); }
.status-busy { background: var(--warning-500); box-shadow: 0 0 0 2px var(--warning-100); }
.status-offline { background: var(--slate-400); box-shadow: 0 0 0 2px var(--slate-200); }

/* --- Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--slate-100);
    border-radius: var(--radius-sm);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in { animation: fadeIn var(--transition-slower) ease-out; }
.animate-fade-in-scale { animation: fadeInScale var(--transition-slower) ease-out; }
.animate-slide-in { animation: slideInRight var(--transition-slower) ease-out; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

.page-fade {
    animation: fadeIn 0.4s ease-out;
}

/* --- Mobile Tab Animations --- */
.mobile-tab {
    transition: all var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-tab.active {
    background: linear-gradient(135deg, var(--primary-600) 0%, #8b5cf6 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* --- Prose/Content Styles --- */
.prose-slate {
    color: var(--slate-600);
    line-height: 1.75;
}

.prose-slate h1, .prose-slate h2, .prose-slate h3, 
.prose-slate h4, .prose-slate h5, .prose-slate h6 {
    color: var(--slate-800);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.prose-slate h1 { font-size: 1.875rem; }
.prose-slate h2 { font-size: 1.5rem; color: var(--primary-700); }
.prose-slate h3 { font-size: 1.25rem; }
.prose-slate p { margin-bottom: 1em; }
.prose-slate ul, .prose-slate ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose-slate li { margin-bottom: 0.5em; }

.prose-slate blockquote {
    border-left: 4px solid var(--primary-400);
    background: var(--slate-50);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--slate-600);
}

.prose-slate a {
    color: var(--primary-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose-slate a:hover {
    color: var(--primary-700);
}

/* --- Input Validation States --- */
.input-valid {
    border-color: var(--success-500) !important;
    background-color: var(--success-50) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.input-invalid {
    border-color: var(--error-500) !important;
    background-color: var(--error-50) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* --- Focus Visible (Accessibility) --- */
.focus-ring:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Divider --- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--slate-200), transparent);
    margin: 1.5rem 0;
}

/* --- Skeleton Loading --- */
.skeleton {
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   APP-SPECIFIC STYLES & OVERRIDES
   ============================================ */

/* --- Quill Editor Integration --- */
#tab-content-notulensi { display: flex; flex-direction: column; height: 100%; }
#editMinutes { display: flex; flex-direction: column; height: 100%; }
#editorWrapper { flex: 1; min-height: 650px; }
#minutesInput { height: 100%; }

/* Quill Toolbar Styling */
.ql-toolbar.ql-snow {
    border-color: var(--slate-200) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: white !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 12px !important;
}

.ql-container.ql-snow { 
    border-color: var(--slate-200) !important; 
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.ql-editor { 
    min-height: 650px; 
    background: white; 
    text-align: left !important;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.7;
    padding: 1.5rem !important;
}

.ql-editor p { 
    margin-bottom: 0.75em; 
    text-align: left !important; 
}

.ql-editor > * { text-align: left !important; }

/* Placeholder when empty */
.ql-editor.ql-blank::before {
    content: "Ketik notulensi rapat...";
    color: var(--slate-400);
    font-style: italic;
    pointer-events: none;
    font-size: 1rem;
}

/* Editor Container */
#editorWrapper { 
    position: relative; 
    z-index: 1; 
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
}

#minutesInput { position: relative; }
#minutesInput .ql-editor { cursor: text; }
#minutesInput .ql-container { position: relative; }

/* Template Button Styling */
.ql-template {
    width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    margin-left: 8px;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.ql-template:hover {
    background: var(--slate-100);
}

.ql-template svg { stroke: var(--slate-600); }
.ql-template:hover svg { stroke: var(--primary-600); }

/* Notulensi Template Section Styling - Intelligent & Premium */
.ql-editor h2, #displayMinutes h2 {
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--slate-200);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

/* First H2: Ringkasan Pembahasan */
.ql-editor h2:nth-of-type(1), #displayMinutes h2:nth-of-type(1) {
    color: var(--primary-700) !important;
    border-bottom-color: var(--primary-200);
}
.ql-editor h2:nth-of-type(1)::before, #displayMinutes h2:nth-of-type(1)::before {
    content: '📘';
    font-style: normal;
}

/* Second H2: Keputusan Rapat */
.ql-editor h2:nth-of-type(2), #displayMinutes h2:nth-of-type(2) {
    color: var(--success-600) !important;
    border-bottom-color: var(--success-200);
}
.ql-editor h2:nth-of-type(2)::before, #displayMinutes h2:nth-of-type(2)::before {
    content: '✅';
    font-style: normal;
}

/* Third H2: Tindak Lanjut */
.ql-editor h2:nth-of-type(3), #displayMinutes h2:nth-of-type(3) {
    color: var(--warning-600) !important;
    border-bottom-color: var(--warning-200);
}
.ql-editor h2:nth-of-type(3)::before, #displayMinutes h2:nth-of-type(3)::before {
    content: '🚀';
    font-style: normal;
}

.ql-editor h2:first-of-type, #displayMinutes h2:first-of-type { margin-top: 0; }

.ql-editor ul, #displayMinutes ul {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.ql-editor li, #displayMinutes li { margin-bottom: 0.5em; }

.ql-editor li strong, #displayMinutes li strong {
    color: var(--success-600);
    font-weight: 600;
}

/* --- Display Minutes Styles --- */
#displayMinutes {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--slate-700);
    padding: 1.5rem;
}

#displayMinutes h1, 
#displayMinutes h2, 
#displayMinutes h3, 
#displayMinutes h4, 
#displayMinutes h5, 
#displayMinutes h6 {
    color: var(--slate-800);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    padding-bottom: 0.25em;
    border-bottom: 2px solid var(--slate-200);
    line-height: 1.3;
}

#displayMinutes h1 { font-size: 1.5rem; }
#displayMinutes h2 { font-size: 1.25rem; color: var(--primary-600); }
#displayMinutes h3 { font-size: 1.125rem; }

#displayMinutes h2:first-of-type,
#displayMinutes h1:first-of-type {
    margin-top: 0;
}

#displayMinutes p {
    margin-bottom: 0.75em;
    text-align: left !important;
}

#displayMinutes ul, 
#displayMinutes ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

#displayMinutes li { margin-bottom: 0.5em; }

#displayMinutes li strong {
    color: var(--success-600);
    font-weight: 600;
}

#displayMinutes blockquote {
    border-left: 4px solid var(--primary-400);
    padding-left: 1em;
    margin-left: 0;
    color: var(--slate-600);
    font-style: italic;
    background: var(--slate-50);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

#displayMinutes a {
    color: var(--primary-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#displayMinutes a:hover { color: var(--primary-700); }

#displayMinutes strong {
    font-weight: 700;
    color: var(--slate-800);
}

#displayMinutes em { font-style: italic; }
#displayMinutes u { text-decoration: underline; }
#displayMinutes s { text-decoration: line-through; }

#displayMinutes code {
    background: var(--slate-100);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--slate-700);
}

#displayMinutes pre {
    background: var(--slate-100);
    padding: 1em;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

#displayMinutes img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Section Navigator for Editor */
.section-nav {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 20;
}

@media (max-width: 1280px) {
    .section-nav {
        display: none;
    }
}

.nav-item {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    color: var(--slate-400);
}

.nav-item:hover {
    color: var(--primary-600);
    border-color: var(--primary-200);
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.nav-item.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.input-match-valid {
    border-color: var(--success-500) !important;
    background-color: var(--success-50) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.input-match-invalid {
    border-color: var(--error-500) !important;
    background-color: var(--error-50) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* --- Legacy Button Hover Override --- */
button:hover {
    transform: translateY(-1px);
    transition: all var(--transition-fast);
}

/* --- Responsive Design --- */

/* Desktop (Large screens) */
@media (min-width: 1025px) {
    #view-live {
        height: calc(100vh - 64px);
    }
    
    /* Sidebar container */
    .hidden.lg\:flex.flex-col.w-80 {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
    }
    
    /* Participants Panel */
    #participantsPanelContent {
        max-height: none !important;
        min-height: 100px;
        max-height: 400px !important;
    }
    
    /* Resources Panel */
    #resourcesPanelContent {
        max-height: 300px !important;
    }

    /* Sidebar Resizer Layout */
    #desktopRoomLayout {
        grid-template-columns: 1fr 6px var(--sidebar-width, 400px) !important;
        gap: 0 !important;
    }

    .resizer-handle {
        width: 6px;
        cursor: col-resize;
        background: transparent;
        transition: all 0.2s ease;
        z-index: 40;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 -3px; /* Pull handle over both columns for better hit area */
    }

    .resizer-handle::after {
        content: '';
        width: 2px;
        height: 100px;
        background: #e2e8f0;
        border-radius: 10px;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .resizer-handle:hover::after, 
    .resizer-handle.is-resizing::after {
        opacity: 1;
        height: 100%;
        background: #6366f1;
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }

    .resizer-handle:hover {
        background: rgba(99, 102, 241, 0.03);
    }

    .resizer-handle.is-resizing {
        background: rgba(99, 102, 241, 0.08);
    }
}

/* Tablet & Mobile */
@media (max-width: 1024px) {
    #view-live:not(.hidden) {
        padding: 0 !important;
        min-height: calc(100vh - 64px); 
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }
    
    #view-live.hidden {
        display: none !important;
    }
    
    /* Hide footer in live room mobile view */
    #view-live ~ footer,
    #mainApp:has(#view-live:not(.hidden)) footer {
        display: none !important;
    }
    
    .live-sidebar-container {
        display: none !important;
    }
    
    /* Mobile tabs must be clickable */
    .lg\:hidden.flex {
        position: relative;
        z-index: 50;
    }
    
    #mobile-tab-btn-notulensi,
    #mobile-tab-btn-lampiran,
    #mobile-tab-btn-peserta {
        position: relative;
        z-index: 51;
        pointer-events: auto;
        cursor: pointer;
    }
    
    .mobile-tab-content {
        flex: 1;
        overflow: visible;
        min-height: 0;
    }
    
    #tab-content-notulensi {
        min-height: 70vh;
    }
    
    #displayMinutes, #editMinutes {
        min-height: 65vh;
        height: auto !important;
    }
    
    #editorWrapper {
        min-height: 55vh;
    }
    
    #minutesInput .ql-editor {
        min-height: 50vh;
    }

    #mainApp footer {
        display: block !important;
    }
    
    #participantsPanelContentMobile {
        max-height: 60vh !important;
    }
}

/* Panel Peserta - Ensure scrollable on all screen sizes */
#participantsPanelContent,
#participantsPanelContentMobile {
    max-height: none !important;
    overflow-y: auto !important;
}

/* --- Print Styles --- */
@media print {
    .no-print,
    #loadingOverlay,
    #authPage,
    nav,
    header,
    footer,
    .btn,
    .ql-toolbar {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    #displayMinutes {
        padding: 0;
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* --- Login Background Animation --- */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
