/* C:\Users\USER\Desktop\code\LMS\assets\css\style.css */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&family=Sarabun:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #090d16;
    --bg-secondary: #131b2e;
    --bg-card: rgba(19, 27, 46, 0.65);
    --bg-card-hover: rgba(26, 36, 62, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.18);
    --border-glow: rgba(99, 102, 241, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-secondary: #a855f7; /* Purple */
    --color-success: #10b981; /* Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444; /* Red */
    --color-info: #06b6d4; /* Cyan */
    
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.06) 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    --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 16px 32px -4px rgba(0, 0, 0, 0.4), 0 8px 16px -4px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.4);
    --shadow-success-glow: 0 0 25px rgba(16, 185, 129, 0.4);
    
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --font-heading: 'Plus Jakarta Sans', 'Outfit', 'Sarabun', sans-serif;
    --font-sans: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ambient Background Glow Mesh */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -2;
    pointer-events: none;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    z-index: -2;
    pointer-events: none;
    animation: floatGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, 60px) scale(0.95); }
}

/* Base resets & scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Beautiful scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover {
    color: var(--color-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
    filter: brightness(1.1);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    border-color: var(--border-color);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    filter: brightness(1.1);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(13, 20, 36, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
    background-color: rgba(15, 23, 42, 0.9);
}

/* Glass Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-lg);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.12);
}

/* App Header / Navigation */
.navbar {
    background-color: rgba(9, 13, 22, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.navbar-brand i {
    -webkit-text-fill-color: initial;
    color: var(--color-primary);
    font-size: 26px;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-badge {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

/* Flash Messages */
.flash-message {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid;
    animation: fadeIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flash-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}
.flash-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}
.flash-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

/* Authentication Pages */
.auth-wrapper {
    min-height: calc(100vh - 73px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

/* User Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.course-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.08) 50%, rgba(6, 182, 212, 0.05) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 44px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.1);
}

.course-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.1) 60%, transparent 100%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.course-title {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.course-desc {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 800px;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Progress bar styling */
.progress-container {
    margin: 20px 0;
}
.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.progress-bar-bg {
    background-color: rgba(255, 255, 255, 0.06);
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.progress-bar-fill {
    height: 100%;
    background: var(--gradient-hero);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

/* Module / Lesson Cards List */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.lesson-item {
    background-color: rgba(19, 27, 46, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-item:not(.locked):hover {
    background-color: rgba(26, 36, 62, 0.85);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
}

.lesson-item.locked {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: rgba(13, 18, 30, 0.4);
}

.lesson-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.lesson-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.locked .lesson-icon {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.lesson-title-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.lesson-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 16px;
}

.lesson-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

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

.badge-info {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-muted {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Sidebar Info Card */
.sidebar-section {
    margin-bottom: 24px;
}

.score-compare-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.score-compare-title {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-compare-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}
.score-compare-item:last-child {
    border-bottom: none;
}

.score-compare-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.score-compare-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.score-diff {
    font-weight: 600;
}
.score-diff.plus {
    color: var(--color-success);
}
.score-diff.minus {
    color: var(--color-danger);
}

/* Lesson Player Interface */
.player-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
    margin-top: 20px;
    margin-bottom: 50px;
    min-height: 550px;
    height: auto;
}

@media (max-width: 992px) {
    .player-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.player-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.player-content-wrapper {
    flex-grow: 1;
    background-color: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
}

.player-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-placeholder, .slide-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.audio-player-container {
    width: 100%;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 60px;
    margin-bottom: 20px;
}

.audio-bar {
    width: 8px;
    height: 20px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    animation: bounce 1s infinite alternate;
}
.audio-bar:nth-child(2n) {
    animation-delay: 0.2s;
    height: 35px;
    background: var(--color-secondary);
}
.audio-bar:nth-child(3n) {
    animation-delay: 0.4s;
    height: 50px;
    background: var(--color-info);
}
.audio-bar:nth-child(4n) {
    animation-delay: 0.1s;
    height: 15px;
}

@keyframes bounce {
    from { transform: scaleY(0.3); }
    to { transform: scaleY(1); }
}

/* Lesson Navigation Sidebar */
.player-sidebar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 650px;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.lesson-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
}

.lesson-nav-item.active a {
    background-color: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    font-weight: 500;
}

.lesson-nav-item.locked a {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Quiz Interface */
.quiz-wrapper {
    max-width: 800px;
    margin: 40px auto;
}

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

.quiz-timer {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 24px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
}

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

.option-item {
    position: relative;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}

.option-label:hover {
    background-color: rgba(15, 23, 42, 0.7);
    border-color: var(--border-light);
}

.option-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-input:checked + .option-label {
    background-color: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.option-number {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    margin-right: 16px;
    color: var(--text-secondary);
}

.option-input:checked + .option-label .option-number {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Quiz Review Styles */
.review-correct {
    border-color: var(--color-success) !important;
    background-color: rgba(16, 185, 129, 0.08) !important;
}

.review-incorrect {
    border-color: var(--color-danger) !important;
    background-color: rgba(239, 68, 68, 0.08) !important;
}

/* Certificate HTML Layout (Pixel Perfect Print View) */
.cert-page {
    background-color: #111;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-border {
    width: 842px; /* Standard A4 landscape size */
    height: 595px;
    padding: 20px;
    background: #ffffff;
    color: #1e293b;
    border: 16px solid #1e293b;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Sarabun', 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.certificate-inner {
    border: 4px double #b45309; /* Elegant amber double border */
    width: 100%;
    height: 100%;
    padding: 25px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: relative;
}

.cert-logo {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 2px;
}

.cert-title {
    font-size: 34px;
    font-weight: 700;
    color: #b45309; /* Gold/Amber */
    margin: 6px 0;
    font-family: 'Sarabun', sans-serif;
}

.cert-subtitle {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-recipient {
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 2px solid #cbd5e1;
    padding: 0 30px 6px 30px;
    margin: 10px 0;
    min-width: 300px;
}

.cert-text {
    font-size: 14px;
    max-width: 600px;
    color: #475569;
    line-height: 1.5;
}

.cert-signatures {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 15px;
    padding: 0 50px;
}

.cert-sig-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-sig-line {
    width: 180px;
    border-top: 1px solid #94a3b8;
    margin-top: 6px;
    margin-bottom: 4px;
}

.cert-sig-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.cert-sig-title {
    font-size: 11px;
    color: #64748b;
}

.cert-code {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 10px;
    color: #94a3b8;
}

.cert-date {
    position: absolute;
    bottom: 10px;
    left: 15px;
    font-size: 10px;
    color: #94a3b8;
}

/* Print CSS to make HTML printable as PDF cleanly */
@media print {
    body * {
        visibility: hidden;
    }
    .cert-page, .cert-page * {
        visibility: visible;
    }
    .cert-page {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        background: none;
    }
    .certificate-border {
        box-shadow: none;
        border: 20px solid #1e293b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .no-print {
        display: none !important;
    }
}

/* Instructor / Admin Dashboard Styling */
.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 73px);
}

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

.admin-sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
}

.admin-menu {
    list-style: none;
}

.admin-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.admin-menu-item.active a, .admin-menu-item a:hover {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-left-color: var(--color-primary);
}

.admin-main {
    padding: 40px;
    overflow-y: auto;
}

@media (max-width: 576px) {
    .admin-main {
        padding: 20px;
    }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: rgba(19, 27, 46, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    margin-top: 4px;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background-color: rgba(99, 102, 241, 0.12);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.1);
}

/* Beautiful Admin Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table th {
    background-color: rgba(13, 19, 32, 0.85);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    transition: background 0.2s ease;
}

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

.table tr:hover td {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Tabs */
.tabs-header {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

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

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

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

/* Toast/Alert notification widget */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--color-danger);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Dropdown list for notifications */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 300px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 10;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}
.dropdown-item .notif-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.dropdown-item .notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Quick Cooldown Reset Button (for demo purposes) */
.demo-bypass-btn {
    font-size: 11px;
    color: var(--color-warning);
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px dashed var(--color-warning);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}
.demo-bypass-btn:hover {
    background-color: var(--color-warning);
    color: var(--bg-primary);
}
