/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0f1d;
    --bg-secondary: #131b2e;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-color: #10b981; /* Emerald green / minty freshness for dental vibe */
    --primary-glow: rgba(16, 185, 129, 0.15);
    --secondary-color: #3b82f6; /* Blue accent */
    --accent-color: #f59e0b; /* Yellow/Amber for warning/pending */
    --danger-color: #ef4444; /* Red for alert */
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Header & Navigation */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

header nav a, header nav span {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

header nav a:hover, header nav a.active {
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

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

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

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

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

/* Layout Main */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Card Styles */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Grid system */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Dashboard Analytics */
.metric-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Login/Register Form page */
.auth-container {
    max-width: 450px;
    width: 100%;
    margin: auto;
    padding: 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Tables styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-weight: 600;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--primary-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--accent-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--secondary-color);
}

/* Alert Notification */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--primary-color);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-color);
}

/* Proctoring Webcam and Quiz Styling */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.proctor-camera-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 180px;
    height: 135px;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
    background: #000;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.proctor-camera-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror */
}

.proctor-camera-box .camera-label {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Progress bar container */
.progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease-in-out;
}

/* Print Styles for Certificate */
@media print {
    body * {
        visibility: hidden;
    }
    #certificate-print-area, #certificate-print-area * {
        visibility: visible;
    }
    #certificate-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Web layout for Certificate Display */
.certificate-preview {
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    border: 8px double #e2e8f0;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.certificate-preview h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.certificate-preview h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.certificate-preview .recipient {
    font-size: 2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding: 0 2rem 0.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.certificate-preview .text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

.certificate-preview .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 0 2rem;
}

.certificate-preview .meta .signature {
    text-align: center;
}

.certificate-preview .meta .signature .line {
    width: 150px;
    border-bottom: 1px solid #ffffff;
    margin-bottom: 0.5rem;
}

.certificate-preview .qr-verification {
    width: 90px;
    height: 90px;
    background: white;
    padding: 4px;
    border-radius: 4px;
}
