:root {
    /* Color Palette - 科技感靛藍科技風格 */
    --primary: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981; /* Emerald */
    --danger: #DC2626;
    --danger-hover: #B91C1C;
    --bg-dark: #0F172A;
    --bg-light: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Layout Defaults */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* ============================
   Login Page Specific Styles
   ============================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
    overflow: hidden;
}

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

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: drift 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(79, 70, 229, 0.4);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.3);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Panel */
.glass-panel {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

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

.logo-area {
    margin-bottom: 32px;
}

.placeholder-logo {
    font-size: 64px;
    margin-bottom: 16px;
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
}

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

.logo-area h2 {
    font-weight: 700;
    font-size: 24px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-area p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* FAQ / Troubleshooting Section */
.login-faq {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: left;
}

.login-faq h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item {
    background: rgba(248, 250, 252, 0.5);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid #f1f5f9;
}

.faq-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.faq-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.faq-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.faq-link:hover {
    text-decoration: underline;
}

/* Typography */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Forms */
.form-control {
    width: 100%;
    border-radius: var(--radius-md) !important;
    border: 1px solid #d1d5db !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease-in-out !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    font-family: inherit;
    font-size: 15px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0px);
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 20px !important;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3) !important;
    color: #ffffff !important;
}

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

.btn-danger:hover {
    background-color: var(--danger-hover);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
    color: #ffffff;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-google {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.google-icon {
    margin-right: 12px;
}

.divider {
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    position: relative;
    background: var(--glass-bg);
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.mock-logins {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-admin {
    border-color: #f59e0b; /* Amber */
    color: #d97706;
}
.btn-admin:hover {
    background: #f59e0b;
    color: white;
}

.btn-teacher {
    border-color: #0ea5e9; /* Sky */
    color: #0284c7;
}
.btn-teacher:hover {
    background: #0ea5e9;
    color: white;
}

/* Glassmorphism & Cards */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.card-body {
    padding: 24px;
}

/* Data Table Reset */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Utilities */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive .data-table {
    min-width: 600px;
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .card-header, .card-body {
        padding: 16px;
    }
}

/* Search Utility */
.search-container {
    position: relative;
    margin-bottom: 24px;
    max-width: 400px;
}
.search-container > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 4px 12px rgba(0,0,0,0.05);
}
.badge-not-required { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.btn-toggle { background: #fff; border: 1px solid #e2e8f0; color: #64748b; }
.btn-toggle.active { background: #eef2ff; border-color: #4f46e5; color: #4f46e5; }

/* ============================
   Page Navigation Tabs
   ============================ */
.page-nav-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 4px;
}

.nav-tab-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 16px;
    padding: 12px 4px;
    position: relative;
    transition: all 0.3s ease;
}

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

.nav-tab-item.active {
    color: var(--primary);
}

.nav-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* 強制移除搜尋框與按鈕的倒三角形圖示及偽元素箭頭 */
.search-input, 
.btn-toggle,
.search-input::before,
.search-input::after,
.btn-toggle::before,
.btn-toggle::after {
    background-image: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    content: none !important;
    display: inline-block; /* 保持顯示但清除內容 */
}

/* 如果按鈕內部的 i 標籤誤植了箭頭，也一併處理 */
.search-container i.fa-caret-down,
.btn-toggle i.fa-caret-down {
    display: none !important;
}
