/* ============================================================
 * 한세대학교 주차 정기권 관리시스템 - 디자인 시스템
 * ============================================================ */

:root {
    --hansei-primary: #00377a;       /* 한세대 메인 네이비 */
    --hansei-primary-light: #1e4d9e;
    --hansei-accent: #c8a25a;        /* 골드 포인트 */
    --hansei-bg: #f4f6fb;

    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;

    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: var(--text-main);
    background: var(--hansei-bg);
    font-size: 14px;
    line-height: 1.6;
}
a { color: var(--hansei-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== Header ========== */
.site-header {
    background: linear-gradient(135deg, var(--hansei-primary), var(--hansei-primary-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand:hover { text-decoration: none; }
.logo-img {
    height: 48px;
    width: auto;
    background: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    display: block;
}
.brand-title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-sub { font-size: 11px; opacity: .85; letter-spacing: .5px; margin-top: 2px; }

@media (max-width: 768px) {
    .logo-img { height: 38px; padding: 4px 8px; }
    .brand-title { font-size: 14px; }
    .brand-sub { font-size: 10px; }
}

.main-nav ul {
    list-style: none; display: flex; gap: 4px; padding: 0; margin: 0;
}
.main-nav a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}
.main-nav a:hover {
    background: rgba(255,255,255,.15);
    text-decoration: none;
}

/* ========== Layout ========== */
.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}
.page-header {
    margin-bottom: 24px;
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.page-header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--hansei-primary);
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, var(--hansei-primary), #002b5e);
    color: #fff;
    border-radius: 12px;
    padding: 36px 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(0,55,122,.18);
}
.hero h2 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
}
.hero p {
    margin: 0 0 16px;
    opacity: .95;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    opacity: .92;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.18);
}

/* ========== Menu Grid ========== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.menu-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    color: var(--text-main);
    transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.menu-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,55,122,.12);
    border-color: var(--hansei-primary);
}
.menu-icon { font-size: 36px; margin-bottom: 8px; }
.menu-card h3 {
    margin: 4px 0 6px;
    color: var(--hansei-primary);
    font-size: 18px;
}
.menu-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== Card ========== */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.card-title {
    margin: 0 0 16px;
    color: var(--hansei-primary);
    font-size: 17px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--hansei-primary);
}
.card h4 { margin: 14px 0 8px; color: var(--hansei-primary); font-size: 15px; }

/* ========== Notice ========== */
.notice {
    background: #eff6ff;
    border-left: 4px solid var(--info);
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 12px;
}
.notice h4 { color: var(--info); margin-top: 0 !important; }
.notice ul, .notice ol { padding-left: 20px; margin: 6px 0; }
.notice li { margin: 4px 0; }
.notice.warning {
    background: #fffbeb;
    border-color: var(--warning);
}
.notice.warning h4 { color: #92400e; }
.notice.danger {
    background: #fef2f2;
    border-color: var(--danger);
}
.notice.danger h4 { color: #991b1b; }

/* ========== Steps (단계 표시) ========== */
.steps {
    display: flex;
    gap: 6px;
    margin: 18px 0 22px;
    flex-wrap: wrap;
}
.step {
    flex: 1;
    min-width: 120px;
    padding: 12px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
}
.step.active {
    background: var(--hansei-primary);
    color: #fff;
    border-color: var(--hansei-primary);
}
.step.done {
    background: #dcfce7;
    color: #065f46;
    border-color: #86efac;
}
.step-no {
    width: 24px; height: 24px;
    background: rgba(255,255,255,.25);
    color: inherit;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 12px;
}
.step:not(.active):not(.done) .step-no {
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ========== Form ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}
.form-label .req { color: var(--danger); margin-left: 4px; }
.form-input, .form-select, .form-textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text-main);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--hansei-primary);
    box-shadow: 0 0 0 3px rgba(0,55,122,.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Radio / Checkbox */
.radio-group, .checkbox-group {
    display: flex; flex-wrap: wrap; gap: 14px;
}
.radio-item, .checkbox-item {
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer;
    font-size: 14px;
}
.radio-item input, .checkbox-item input {
    accent-color: var(--hansei-primary);
    width: 16px; height: 16px;
}

/* File upload */
.file-upload {
    display: block;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all .15s;
}
.file-upload:hover {
    border-color: var(--hansei-primary);
    background: #eff6ff;
}
.file-upload input[type=file] {
    display: none;
}
.file-upload-icon { font-size: 22px; }
.file-upload-text { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.file-upload-text strong { color: var(--hansei-primary); }

/* ========== Fee Box ========== */
.fee-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    padding: 18px 24px;
    margin-top: 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.fee-label { font-size: 14px; font-weight: 600; color: var(--hansei-primary); }
.fee-method { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.fee-amount { font-size: 28px; font-weight: 800; color: var(--hansei-primary); }

/* ========== Tables ========== */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.data-table thead th {
    background: #f8fafc;
    color: var(--hansei-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--hansei-primary);
    white-space: nowrap;
}
.data-table tbody tr:hover { background: #f8fafc; }

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--border);
}
.info-table th, .info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.info-table th {
    background: #f8fafc;
    width: 160px;
    color: var(--hansei-primary);
    font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: all .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--hansei-primary); color: #fff; }
.btn-primary:hover { background: var(--hansei-primary-light); color: #fff; }
.btn-secondary { background: #fff; color: var(--hansei-primary); border-color: var(--hansei-primary); }
.btn-secondary:hover { background: #eef4ff; color: var(--hansei-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #f3f4f6; color: var(--text-main); }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-review     { background: #fde68a; color: #78350f; }
.badge-approved   { background: #d1fae5; color: #065f46; }
.badge-registered { background: #dbeafe; color: #1e40af; }
.badge-rejected   { background: #fee2e2; color: #991b1b; }
.badge-canceled   { background: #e5e7eb; color: #374151; }

/* ========== KPI Cards (admin) ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.kpi-label { font-size: 12px; color: var(--text-muted); }
.kpi-value { font-size: 30px; font-weight: 800; color: var(--hansei-primary); margin: 4px 0; }
.kpi-sub { font-size: 11px; color: var(--text-muted); }

/* ========== Toolbar ========== */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.toolbar-group { display: flex; align-items: center; gap: 6px; }
.toolbar-group label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.toolbar input, .toolbar select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}

/* ========== Modal ========== */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: #fff;
    border-radius: 10px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; color: var(--hansei-primary); font-size: 17px; }
.close-btn {
    background: none; border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
}
.modal-body { padding: 20px; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ========== Footer ========== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== Utility ========== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

ol, ul { padding-left: 20px; }
ol li, ul li { margin: 4px 0; }

/* ===== 모바일 (≤768px) ===== */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 14px;
        gap: 8px;
    }
    .brand { justify-content: center; gap: 10px; }
    .main-nav { width: 100%; }
    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    .main-nav a {
        display: block;
        text-align: center;
        padding: 8px 4px;
        font-size: 12px;
        white-space: nowrap;
        border-radius: 4px;
    }
    .page { padding: 16px 12px 40px; }
    .hero { padding: 22px 16px; }
    .hero h2 { font-size: 19px; line-height: 1.3; }
    .hero p { font-size: 13px; }
    .hero-meta { font-size: 12px; gap: 10px; }
    .card { padding: 14px; }
    .card-title { font-size: 15px; }
    .form-grid { grid-template-columns: 1fr; }   /* 모바일은 1열 */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    .info-table th { width: 100px; font-size: 12px; }
    .info-table td { font-size: 12px; }
    .steps { flex-direction: column; gap: 4px; }
    .step { min-width: 100%; }
    .menu-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .menu-card { padding: 16px 10px; }
    .menu-card h3 { font-size: 15px; }
    .menu-card p { font-size: 11px; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 600px; font-size: 12px; }
    .toolbar { gap: 8px; }
    .toolbar input, .toolbar select { width: 100%; }
    .toolbar-group { flex: 1; min-width: 140px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .kpi-value { font-size: 22px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 8px; }
    .modal { max-width: 95vw; margin: 12px; }
    .modal-body { padding: 14px; }
    .fee-box { flex-direction: column; gap: 8px; padding: 14px; text-align: center; }
    .fee-amount { font-size: 22px; }
}

/* ===== 초소형 모바일 (≤420px) ===== */
@media (max-width: 420px) {
    .main-nav ul { grid-template-columns: repeat(5, 1fr); }
    .main-nav a { font-size: 11px; padding: 6px 2px; }
    .brand-title { font-size: 13px; }
    .brand-sub { font-size: 9px; }
    .logo-img { height: 32px; padding: 4px 6px; }
    .hero h2 { font-size: 17px; }
}

/* ============================================================
 * 브랜딩 보강 (엠블럼 / 슬로건) — 2026-07
 * ============================================================ */
.site-header { border-bottom: 3px solid var(--hansei-accent); }

/* 헤더 엠블럼 (원형) */
.logo-img {
    height: 52px; width: 52px; padding: 3px;
    border-radius: 50%; background: #fff; object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
@media (max-width: 768px) { .logo-img { height: 44px; width: 44px; } }

/* 헤더 하단 슬로건 스트립 (전 페이지 공통) */
.site-header::after {
    content: ""; display: block; height: 34px;
    background: #ffffff url("../img/soar-high-reach-higher.jpg") no-repeat right 24px center;
    background-size: auto 18px;
    border-bottom: 1px solid #e3e9f2;
}
@media (max-width: 640px) { .site-header::after { height: 26px; background-size: auto 13px; background-position: right 14px center; } }

/* 히어로 : 엠블럼 + 슬로건 강조 (index) */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 88% 15%, rgba(200,162,90,.30), transparent 45%),
        linear-gradient(135deg, var(--hansei-primary), #002b5e);
    display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: center;
}
.hero-emblem {
    width: 96px; height: 96px; border-radius: 50%;
    background: #fff; padding: 6px; object-fit: contain;
    box-shadow: 0 6px 20px rgba(0,0,0,.30);
}
.hero-slogan {
    display: inline-block; height: 20px; width: auto; margin-top: 14px;
    background: #fff; padding: 6px 12px; border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
@media (max-width: 640px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-emblem { width: 74px; height: 74px; margin: 0 auto; }
}

/* 메뉴 카드 상단 골드 라인 (포인트) */
.menu-card { border-top: 3px solid transparent; transition: border-color .15s, transform .15s, box-shadow .15s; }
.menu-card:hover { border-top-color: var(--hansei-accent); }
