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

:root {
    --primary-100: #0077C2;
    --primary-200: #59a5f5;
    --primary-300: #c8ffff;
    --accent-100: #00BFFF;
    --accent-200: #00619a;
    --text-100: #333333;
    --text-200: #5c5c5c;
    --bg-100: #FFFFFF;
    --bg-200: #f5f5f5;
    --bg-300: #cccccc;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px rgba(0, 119, 194, 0.1);
    --shadow-hover: 0 16px 48px rgba(0, 119, 194, 0.18);
    --gradient-bg: linear-gradient(135deg, #e0f0ff 0%, #f8fcff 50%, #e8f4ff 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Roboto', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-100);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 90px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background blobs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}

body::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-200), transparent 70%);
    top: -100px;
    right: -100px;
    animation: blobFloat 20s ease-in-out infinite alternate;
}

body::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-100), transparent 70%);
    bottom: -50px;
    left: -80px;
    animation: blobFloat 25s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.1); }
    100% { transform: translate(20px, -20px) scale(0.95); }
}

/* Fade in animation for pages */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-card {
    animation: fadeInUp 0.5s ease both;
}

.glass-card:nth-child(2) { animation-delay: 0.08s; }
.glass-card:nth-child(3) { animation-delay: 0.16s; }
.glass-card:nth-child(4) { animation-delay: 0.24s; }
.glass-card:nth-child(5) { animation-delay: 0.32s; }

/* Page title */
.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-100);
    text-align: center;
    padding: 24px 16px 12px;
    margin-bottom: 4px;
    position: relative;
    letter-spacing: -0.5px;
}

.page-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-100), var(--accent-100));
    border-radius: 2px;
    margin: 8px auto 0;
}

/* Glass card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.6);
    padding: 22px;
    margin: 14px 16px;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.glass-card:hover {
    transform: translateY(-3px) scale(1.005);
    box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255,255,255,0.6);
}

.glass-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-100);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-card-title .icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

/* Info rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 119, 194, 0.06);
    transition: background 0.2s ease;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row:hover {
    background: rgba(0, 119, 194, 0.02);
    margin: 0 -8px;
    padding: 12px 8px;
    border-radius: 8px;
}

.info-label {
    font-size: 14px;
    color: var(--text-200);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    font-size: 15px;
    color: var(--text-100);
    font-weight: 600;
}

/* Form elements */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-200);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input,
.form-select {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 16px;
    background: var(--bg-200);
    padding: 15px 18px;
    font-size: 15px;
    color: var(--text-100);
    font-family: inherit;
    transition: all 0.35s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.form-input::placeholder {
    color: #aaa;
}

.form-input:focus,
.form-select:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 119, 194, 0.12), inset 0 1px 3px rgba(0,0,0,0.02);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5c5c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    background: var(--bg-200);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
}

.radio-label:hover {
    background: rgba(0, 119, 194, 0.06);
    border-color: rgba(0, 119, 194, 0.15);
}

input[type="radio"] {
    accent-color: var(--primary-100);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    border: none;
    outline: none;
    border-radius: 16px;
    padding: 15px 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 119, 194, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 119, 194, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg-200), #e8e8e8);
    color: var(--text-100);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e8e8e8, var(--bg-300));
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.35);
}

.btn-small {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 12px;
    width: auto;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 -6px 30px rgba(0, 119, 194, 0.08);
    padding: 10px 0 14px;
    z-index: 100;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-200);
    padding: 6px 16px;
    border-radius: 16px;
    transition: all 0.35s ease;
    font-size: 11px;
    font-weight: 600;
    position: relative;
}

.nav-btn svg {
    width: 26px;
    height: 26px;
    stroke: var(--text-200);
    transition: all 0.35s ease;
    stroke-width: 1.8;
}

.nav-btn.active,
.nav-btn:hover {
    color: var(--primary-100);
    background: rgba(0, 119, 194, 0.08);
}

.nav-btn.active svg,
.nav-btn:hover svg {
    stroke: var(--primary-100);
    transform: scale(1.1);
}

.nav-btn.active {
    background: rgba(0, 119, 194, 0.1);
    box-shadow: 0 2px 12px rgba(0, 119, 194, 0.12);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 200;
    padding: 16px;
}

.modal-overlay:target {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    padding: 32px 28px;
    width: 100%;
    max-width: 360px;
    transform: scale(0.88) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
}

.modal-overlay:target .modal-content {
    transform: scale(1) translateY(0);
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-100);
    margin-bottom: 14px;
}

.modal-text {
    font-size: 15px;
    color: var(--text-200);
    margin-bottom: 24px;
    line-height: 1.8;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-200);
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-200);
    font-size: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.modal-close:hover {
    background: var(--bg-300);
    color: var(--text-100);
    transform: rotate(90deg);
}

/* Alerts */
.alert {
    border-radius: 14px;
    padding: 14px 18px;
    margin: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    animation: fadeInUp 0.4s ease both;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid;
}

.alert::before {
    font-size: 18px;
    line-height: 1;
}

.alert-error {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    border-color: #e74c3c;
}

.alert-error::before { content: '\26A0'; }

.alert-success {
    background: rgba(39, 174, 96, 0.08);
    color: #27ae60;
    border-color: #2ecc71;
}

.alert-success::before { content: '\2713'; }

/* Captcha */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.captcha-code {
    background: linear-gradient(135deg, var(--primary-100), var(--accent-200));
    color: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    flex-shrink: 0;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 119, 194, 0.2);
    animation: fadeInUp 0.3s ease;
}

.captcha-input {
    flex: 1;
}

.captcha-refresh {
    background: none;
    border: none;
    color: var(--primary-100);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.captcha-refresh:hover {
    background: rgba(0, 119, 194, 0.08);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-100), var(--accent-100));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 119, 194, 0.12);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-100);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-200);
    margin-top: 6px;
    font-weight: 500;
}

/* Search */
.search-box {
    display: flex;
    gap: 12px;
    margin: 16px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    border-radius: 28px;
    background: var(--bg-200);
    padding: 16px 24px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.35s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 119, 194, 0.12);
}

.search-btn {
    width: auto;
    padding: 14px 24px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Lists */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 119, 194, 0.05);
    transition: all 0.2s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(0, 119, 194, 0.02);
    margin: 0 -6px;
    padding: 16px 6px;
    border-radius: 8px;
}

.list-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-100);
}

.list-meta {
    font-size: 13px;
    color: var(--text-200);
    margin-top: 2px;
}

/* Admin */
.admin-section {
    margin-bottom: 28px;
}

.admin-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-100);
    margin: 18px 16px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 119, 194, 0.06);
}

.data-table th {
    font-weight: 700;
    color: var(--primary-100);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover td {
    background: rgba(0, 119, 194, 0.02);
}

.data-table td {
    color: var(--text-100);
    transition: background 0.2s ease;
}

/* Links */
.link-btn {
    color: var(--primary-100);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(0, 119, 194, 0.08);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.link-btn:hover {
    background: rgba(0, 119, 194, 0.15);
    border-color: rgba(0, 119, 194, 0.2);
    transform: translateY(-1px);
}

/* Name tags */
.name-list {
    text-align: left;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}

.name-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0,119,194,0.1), rgba(0,191,255,0.08));
    color: var(--primary-100);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin: 3px;
    border: 1px solid rgba(0,119,194,0.1);
    transition: all 0.2s ease;
}

.name-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,119,194,0.15);
}

/* Conditional sections */
.conditional-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 119, 194, 0.08);
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.6s ease both;
}

.login-badge {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(0, 119, 194, 0.25);
    animation: pulseBadge 3s ease infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(0, 119, 194, 0.25); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0, 119, 194, 0.35); }
}

.login-badge svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}

.login-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-100);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-200);
    text-align: center;
    margin-bottom: 28px;
    font-weight: 500;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-200);
    opacity: 0.7;
}

/* Admin badge on login */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

/* Section decorative header */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.section-header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-100);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-200);
}

.empty-state-icon {
    font-size: 40px;
    opacity: 0.3;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
    font-weight: 500;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,119,194,0.1), transparent);
    margin: 16px 0;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-present {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status-absent {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-200);
}

/* Responsive */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-card {
        margin: 10px 12px;
        padding: 18px;
        border-radius: 18px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .login-logo {
        font-size: 24px;
    }
}

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