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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --primary-light: #3399ff;
    --primary-dark: #003d7a;
    --accent-color: #6366f1;
    --accent-light: #818cf8;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #d9e8f7 50%, #e8e6f9 100%);
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition-base);
}


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

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.7);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
    }
}

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

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

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

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

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

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideInDown 0.5s ease-out;
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

main.container {
    flex: 1;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--primary-color);
    color: #1e40af;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease-out, height 0.5s ease-out;
}

.btn:hover::before {
    width: 250px;
    height: 250px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: scale(0.97) translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 102, 204, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    animation: fadeIn 0.5s ease-out;
}

.auth-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(0, 102, 204, 0.08);
    animation: fadeIn 0.6s ease-out;
}

.auth-card h1 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Forms */
.form-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    backdrop-filter: blur(10px);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 2rem auto;
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-container h1 {
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
}

.form-container > p {
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.form-group {
    margin-bottom: 1.75rem;
    animation: slideInUp 0.5s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.15s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.25s; }

.form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: color var(--transition-base);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    background-color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
    color: #cbd5e1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.825rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* File Upload Input */
input[type="file"] {
    padding: 0.875rem !important;
    border: 2px dashed var(--primary-color) !important;
    border-radius: 10px !important;
    cursor: pointer;
    background-color: rgba(0, 102, 204, 0.03) !important;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: rgba(0, 102, 204, 0.08) !important;
    border-color: var(--primary-hover) !important;
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12) !important;
}

/* File upload button styling */
input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-right: 1rem;
    transition: all 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

@media (max-width: 768px) {
    .form-container {
        padding: 1.75rem 1.5rem;
        max-width: 100%;
        margin: 1rem auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        min-width: auto;
    }
}

/* Dashboard */
.dashboard {
    margin-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--border-color);
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.dashboard-header .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Class Grid */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.7s ease-out;
}

.class-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 102, 204, 0.08);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    will-change: transform;
    contain: layout style paint;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.class-card:hover::before {
    transform: scaleX(1);
}

.class-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.class-code {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.class-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.header-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .header-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeIn 0.5s ease-out;
}

.empty-state i {
    font-size: 5rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    opacity: 0.7;
    display: block;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.empty-state .btn {
    display: inline-block;
}

/* Class Detail */
.class-detail {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 102, 204, 0.08);
    animation: fadeIn 0.5s ease-out;
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.class-header > div:first-child {
    flex: 1;
    min-width: 300px;
}

.class-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 800;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.header-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .class-detail {
        padding: 1.75rem 1.5rem;
    }
    
    .class-header {
        flex-direction: column;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 100px;
    }
}

/* Tabs */
.class-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.tab-content {
    display: none;
}

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

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table thead {
    background-color: var(--bg-color);
}

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

.data-table th {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tbody tr:hover {
    background-color: var(--bg-color);
}

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

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: var(--text-secondary);
}

/* Session Detail */
.session-detail {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeIn 0.5s ease-out;
}

.session-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.session-header h1 {
    margin-bottom: 0.5rem;
}

.session-date {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.qr-section {
    text-align: center;
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.qr-section h2 {
    margin-bottom: 1rem;
}

.qr-code-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: inline-block;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.qr-code-container img {
    display: block;
    max-width: 300px;
    height: auto;
}

.qr-url {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 1rem 0;
    word-break: break-all;
}

.attendance-summary {
    margin: 2rem 0;
}

.attendance-summary h2 {
    margin-bottom: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    animation: floatIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.18);
    border-color: rgba(0, 102, 204, 0.2);
}

.stat-card h3 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
    white-space: normal;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
    word-break: break-word;
}

.attendance-list {
    margin-top: 2rem;
}

.attendance-list h3 {
    margin-bottom: 1rem;
}

.status-select {
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Student Dashboard */
.attendance-stats {
    margin: 1rem 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-success {
    color: var(--success-color);
}

.stat-warning {
    color: var(--warning-color);
}

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

.stat-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.present-count {
    color: var(--success-color);
}

.absent-count {
    color: var(--danger-color);
}

/* History Detail */
.history-detail {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeIn 0.5s ease-out;
}

.history-detail h1 {
    margin-bottom: 0.5rem;
}

.history-detail h2 {
    margin: 2rem 0 1rem;
}

/* Back Link */
.back-link {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.4s ease-out;
    padding: 1rem;
    overflow-y: auto;
}

.success-modal-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.success-modal-content .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    font-size: 1.25rem;
    color: #ef4444;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.success-modal-content .close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.success-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon i {
    color: white;
    font-size: 4rem;
}

.success-modal h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.success-modal p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.success-class-name {
    font-weight: 700;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
}

.status-pill-present {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-pill-late {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-pill-absent {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* File Upload Input */
input[type="file"] {
    padding: 0.875rem !important;
    border: 2px dashed var(--primary-color) !important;
    border-radius: 10px !important;
    cursor: pointer;
    background-color: rgba(0, 102, 204, 0.03) !important;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: rgba(0, 102, 204, 0.08) !important;
    border-color: var(--primary-hover) !important;
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12) !important;
}

/* File upload label styling for better UX */
input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-right: 1rem;
    transition: all 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .class-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .qr-code-container img {
        max-width: 250px;
    }

    .toast-container {
        gap: 0.5rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    font-size: 0.95rem;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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