@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');

:root {
    --green-900: #061f4f;
    --green-700: #075aa8;
    --green-600: #09a8dc;
    --gold-500: #f2c230;
    --gold-100: #fff3ba;
    --ink: #0d2344;
    --muted: #61708b;
    --line: #d8e2f0;
    --surface: #ffffff;
    --surface-soft: #f4f8fd;
    --danger: #d71920;
    --campus-green: #258c54;
    --shadow: 0 24px 72px rgba(3, 28, 76, 0.24);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: 'Noto Sans Thai', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        linear-gradient(116deg, transparent 0 42%, rgba(9, 168, 220, 0.2) 42% 48%, transparent 48% 100%),
        linear-gradient(128deg, transparent 0 56%, rgba(242, 194, 48, 0.18) 56% 58%, transparent 58% 100%),
        linear-gradient(135deg, #031645 0%, #06337b 48%, #0a74b7 76%, #d8f1ff 100%);
}

a {
    color: inherit;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    place-items: center;
}

.page-shell--result {
    place-items: start center;
}

.search-panel,
.result-panel {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}

.search-panel {
    max-width: 760px;
    padding: clamp(28px, 5vw, 56px);
}

.result-panel {
    padding: clamp(22px, 4vw, 40px);
}

.brand-mark,
.topbar,
.result-status,
.notice-actions {
    display: flex;
    align-items: center;
}

.brand-mark {
    gap: 12px;
    margin-bottom: 36px;
}

.brand-mark__crest {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 58%, var(--gold-500) 100%);
    box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.3);
}

.brand-mark__text,
.topbar {
    color: var(--green-900);
    font-weight: 600;
}

.intro,
.result-heading {
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold-500);
    font-size: 0.95rem;
    font-weight: 700;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    color: var(--green-900);
    font-size: clamp(1.75rem, 3.8vw, 2.65rem);
    line-height: 1.24;
    letter-spacing: 0;
}

.lead {
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.search-form {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--green-900);
    font-weight: 700;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #bfd2ea;
    border-radius: 8px;
    padding: 0 16px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

input:focus {
    border-color: var(--green-600);
    outline: 3px solid rgba(9, 168, 220, 0.2);
}

button,
.button-primary,
.button-outline {
    min-height: 46px;
    border-radius: 8px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

button,
.button-primary {
    color: #061f4f;
    background: linear-gradient(180deg, #ffe36b 0%, var(--gold-500) 100%);
    box-shadow: 0 8px 18px rgba(242, 194, 48, 0.25);
}

button:hover,
.button-primary:hover {
    color: #fff;
    background: linear-gradient(180deg, #0c73c9 0%, var(--green-900) 100%);
}

.button-outline {
    color: var(--green-700);
    border: 1px solid var(--green-700);
    background: #fff;
}

.button-outline:hover {
    background: var(--surface-soft);
}

.form-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.topbar {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.back-link {
    color: var(--green-700);
    font-weight: 700;
    text-decoration: none;
}

.result-card {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.result-status {
    gap: 10px;
    padding: 14px 20px;
    color: var(--green-900);
    font-weight: 700;
    background: linear-gradient(90deg, var(--gold-100), #ffffff);
    border-bottom: 3px solid var(--gold-500);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--campus-green);
}

.student-name {
    padding: 22px 20px 8px;
    color: var(--green-900);
    font-size: clamp(1.3rem, 3vw, 1.72rem);
    font-weight: 700;
    line-height: 1.35;
}

.info-grid {
    margin: 0;
    padding: 12px 20px 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.info-grid div {
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.45;
}

.notice-box {
    margin-top: 22px;
    padding: 20px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    border: 1px solid rgba(242, 194, 48, 0.68);
    background: linear-gradient(135deg, #fff8d6 0%, #ffffff 100%);
}

.notice-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    background: var(--danger);
}

.notice-content h3 {
    margin-bottom: 8px;
    color: var(--green-900);
    font-size: 1.18rem;
}

.notice-content p {
    margin-bottom: 10px;
    color: #36443f;
    line-height: 1.65;
}

.notice-warning {
    color: var(--danger) !important;
    font-weight: 700;
}

.notice-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.empty-state {
    margin-top: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.empty-state h2 {
    margin-bottom: 8px;
    color: var(--green-900);
}

.empty-state p {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer {
    width: 100%;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
        padding: 20px 0;
    }

    .search-panel,
    .result-panel,
    .search-form {
        padding: 20px;
    }

    .brand-mark {
        align-items: flex-start;
        margin-bottom: 26px;
    }

    h1 {
        font-size: clamp(1.55rem, 8vw, 2.05rem);
    }

    .lead {
        font-size: 0.98rem;
    }

    .search-row,
    .info-grid {
        grid-template-columns: 1fr;
    }

    button,
    .button-primary,
    .button-outline {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .notice-box {
        grid-template-columns: 1fr;
    }
}
