/* Katipunan School Attendance Management System - CSS Styles */

/* CSS Variables for Design System */
:root {
    --background: hsl(210, 20%, 98%);
    --foreground: hsl(215, 25%, 27%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(215, 25%, 27%);
    --popover: hsl(0, 0%, 100%);
    --popover-foreground: hsl(215, 25%, 27%);
    --primary: hsl(210, 100%, 45%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(146, 60%, 45%);
    --secondary-foreground: hsl(0, 0%, 100%);
    --muted: hsl(210, 20%, 96%);
    --muted-foreground: hsl(215, 15%, 50%);
    --accent: hsl(210, 40%, 92%);
    --accent-foreground: hsl(215, 25%, 27%);
    --destructive: hsl(0, 84%, 60%);
    --destructive-foreground: hsl(0, 0%, 100%);
    --border: hsl(210, 20%, 90%);
    --input: hsl(210, 20%, 94%);
    --ring: hsl(210, 100%, 45%);
    --success: hsl(146, 60%, 45%);
    --success-foreground: hsl(0, 0%, 100%);
    --warning: hsl(43, 96%, 56%);
    --warning-foreground: hsl(0, 0%, 100%);
    --radius: 0.5rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px hsl(210, 20%, 85% / 0.3);
    --shadow-md: 0 4px 12px hsl(210, 20%, 80% / 0.15);
    --shadow-lg: 0 8px 25px hsl(210, 20%, 75% / 0.2);
    
    /* Responsive breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large: 1200px;
    
    /* Responsive spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    /* Safe area insets for notched devices */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

/* Dark mode variables */
.dark {
    --background: hsl(222.2, 84%, 4.9%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(222.2, 84%, 4.9%);
    --card-foreground: hsl(210, 40%, 98%);
    --popover: hsl(222.2, 84%, 4.9%);
    --popover-foreground: hsl(210, 40%, 98%);
    --primary: hsl(210, 40%, 98%);
    --primary-foreground: hsl(222.2, 47.4%, 11.2%);
    --secondary: hsl(217.2, 32.6%, 17.5%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --muted: hsl(217.2, 32.6%, 17.5%);
    --muted-foreground: hsl(215, 20.2%, 65.1%);
    --accent: hsl(217.2, 32.6%, 17.5%);
    --accent-foreground: hsl(210, 40%, 98%);
    --destructive: hsl(0, 62.8%, 30.6%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(217.2, 32.6%, 17.5%);
    --input: hsl(217.2, 32.6%, 17.5%);
    --ring: hsl(212.7, 26.8%, 83.9%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

/* Mobile defaults and safe-area support */
html, body {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

img, canvas, video {
    max-width: 100%;
    height: auto;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Mobile Backdrop */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar Styles */
.sidebar {
    width: 16rem;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, var(--transition);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1500;
    left: 0;
    top: 0;
}

.sidebar.collapsed {
    width: 4rem;
}

.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* School Logo Styling */
.school-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius);
    transition: var(--transition);
}

.school-logo:hover {
    transform: scale(1.05);
}

.brand-text h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.sidebar.collapsed .brand-text {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group:first-child {
    margin-top: 0;
}

.nav-group h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar.collapsed .nav-group h4 span {
    display: none;
}

.nav-group ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.nav-link.active {
    background-color: hsl(var(--primary) / 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-link i {
    width: 1rem;
    text-align: center;
}

.nav-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Hide text when sidebar is collapsed */
.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-item-content {
    display: none;
}

.sidebar.collapsed .nav-group h4 span {
    display: none;
}

/* Center icons when collapsed */
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-group h4 {
    text-align: center;
    padding: 0.5rem;
}

.sidebar.collapsed .nav-group-toggle {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-group-toggle span {
    display: none;
}

.sidebar.collapsed .nav-group-toggle .nav-arrow {
    display: none;
}

/* Collapsible Navigation Groups */
.nav-group-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--foreground);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    width: 100%;
}

.nav-group-toggle:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.nav-group-toggle.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.nav-group-toggle i:first-child {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.nav-group-toggle .nav-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.nav-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.nav-group-toggle.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-submenu.expanded {
    max-height: 500px;
}

/* Hide main-level Sections when Classrooms is expanded */
.nav-group-toggle[data-target="classrooms-menu"].expanded ~ li .nav-group-toggle[data-target="sections-menu"] {
    display: none;
}

/* Hide arrow when collapsed */
.sidebar.collapsed .nav-arrow {
    display: none;
}

.nav-item-content .badge {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
}

.section-name {
    font-weight: 500;
    font-size: 0.875rem;
}

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

.sidebar.collapsed .nav-item-content {
    display: none;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 16rem;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, var(--transition);
    min-height: 100vh;
    width: calc(100% - 16rem);
}

.sidebar.collapsed + .main-content {
    margin-left: 4rem;
    width: calc(100% - 4rem);
}

/* Dashboard Header */
.dashboard-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: calc(1rem + var(--safe-top)) 1rem 1rem 1rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1200;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-left: max(0px, var(--safe-left));
    padding-right: max(0px, var(--safe-right));
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: var(--transition);
    font-size: 1.25rem;
}

.mobile-menu-toggle:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: var(--destructive);
    color: var(--destructive-foreground);
    font-size: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 1.5rem;
}

.dashboard-header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.dashboard-title h2 {
    font-size: clamp(1.25rem, 2.5vw + 0.5rem, 1.875rem);
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.dashboard-title p {
    color: var(--muted-foreground);
}

.dashboard-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-badge {
    background-color: hsl(var(--primary) / 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.filter-badge.secondary {
    background-color: hsl(var(--secondary) / 0.1);
    color: var(--secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

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

.stat-header h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.stat-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.primary {
    background-color: var(--primary);
}

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

.stat-icon.destructive {
    background-color: var(--destructive);
}

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

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* QR Scanner Section */
.qr-scanner-section {
    display: grid;
    margin-bottom: 2rem;
}

.qr-scanner-card {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--secondary) / 0.05));
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.qr-scanner-card:hover {
    box-shadow: var(--shadow-md);
}

.qr-scanner-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: white;
    font-size: 1.5rem;
}

.qr-scanner-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.qr-scanner-header p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.quick-actions-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-actions-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.quick-actions-card p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.action-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.action-badge.primary {
    background-color: hsl(var(--primary) / 0.1);
    color: var(--primary);
}

.action-badge.success {
    background-color: hsl(var(--success) / 0.1);
    color: var(--success);
}

.action-badge.secondary {
    background-color: hsl(var(--secondary) / 0.1);
    color: var(--secondary);
}

/* Charts Section */
.charts-section {
    display: grid;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.chart-header p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.chart-content {
    height: 300px;
}

/* Student Table */
.student-table-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.table-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.table-title p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.table-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    max-width: 16rem;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.class-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    max-width: 8rem;
}

.table-content {
    overflow-x: auto;
}

.student-table {
    width: 100%;
    border-collapse: collapse;
}

.student-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.student-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.student-table tr:hover {
    background-color: hsl(var(--muted) / 0.5);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-present {
    background-color: var(--success);
    color: var(--success-foreground);
}

.status-late {
    background-color: var(--warning);
    color: var(--warning-foreground);
}

.status-absent {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

.grade-badge {
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--popover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 10rem;
    z-index: 1000;
    display: none;
}

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

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--popover-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    position: relative;
}

.profile-arrow {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.profile-btn.active .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 16rem;
    z-index: 1300;
    display: none;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: all 0.2s ease;
}

.profile-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.profile-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.profile-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.profile-info p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0.125rem 0 0 0;
}

.profile-menu-items {
    padding: 0.5rem 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
}

.profile-menu-item:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.profile-menu-item i {
    width: 1rem;
    text-align: center;
    color: var(--muted-foreground);
}

.profile-menu-item:hover i {
    color: inherit;
}

.profile-menu-item.text-destructive {
    color: var(--destructive);
}

.profile-menu-item.text-destructive:hover {
    background-color: hsl(var(--destructive) / 0.1);
    color: var(--destructive);
}

.profile-menu-item.text-destructive i {
    color: var(--destructive);
}

.profile-menu-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* iOS touch target minimum */
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-outline {
    border-color: var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: calc(var(--spacing-md) + var(--safe-top)) var(--spacing-md) calc(var(--spacing-md) + var(--safe-bottom)) var(--spacing-md);
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 28rem;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.modal-body {
    padding: 1.5rem;
}

/* Scanner */
.scanner-container {
    position: relative;
    margin-bottom: 1rem;
}

.scanner-video {
    width: 100%;
    height: 16rem;
    background-color: black;
    border-radius: var(--radius);
    object-fit: cover;
    transform: none !important;
}

@media (max-width: 767px) {
    .date-display {
        display: none;
    }
    .dashboard-header {
        padding-top: calc(0.75rem + var(--safe-top));
        padding-bottom: 0.75rem;
    }
    .scanner-video {
        height: 12rem;
    }
    
    .modal-content {
        margin: 0;
        width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header,
    .modal-body {
        padding: var(--spacing-md);
    }
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-loading {
    text-align: center;
    color: white;
}

.scanner-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.scanner-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 2s infinite;
    margin-right: 0.25rem;
}

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

.scanner-result {
    padding: 1rem;
    background-color: hsl(var(--success) / 0.1);
    border: 1px solid hsl(var(--success) / 0.2);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.scanner-mode {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.mode-toggle {
    display: inline-flex;
    gap: 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.25rem;
}

.mode-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.scanner-info {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.scanner-controls {
    display: flex;
    gap: 0.5rem;
}

.scanner-controls .btn {
    flex: 1;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
}

.toast {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 0.5rem;
    min-width: 20rem;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--destructive);
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toast-title {
    font-weight: 600;
    color: var(--foreground);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 1.25rem;
}

.toast-message {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */

/* Mobile First - Base styles (0px and up) */
.stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.qr-scanner-section {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.charts-section {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.dashboard-content {
    padding: var(--spacing-md);
}

.dashboard-header {
    padding: 1rem;
}

.dashboard-header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.header-content {
    flex-direction: row;
    gap: var(--spacing-sm);
    align-items: center;
}

.header-right {
    flex-direction: row;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: nowrap;
}

.table-controls {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: stretch;
}

.search-box,
.class-select {
    width: 100%;
    max-width: none;
}

/* Small Mobile (480px and up) */
@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-content {
        padding: var(--spacing-lg);
    }
    
    .dashboard-header {
        padding: 1rem;
    }
    
    .header-right {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .sidebar {
        position: fixed;
        transform: translateX(0);
        width: 16rem;
    }
    
    .main-content {
        margin-left: 16rem;
    }
    
    .sidebar.collapsed {
        width: 4rem;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 4rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-scanner-section {
        grid-template-columns: 1fr 2fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-header-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .table-controls {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .search-box {
        max-width: 16rem;
    }
    
    .class-select {
        max-width: 8rem;
    }
}

/* Mobile styles (under 768px) */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 16rem;
        z-index: 1600; /* above backdrop and content */
        height: 100dvh; /* account for mobile browser UI */
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        width: 16rem;
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .mobile-backdrop {
        display: block;
    }
    
    /* Typography adjustments for mobile */
    .dashboard-title h2 {
        font-size: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Card padding adjustments */
    .stat-card,
    .qr-scanner-card,
    .quick-actions-card,
    .chart-card,
    .student-table-card {
        padding: var(--spacing-md);
    }
    
    /* Table responsiveness */
    .table-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .student-table {
        min-width: 600px;
    }
    
    .student-table th,
    .student-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .student-info {
        gap: 0.5rem;
    }
    
    .student-avatar {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .scanner-video {
        height: 12rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dashboard-content {
        padding: var(--spacing-xl);
    }
    
    .dashboard-header {
        padding: 1rem;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .dashboard-content {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: var(--spacing-xl);
    }
    
    .header-content {
        max-width: none;
        width: 100%;
        margin: 0;
    }
}

/* Very Small Screens (under 480px) */
@media (max-width: 479px) {
    .dashboard-content {
        padding: var(--spacing-sm);
    }
    
    .dashboard-header {
        padding: 1rem;
    }
    
    .stat-card {
        padding: var(--spacing-sm);
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .dashboard-title h2 {
        font-size: 1.25rem;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text p {
        font-size: 0.75rem;
    }
    
    .date-display {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-height: 40px;
    }
    
    .modal-content {
        width: calc(100% - 1rem);
        margin: 0.5rem;
    }
    
    .scanner-video {
        height: 10rem;
    }
}

/* Very small devices (≤360px wide) */
@media (max-width: 360px) {
    .dashboard-title h2 {
        font-size: 1.125rem;
    }
    .stat-card,
    .qr-scanner-card,
    .quick-actions-card,
    .chart-card,
    .student-table-card {
        padding: var(--spacing-sm);
    }
    .student-table {
        min-width: 520px;
    }
    .status-badge,
    .grade-badge {
        font-size: 0.7rem;
    }
}

/* Landscape phones with limited height */
@media (max-height: 480px) and (orientation: landscape) {
    .scanner-video {
        height: 8rem;
    }
    .chart-content {
        height: 220px;
    }
    .modal-content {
        max-height: calc(100vh - 1rem);
    }
    .dashboard-header {
        padding-top: calc(0.5rem + var(--safe-top));
        padding-bottom: 0.5rem;
    }
}

/* ===== FOOTER STYLES ===== */

.site-footer {
    background-color: white;
    border-top: 1px solid var(--border);
    margin-top: auto;
    width: 100%;
    /* Footer now inherits the main-content margin behavior */
}

.footer-content {
    display: grid;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer Brand Section */
.footer-brand {
    grid-column: 1 / -1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.footer-logo i {
    font-size: 2rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    line-height: 1.2;
}

.footer-brand-text p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

.footer-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    max-width: 400px;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent);
    color: var(--muted-foreground);
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social a:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--spacing-xs) 0;
    transition: var(--transition);
    border-radius: var(--radius);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: var(--spacing-sm);
}

.footer-links a i {
    width: 1rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-links a:hover i {
    opacity: 1;
    color: var(--primary);
}

/* Footer Contact Section */
.footer-contact {
    grid-column: 1 / -1;
}

.contact-info {
    display: grid;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-item i {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-item div {
    flex: 1;
}

.contact-item strong {
    display: block;
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.contact-item p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Footer Bottom */
.footer-bottom {
    background-color: white;
    border-top: 1px solid var(--border);
    padding: var(--spacing-sm);
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: var(--spacing-md);
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-copyright p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin: 0;
}

.footer-version {
    font-size: 0.75rem !important;
    opacity: 0.8;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

.footer-divider {
    color: var(--muted-foreground);
    opacity: 0.5;
}

/* ===== FOOTER RESPONSIVE DESIGN ===== */

/* Mobile First - Base styles (0px and up) */
.footer-content {
    grid-template-columns: 1fr;
    padding: var(--spacing-md) var(--spacing-md);
    gap: var(--spacing-md);
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    justify-content: center;
}

.footer-social {
    justify-content: center;
}

.contact-info {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
}

/* Small Mobile (480px and up) */
@media (min-width: 480px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: left;
    }
    
    .footer-logo {
        justify-content: flex-start;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        padding: var(--spacing-xl) var(--spacing-md);
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-bottom-content {
        flex-direction: row;
        text-align: center;
        justify-content: center;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr repeat(3, 1fr);
        padding: var(--spacing-2xl) var(--spacing-md);
        gap: var(--spacing-2xl);
    }
    
    .footer-brand {
        grid-column: 1;
        grid-row: 1;
    }
    
    .footer-contact {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: var(--spacing-lg);
    }
    
    .contact-info {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr repeat(3, 1fr) 2fr;
        gap: var(--spacing-2xl);
        padding: var(--spacing-2xl);
    }
    
    .footer-brand {
        grid-column: 1;
    }
    
    .footer-contact {
        grid-column: 5;
        grid-row: 1;
        margin-top: 0;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* Very Small Screens (under 480px) */
@media (max-width: 479px) {
    .footer-content {
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .footer-social a {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    
    .footer-brand-text h3 {
        font-size: 1.25rem;
    }
    
    .contact-item {
        gap: var(--spacing-sm);
    }
    
    .footer-bottom {
        padding: var(--spacing-sm);
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .footer-divider {
        display: none;
    }
}

/* Very small devices (≤360px wide) */
@media (max-width: 360px) {
    .footer-brand-text h3 {
        font-size: 1.125rem;
    }
    
    .footer-description {
        font-size: 0.8125rem;
    }
    
    .contact-item p,
    .footer-links a,
    .footer-copyright p,
    .footer-bottom-links a {
        font-size: 0.8125rem;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.pagination-info {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-number:hover:not(.active) {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.pagination-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: 600;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.records-per-page {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.records-per-page label {
    font-weight: 500;
}

.records-per-page select {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
}

.records-per-page select:hover {
    border-color: var(--primary);
}

.records-per-page select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--ring) / 0.2;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        font-size: 0.8125rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .pagination-number {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8125rem;
    }
    
    .records-per-page {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pagination-numbers {
        max-width: 100%;
        overflow-x: auto;
        padding: var(--spacing-xs) 0;
    }
    
    .pagination-btn span {
        display: none;
    }
    
    .pagination-btn i {
        margin: 0;
    }
}

/* Dashboard Header Styles */
.dashboard-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.dashboard-title h2 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--foreground);
    font-size: 1.5rem;
    font-weight: 600;
}

.dashboard-title p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Table Header Styles */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.table-title h3 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--foreground);
    font-size: 1.25rem;
    font-weight: 600;
}

.table-title p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.table-actions {
    display: flex;
    gap: var(--spacing-md);
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.filter-controls {
    display: flex;
    gap: var(--spacing-md);
}

.filter-select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition);
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--ring) / 0.2;
}

/* Student Table Enhancements */
.student-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.student-name {
    font-weight: 500;
    color: var(--foreground);
}

.student-id {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.lrn-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.class-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--accent);
    color: var(--accent-foreground);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.time-badge {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.time-badge.time-absent {
    color: var(--muted-foreground);
    background: var(--muted);
}

.time-badge.time-in {
    background: var(--success);
    color: var(--success-foreground);
}

.time-badge.time-out {
    background: var(--warning);
    color: var(--warning-foreground);
}

.time-badge.time-out.pending {
    background: var(--accent);
    color: var(--muted-foreground);
}

.grade-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 2rem;
}

.grade-badge.grade-a,
.grade-badge.grade-aplus {
    background: var(--success);
    color: var(--success-foreground);
}

.grade-badge.grade-aminus,
.grade-badge.grade-b,
.grade-badge.grade-bplus {
    background: var(--warning);
    color: var(--warning-foreground);
}

.grade-badge.grade-bminus,
.grade-badge.grade-c,
.grade-badge.grade-cplus {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.dropdown {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.dropdown-toggle {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
}

.dropdown-toggle:hover {
    background: var(--accent);
    color: var(--foreground);
}

/* Table column alignment */
.student-table th:last-child,
.student-table td:last-child {
    text-align: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    display: none;
    padding: var(--spacing-xs) 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.dropdown-menu a:hover:not(.disabled) {
    background: var(--accent);
    color: var(--primary);
}

.dropdown-menu a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: var(--spacing-xs) 0;
}

/* QR Scanner Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: var(--spacing-xs);
}

.modal-close:hover {
    color: var(--foreground);
}

.modal-body {
    padding: var(--spacing-lg);
}

.qr-scanner-container {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.qr-result {
    background: var(--accent);
    padding: var(--spacing-md);
    border-radius: var(--radius);
    margin-top: var(--spacing-md);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--destructive);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header-section {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .table-actions {
        justify-content: center;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .filter-controls {
        justify-content: center;
    }
    
    .records-per-page {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .toast-container {
        left: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .toast {
        min-width: auto;
    }
}

/* Print styles */
@media print {
    .site-footer,
    .pagination-container,
    .dashboard-actions,
    .table-controls,
    .action-buttons {
        display: none;
    }
}

