/*
 * exam.css
 * 來源：C:\Users\user\Downloads\新增資料夾 (3)\styles.css
 * 說明：為避免影響既有 Bootstrap（例如 .card/.table 等）與其他頁面，
 *       此份樣式以 .exam-proto 進行作用域隔離。
 */

.exam-proto {
    /* Light + playful palette */
    --bg1: #f7f9ff;
    --bg2: #ffffff;
    --panel: #ffffff;
    --panel2: #fbfcff;
    --text: #1b2540;
    --muted: #5b6b8c;
    --line: #e7ecf7;
    --accent: #4f7cff; /* primary */
    --accent2: #22c55e; /* success */
    --accent3: #ff7a59; /* warm */
    --accent4: #a855f7; /* playful */

    --shadow: 0 10px 30px rgba(17, 24, 39, .08);
    --shadow2: 0 6px 16px rgba(17, 24, 39, .10);
    --radius: 18px;
}

    .exam-proto * {
        box-sizing: border-box
    }

html, body {
    height: 100%
}

.exam-proto {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "Noto Sans TC", sans-serif;
    /* bright background with subtle blobs */
    background: radial-gradient(900px 500px at 15% 10%, rgba(79,124,255,.18) 0%, rgba(79,124,255,0) 55%), radial-gradient(900px 500px at 85% 0%, rgba(168,85,247,.14) 0%, rgba(168,85,247,0) 52%), radial-gradient(900px 500px at 70% 80%, rgba(34,197,94,.12) 0%, rgba(34,197,94,0) 55%), linear-gradient(180deg, var(--bg1), var(--bg2));
    color: var(--text);
    min-height: 100vh;
}

    /* ===== Topbar ===== */
    .exam-proto .topbar {
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        background: rgba(255,255,255,.75);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
        z-index: 10;
    }

    .exam-proto .brand {
        display: flex;
        gap: 12px;
        align-items: center
    }

    .exam-proto .logo {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        display: grid;
        place-items: center;
        background: linear-gradient(135deg, var(--accent), #7cc7ff);
        color: white;
        font-weight: 900;
        box-shadow: var(--shadow2);
    }

    .exam-proto .title {
        font-weight: 900;
        letter-spacing: .2px
    }

    .exam-proto .subtitle {
        color: var(--muted);
        font-size: 12px;
        margin-top: 2px
    }

    /* ===== Nav ===== */
    .exam-proto .nav {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap
    }

        .exam-proto .nav a {
            color: var(--muted);
            text-decoration: none;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid transparent;
            background: transparent;
            transition: transform .08s ease, background .15s ease, border-color .15s ease;
        }

            .exam-proto .nav a:hover {
                background: rgba(79,124,255,.10);
                border-color: rgba(79,124,255,.18);
            }

            .exam-proto .nav a.active {
                color: var(--text);
                border-color: rgba(79,124,255,.25);
                background: rgba(79,124,255,.12);
            }

    /* ===== Layout ===== */
    .exam-proto .container {
        display: grid;
        grid-template-columns: 320px 1fr;
        gap: 16px;
        padding: 18px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .exam-proto .sidebar {
        display: flex;
        flex-direction: column;
        gap: 14px
    }

    .exam-proto .content {
        min-height: calc(100vh - 140px);
    }

    /* ===== Cards ===== */
    .exam-proto .proto-card {
        background: rgba(255,255,255,.9);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .exam-proto .proto-card-h {
        padding: 12px 14px;
        font-weight: 900;
        border-bottom: 1px solid var(--line);
        background: linear-gradient(180deg, rgba(79,124,255,.10), rgba(79,124,255,0));
    }

    .exam-proto .proto-card-b {
        padding: 12px 14px
    }

        .exam-proto .proto-card-b.small {
            font-size: 13px;
            color: var(--muted)
        }

    .exam-proto .kv {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        gap: 12px
    }

        .exam-proto .kv span {
            color: var(--muted)
        }

        .exam-proto .kv strong {
            font-weight: 900
        }

    /* ===== Buttons ===== */
    .exam-proto .btn-proto {
        width: 100%;
        border: 1px solid rgba(79,124,255,.22);
        background: linear-gradient(135deg, rgba(79,124,255,.30), rgba(168,85,247,.18), rgba(255,122,89,.16));
        color: var(--text);
        padding: 11px 12px;
        border-radius: 14px;
        cursor: pointer;
        font-weight: 900;
        box-shadow: 0 8px 18px rgba(79,124,255,.10);
        transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
    }

        .exam-proto .btn-proto:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(79,124,255,.14);
        }

        .exam-proto .btn-proto:active {
            transform: translateY(0px);
        }

        .exam-proto .btn-proto.ghost {
            width: auto;
            padding: 8px 12px;
            border-radius: 999px;
            background: rgba(27,37,64,.04);
            border: 1px solid var(--line);
            box-shadow: none;
        }

        .exam-proto .btn-proto:disabled {
            cursor: not-allowed;
            opacity: .55;
            transform: none;
            box-shadow: none;
        }

    /* ===== Inputs ===== */
    .exam-proto .input, .exam-proto select, .exam-proto textarea {
        width: 100%;
        border: 1px solid var(--line);
        background: rgba(255,255,255,.95);
        color: var(--text);
        padding: 10px 12px;
        border-radius: 14px;
        outline: none;
        transition: box-shadow .15s ease, border-color .15s ease;
    }

        .exam-proto .input:focus, .exam-proto select:focus, .exam-proto textarea:focus {
            border-color: rgba(79,124,255,.45);
            box-shadow: 0 0 0 6px rgba(79,124,255,.12);
        }

    .exam-proto textarea {
        min-height: 110px;
        resize: vertical
    }

    .exam-proto .hint {
        margin-top: 8px;
        color: var(--muted);
        line-height: 1.55
    }

    .exam-proto code {
        background: rgba(79,124,255,.10);
        padding: 2px 7px;
        border-radius: 10px;
        border: 1px solid rgba(79,124,255,.16);
    }

    /* ===== Main view ===== */
    .exam-proto .view {
        background: rgba(255,255,255,.9);
        border: 1px solid var(--line);
        border-radius: calc(var(--radius) + 2px);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .exam-proto .view-h {
        padding: 14px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--line);
        background: radial-gradient(420px 140px at 15% 0%, rgba(255,122,89,.14) 0%, rgba(255,122,89,0) 70%), radial-gradient(420px 140px at 85% 0%, rgba(168,85,247,.12) 0%, rgba(168,85,247,0) 70%), linear-gradient(180deg, rgba(79,124,255,.08), rgba(79,124,255,0));
    }

        .exam-proto .view-h h2 {
            margin: 0;
            font-size: 16px;
            font-weight: 950
        }

    .exam-proto .badge {
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 999px;
        border: 1px solid var(--line);
        color: var(--muted);
        background: rgba(27,37,64,.04);
    }

    .exam-proto .view-b {
        padding: 16px
    }

    /* ===== Grids ===== */
    .exam-proto .grid2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px
    }

    .exam-proto .grid3 {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px
    }

    .exam-proto .pillrow {
        display: flex;
        gap: 8px;
        flex-wrap: wrap
    }

    /* ===== Pills ===== */
    .exam-proto .pill {
        padding: 6px 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        font-size: 12px;
        background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.70));
    }

    /* ===== Stat ===== */
    .exam-proto .right {
        margin-left: auto
    }

    .exam-proto .stat {
        padding: 12px 12px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: radial-gradient(260px 120px at 30% 0%, rgba(79,124,255,.12) 0%, rgba(79,124,255,0) 70%), rgba(255,255,255,.9);
        box-shadow: var(--shadow);
    }

        .exam-proto .stat .n {
            font-size: 22px;
            font-weight: 950
        }

        .exam-proto .stat .l {
            color: var(--muted);
            font-size: 12px;
            margin-top: 2px
        }

    /* ===== Message ===== */
    .exam-proto .msg {
        border: 1px solid rgba(79,124,255,.18);
        background: radial-gradient(340px 180px at 0% 0%, rgba(34,197,94,.10) 0%, rgba(34,197,94,0) 70%), rgba(79,124,255,.06);
        padding: 10px 12px;
        border-radius: 16px;
        color: var(--muted);
        line-height: 1.6;
    }

        .exam-proto .msg strong {
            color: var(--text);
            font-weight: 950
        }

    /* ===== Footer ===== */
    .exam-proto .footer {
        max-width: 1200px;
        margin: 0 auto;
        padding: 10px 18px 16px;
        color: var(--muted);
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .exam-proto .sep {
        opacity: .5
    }

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .exam-proto .container {
        grid-template-columns: 1fr
    }

    .exam-proto .nav {
        display: none
    }
}

/* =====================================================
 * MVC / Bootstrap integration tweaks (scoped)
 * 目的：讓既有 bootstrap markup 看起來更接近 prototype 的清爽感。
 * ===================================================== */

/* Background + typography already on .exam-proto body */

/* Navbar → prototype topbar style */
.exam-proto .navbar {
    background: rgba(255,255,255,.75) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line) !important;
}

    .exam-proto .navbar .navbar-brand {
        font-weight: 900;
    }

    .exam-proto .navbar .nav-link {
        color: var(--muted) !important;
        text-decoration: none;
        padding: 8px 12px;
        border-radius: 999px;
        border: 1px solid transparent;
        transition: transform .08s ease, background .15s ease, border-color .15s ease;
    }

        .exam-proto .navbar .nav-link:hover {
            background: rgba(79,124,255,.10);
            border-color: rgba(79,124,255,.18);
        }

        .exam-proto .navbar .nav-link.active {
            color: var(--text) !important;
            border-color: rgba(79,124,255,.25);
            background: rgba(79,124,255,.12);
            font-weight: 900;
        }

/* Main content container: avoid too-wide on big screens */
.exam-proto .container-fluid.px-5 {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards: gently modernize bootstrap cards (safe changes) */
.exam-proto .card {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
    background: rgba(255,255,255,.92);
}

.exam-proto .card-header {
    border-bottom: 1px solid var(--line) !important;
    background: radial-gradient(420px 140px at 15% 0%, rgba(255,122,89,.12) 0%, rgba(255,122,89,0) 70%), radial-gradient(420px 140px at 85% 0%, rgba(168,85,247,.10) 0%, rgba(168,85,247,0) 70%), linear-gradient(180deg, rgba(79,124,255,.07), rgba(79,124,255,0));
}

/* Tables */
.exam-proto .table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.9);
}

    .exam-proto .table thead th {
        color: var(--muted);
        background: rgba(79,124,255,.08);
        font-weight: 900;
        border-bottom: 1px solid var(--line);
    }

    .exam-proto .table td, .exam-proto .table th {
        border-color: var(--line) !important;
    }

/* Form controls */
.exam-proto .form-control,
.exam-proto .form-select {
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.95) !important;
}

    .exam-proto .form-control:focus,
    .exam-proto .form-select:focus {
        border-color: rgba(79,124,255,.45) !important;
        box-shadow: 0 0 0 6px rgba(79,124,255,.12) !important;
    }

/* Primary-ish buttons used in pages */
.exam-proto .btn.btn-login,
.exam-proto .btn.btn-demo-action,
.exam-proto .btn.btn-dark {
    border-radius: 14px;
}
