/* ========================================
   GeoQR Student App - Premium Stylesheet
   Modern, Glassmorphism Design System
   ======================================== */

/* ========================================
   CSS Custom Properties (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;

    /* Accent Colors */
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-light: #fbbf24;

    /* Background Colors - Clear Hierarchy: dark → primary → secondary → tertiary */
    --bg-dark: #030712;
    --bg-primary: #0a0f1a;
    --bg-secondary: #151c2c;
    --bg-tertiary: #1e2a3d;

    /* Glass Effect - Premium Crisp Glass */
    --glass-bg: rgba(22, 30, 46, 0.65);
    --glass-border: rgba(148, 163, 184, 0.18);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);

    /* Text Colors - Strong Contrast Hierarchy */
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;

    /* Border Colors */
    --border-color: rgba(100, 116, 139, 0.35);
    --border-light: rgba(148, 163, 184, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #020617 100%);

    /* Shadows - Enhanced Depth */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.35);
    --shadow-glow-success: 0 0 40px rgba(16, 185, 129, 0.35);

    /* Card Elevation */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--glass-border);
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--glass-border);

    /* Spacing */
    --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;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   Custom Scrollbar (Theme Matched)
   ======================================== */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-purple) 100%);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--accent-purple) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-500) var(--bg-secondary);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Animated Background
   ======================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.floating-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(168, 85, 247, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: -7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(6, 182, 212, 0.2);
    top: 50%;
    left: 60%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* ========================================
   Container
   ======================================== */
.container {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-6);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.scan-container {
    max-width: 520px;
}

/* ========================================
   Header
   ======================================== */
.header {
    text-align: center;
    padding: var(--space-10) 0 var(--space-8);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 48px;
    height: 48px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(99, 102, 241, 0.1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
}

.dashboard-header .logo {
    gap: var(--space-2);
}

.dashboard-header .logo-icon {
    width: 36px;
    height: 36px;
}

/* Scan Header */
.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: var(--space-2);
    margin-left: calc(var(--space-2) * -1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

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

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.header-spacer {
    width: 60px;
}

/* ========================================
   Glass Card - Premium Elevated Style
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--card-shadow, var(--glass-shadow));
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover, 0 16px 48px rgba(0, 0, 0, 0.2));
}

/* ========================================
   Login Card
   ======================================== */
.login-card {
    padding: var(--space-8);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-4);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.card-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.card-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========================================
   Form Styles
   ======================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: var(--space-4) var(--space-4);
    font-size: 1rem;
    font-family: inherit;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:hover {
    border-color: var(--primary-500);
}

.form-group input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.input-focus {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.form-group input:focus~.input-focus {
    width: 100%;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: opacity var(--transition-fast);
}

.btn-arrow {
    transition: transform var(--transition-normal);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Button Loading State */
.btn-loader {
    display: none;
}

.btn.loading .btn-content {
    opacity: 0;
}

.btn.loading .btn-loader {
    display: flex;
    position: absolute;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-500);
}

/* Icon Button */
.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-icon:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Button Sizes */
.btn-lg {
    padding: var(--space-5) var(--space-8);
    font-size: 1.1rem;
}

/* ========================================
   Card Footer
   ======================================== */
.card-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.card-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Welcome Card
   ======================================== */
.welcome-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    position: relative;
    z-index: 1;
}

.avatar {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.welcome-text {
    flex: 1;
}

.welcome-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.welcome-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: var(--space-1) 0;
}

.info-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.welcome-decoration {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.welcome-decoration svg {
    width: 120px;
    height: 120px;
}

/* ========================================
   Section Title
   ======================================== */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.section-title svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* ========================================
   Action Cards
   ======================================== */
.actions-section {
    margin-bottom: var(--space-6);
}

.action-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.action-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateX(8px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-glow);
}

.action-card.primary-action {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.action-card-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.secondary-action .action-card-icon {
    background: var(--bg-tertiary);
}

.secondary-action .action-card-icon svg {
    color: var(--text-secondary);
}

.action-card-content {
    flex: 1;
}

.action-card-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.action-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.action-card-arrow {
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.action-card-arrow svg {
    width: 20px;
    height: 20px;
}

.action-card:hover .action-card-arrow {
    transform: translateX(4px);
    color: var(--primary-400);
}

.coming-soon-badge {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* ========================================
   Activity Section
   ======================================== */
.activity-section {
    margin-bottom: var(--space-6);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 16px;
    height: 16px;
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.activity-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.activity-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Scanner Section
   ======================================== */
.scanner-section {
    margin-bottom: var(--space-6);
}

.scanner-init {
    text-align: center;
    padding: var(--space-10);
}

.init-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
}

.init-animation svg {
    width: 40px;
    height: 40px;
    color: var(--primary-400);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.scan-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.2);
    animation: scan-pulse 2s ease-in-out infinite;
}

@keyframes scan-pulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.init-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.init-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Scanner Container */
.scanner-container {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: var(--bg-secondary);
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    z-index: 10;
    pointer-events: none;
}

.scanner-corners span {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-400);
}

.corner.tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-radius: var(--radius-lg) 0 0 0;
}

.corner.tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-radius: 0 var(--radius-lg) 0 0;
}

.corner.bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 var(--radius-lg);
}

.corner.br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-radius: 0 0 var(--radius-lg) 0;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-400) 50%, transparent 100%);
    animation: scan-move 2s ease-in-out infinite;
}

@keyframes scan-move {

    0%,
    100% {
        top: 10%;
        opacity: 0;
    }

    10%,
    90% {
        opacity: 1;
    }

    50% {
        top: 90%;
    }
}

#qrReader {
    width: 100%;
    min-height: 300px;
}

#qrReader video {
    width: 100%;
    border-radius: var(--radius-2xl);
}

.scanner-controls {
    display: flex;
    justify-content: center;
    margin-top: var(--space-4);
}

/* ========================================
   Location Section
   ======================================== */
.location-section {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.location-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.location-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-icon-wrapper svg {
    width: 20px;
    height: 20px;
    color: var(--primary-400);
}

.location-info {
    flex: 1;
}

.location-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.location-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.location-indicator {
    padding: var(--space-2);
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    display: block;
}

.indicator-dot.pending {
    background: var(--warning);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.indicator-dot.success {
    background: var(--success);
}

.indicator-dot.error {
    background: var(--danger);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.location-coords {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}

.coord {
    text-align: center;
}

.coord-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.coord-value {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--primary-300);
}

.coord-divider {
    width: 1px;
    background: var(--border-color);
}

/* ========================================
   Result Section
   ======================================== */
.result-section {
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.result-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-weight: 600;
    color: var(--success-light);
}

.result-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.15);
}

.result-icon svg {
    width: 20px;
    height: 20px;
}

.result-token {
    background: rgba(15, 23, 42, 0.6);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.token-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.result-token code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--success-light);
    word-break: break-all;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ========================================
   Modals
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: var(--space-8);
    text-align: center;
    animation: modal-in 0.4s var(--transition-bounce);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-5);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

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

.modal-icon svg {
    width: 40px;
    height: 40px;
}

.modal-icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    border: 2px solid currentColor;
    opacity: 0.3;
    animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.modal-details {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.detail-value {
    font-weight: 500;
    font-size: 0.85rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: calc(100% - var(--space-8));
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.4s var(--transition-bounce);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(6, 182, 212, 0.9) 100%);
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(236, 72, 153, 0.9) 100%);
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(251, 191, 36, 0.9) 100%);
}

.toast-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    text-align: center;
    padding: var(--space-8) 0 var(--space-4);
    margin-top: auto;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (min-width: 768px) {
    .container {
        padding: var(--space-8);
    }

    .login-card {
        padding: var(--space-10);
    }

    .logo-icon {
        width: 56px;
        height: 56px;
    }

    .logo h1 {
        font-size: 2.25rem;
    }

    .action-cards {
        flex-direction: row;
    }

    .action-card {
        flex: 1;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: var(--space-4);
    }

    .login-card {
        padding: var(--space-6);
    }

    .welcome-card {
        padding: var(--space-5);
    }

    .avatar {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .welcome-text h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* ========================================
   Role Selector
   ======================================== */
.role-selector {
    display: flex;
    gap: var(--space-2);
}

.role-selector input[type="radio"] {
    display: none;
}

.role-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.role-option svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.role-option span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.role-option:hover {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.1);
}

.role-selector input[type="radio"]:checked+.role-option {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.role-selector input[type="radio"]:checked+.role-option svg {
    color: var(--primary-400);
}

.role-selector input[type="radio"]:checked+.role-option span {
    color: var(--text-primary);
}

/* ========================================
   Admin/Faculty Welcome Cards
   ======================================== */
.welcome-card.admin-card {
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}

.welcome-card.faculty-card {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.admin-avatar,
.faculty-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.admin-avatar svg,
.faculty-avatar svg {
    width: 32px;
    height: 32px;
    color: white;
}

.admin-badge {
    background: rgba(255, 255, 255, 0.25);
}

.faculty-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   Stats Section (Admin Dashboard)
   ======================================== */
.stats-section {
    margin-bottom: var(--space-6);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card-icon.devices {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-400);
}

.stat-card-icon.users {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.stat-card-icon.faculty {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.stat-card-icon.attendance {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.stat-card-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Classes Section (Faculty Dashboard)
   ======================================== */
.classes-section {
    margin-bottom: var(--space-6);
}

.class-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.class-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.class-card:hover {
    transform: translateX(4px);
    border-color: var(--primary-500);
}

.class-card.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-500);
}

.class-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: var(--space-2) var(--space-3);
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
}

.time-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.time-period {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.class-info {
    flex: 1;
}

.class-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.class-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.class-stats {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.class-stats .stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.85rem;
    font-weight: 600;
}

.class-stats .stat svg {
    width: 14px;
    height: 14px;
}

.class-stats .stat.present {
    color: var(--success-light);
}

.class-stats .stat.pending {
    color: var(--text-muted);
}

.class-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.class-status {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.class-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.class-status.in-progress {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-400);
}

.class-status.upcoming {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* ========================================
   Summary Section (Faculty Dashboard)
   ======================================== */
.summary-section {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.summary-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    text-align: center;
}

.summary-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Activity Icon Info Variant */
.activity-icon.info {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-400);
}

/* ========================================
   Responsive for New Components
   ======================================== */
@media (max-width: 480px) {
    .role-selector {
        flex-direction: row;
    }

    .role-option {
        padding: var(--space-3) var(--space-2);
    }

    .role-option svg {
        width: 20px;
        height: 20px;
    }

    .role-option span {
        font-size: 0.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }

    .stat-card {
        padding: var(--space-3);
    }

    .stat-card-value {
        font-size: 1.25rem;
    }

    .class-card {
        flex-wrap: wrap;
    }

    .class-time {
        min-width: 50px;
    }
}

/* ========================================
   Register Link Styles
   ======================================== */
.register-link {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.register-link:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

.card-footer {
    margin-top: var(--space-4);
    text-align: center;
}

.card-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}