﻿/* ========================================================
   文教風格主題變數 (Academic Theme Variables)
 ======================================================== */
:root {
    --bg-body: #f4f7f9; /* 帶有一點點藍灰的清爽底色 */
    --bg-white: #ffffff;
    --bg-slate-50: #f8fafc;
    --primary: #1e3a8a; /* 藏青色 - 代表權威、教育 */
    --primary-light: #2563eb;
    --primary-bg: #eff6ff;
    --text-main: #334155;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --highlight-blue-text: #1d4ed8;
    --highlight-blue-bg: #dbeafe;
    --highlight-red-text: #b91c1c;
    --highlight-red-bg: #fee2e2;
}

/* ========================================================
   基礎重置與全域設定
======================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

ul, ol {
    padding-left: 1.5rem;
}

/* ========================================================
   版面佈局 (Layout)
======================================================== */
/* 頂部標頭 */
.page-header {
    background-color: var(--primary);
    color: white;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

    .page-header::after {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        border-radius: 50%;
    }

.header-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* 首頁說明文主容器：雙欄 Grid */
.container {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* 表單專用主容器：單欄置中 */
.form-container {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
}

/* ========================================================
   卡片設計 (Cards)
======================================================== */
.card {
    background-color: var(--bg-white);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-slate-50);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .card-header svg {
        width: 1.5rem;
        height: 1.5rem;
        color: var(--primary-light);
    }

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-slate-50);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ========================================================
   按鈕共用樣式 (Buttons)
======================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

    .btn-primary:hover {
        background-color: var(--primary);
        transform: translateY(-1px);
    }

.btn-outline {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

    .btn-outline:hover {
        border-color: var(--primary-light);
        color: var(--primary-light);
        background-color: var(--primary-bg);
    }

.btn-action { /* 首頁右側選單按鈕 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

    .btn-action svg {
        width: 1.25rem;
        height: 1.25rem;
    }

.btn-back {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .btn-back:hover {
        color: var(--primary-light);
    }

    .btn-back svg {
        width: 1.25rem;
        height: 1.25rem;
    }

/* ========================================================
   表單專用元件 (Form Elements for Register.aspx)
======================================================== */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    height: 2.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-white);
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

.input-inline-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

    .input-inline-group .form-control {
        width: auto;
        min-width: 120px;
    }

.hint-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.errMsg {
    color: var(--highlight-red-text);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

.msgLbl {
    display: block;
    background-color: #fef2f2; /* 淡紅底色 */
    color: #b91c1c; /* 深紅文字 */
    border: 1px solid #fca5a5; /* 紅色邊框 */
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.6;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.15);
}

    /* 當沒有訊息時自動隱藏，避免出現空框 */
    .msgLbl:empty {
        display: none;
    }

/* ========================================================
   個資同意區塊 (Privacy Policy Box)
======================================================== */
.privacy-box {
    background-color: var(--primary-bg);
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.privacy-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.asp-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #bfdbfe;
}

    .asp-checkbox input[type="checkbox"] {
        margin-top: 0.25rem;
        width: 1.15rem;
        height: 1.15rem;
        accent-color: var(--primary-light);
        cursor: pointer;
    }

    .asp-checkbox label {
        font-size: 0.95rem;
        color: var(--text-dark);
        font-weight: 500;
        cursor: pointer;
    }

/* ========================================================
   內文排版與表格元件 (Text & Tables)
======================================================== */
h3.section-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    h3.section-subtitle::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 16px;
        background-color: var(--primary-light);
        border-radius: 2px;
    }

p {
    margin-bottom: 1rem;
}

.indent-text {
    text-indent: 2em;
}

.hl-red {
    color: var(--highlight-red-text);
    background-color: var(--highlight-red-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.hl-blue {
    color: var(--highlight-blue-text);
    background-color: var(--highlight-blue-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

    .table-modern th {
        background-color: var(--primary-bg);
        color: var(--primary);
        font-weight: 700;
        padding: 0.8rem 1rem;
        border-bottom: 2px solid var(--border-color);
        white-space: nowrap;
    }

    .table-modern td {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-main);
    }

    .table-modern tbody tr:last-child td {
        border-bottom: none;
    }

    .table-modern tbody tr:hover td {
        background-color: var(--bg-slate-50);
    }

.text-center {
    text-align: center !important;
}

.info-list {
    list-style: none;
    padding-left: 0;
}

    .info-list li {
        display: flex;
        margin-bottom: 0.75rem;
        align-items: baseline;
    }

.info-list-label {
    min-width: 120px;
    font-weight: 700;
    color: var(--text-dark);
}

.sidebar {
    position: sticky;
    top: 2rem;
}

.action-card {
    background: var(--bg-white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-light);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* 響應式 */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: -1;
        margin-bottom: 1rem;
    }

    .info-list li {
        flex-direction: column;
    }

    .info-list-label {
        margin-bottom: 0.25rem;
        color: var(--primary);
    }
}

/* 專為此頁「顯示查詢結果」設計的標籤文字樣式 */
.result-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-light); /* 使用亮藏青色凸顯結果 */
    background-color: var(--bg-slate-50);
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    display: inline-block;
    min-height: 2.25rem;
    min-width: 50%;
}



