/* ============================================================
   수중드론 조작사 통합관리시스템 — 사용자 디자인 시스템
   ============================================================ */
:root {
    --navy-900: #0b1e3f;
    --navy-800: #102a56;
    --navy-700: #16366e;
    --blue-600: #1d5bd8;
    --blue-500: #2e6ff2;
    --blue-100: #e8f0fe;
    --teal-500: #0f9d9d;
    --teal-100: #e3f6f5;
    --ink-900: #1a2332;
    --ink-600: #4b586c;
    --ink-400: #8a94a6;
    --line: #e2e8f2;
    --bg: #f5f7fb;
    --card: #ffffff;
    --red: #d64545;
    --green: #1e9e63;
    --amber: #d97c0b;
    --radius: 14px;
    --shadow: 0 2px 14px rgba(16, 42, 86, .07);
    --shadow-lg: 0 10px 34px rgba(16, 42, 86, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
    background: var(--bg);
    color: var(--ink-900);
    line-height: 1.6;
    letter-spacing: -.01em;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: .95rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.site-top {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-top .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 12px; flex: none;
    background: linear-gradient(145deg, var(--navy-800), var(--blue-600));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px;
}
.brand-txt { min-width: 0; }
.brand-txt .t1 { font-size: 1.08rem; font-weight: 800; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt .t2 { font-size: .72rem; color: var(--ink-400); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-ghost, .btn-solid {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 9px; font-size: .88rem; font-weight: 600;
    border: 1px solid var(--line); background: #fff; color: var(--navy-800);
    transition: all .15s;
}
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn-solid { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-solid:hover { background: var(--blue-600); border-color: var(--blue-600); }
.top-user { font-size: .88rem; color: var(--ink-600); margin-right: 4px; }
.top-user b { color: var(--navy-800); }

/* ---------- GNB ---------- */
.gnb { background: var(--navy-800); position: sticky; top: 0; z-index: 90; }
.gnb .container { display: flex; align-items: center; }
.gnb-list { display: flex; list-style: none; flex: 1; }
.gnb-list a {
    display: block; padding: 15px 20px; color: #c7d4ec;
    font-size: .96rem; font-weight: 600; position: relative; transition: color .15s;
}
.gnb-list a:hover { color: #fff; }
.gnb-list a.active { color: #fff; }
.gnb-list a.active::after {
    content: ""; position: absolute; left: 20px; right: 20px; bottom: 0;
    height: 3px; border-radius: 3px 3px 0 0; background: #5ec8d8;
}
.gnb-toggle {
    display: none; background: none; border: 0; color: #fff;
    font-size: 1.4rem; padding: 12px 4px;
}

/* ---------- 히어로 ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(94, 200, 216, .25), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(46, 111, 242, .3), transparent 55%),
        linear-gradient(160deg, #0d2347 0%, #123a76 55%, #0e5a86 100%);
}
.hero .container { padding: 72px 20px 84px; max-width: 980px; text-align: center; }
.hero-kicker {
    display: inline-block; padding: 7px 16px; border-radius: 99px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
    font-size: .82rem; font-weight: 600; letter-spacing: .03em; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.hero p { margin-top: 16px; font-size: clamp(.95rem, 2vw, 1.08rem); color: #cfe0f7; }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn-hero {
    padding: 13px 28px; border-radius: 11px; font-weight: 700; font-size: .95rem;
    background: #fff; color: var(--navy-800); transition: transform .15s, box-shadow .15s;
}
.hero-cta .btn-hero.alt { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.hero-cta .btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.hero-wave { display: block; width: 100%; height: 60px; margin-top: -1px; }

/* ---------- 섹션/카드 ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.section-head h2 { font-size: 1.35rem; font-weight: 800; color: var(--navy-900); }
.section-head .more { font-size: .86rem; color: var(--ink-400); font-weight: 600; }
.section-head .more:hover { color: var(--blue-600); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -46px; position: relative; z-index: 5; }
.feature-card {
    background: var(--card); border-radius: var(--radius); padding: 26px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 8px; transition: transform .18s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-ico {
    width: 52px; height: 52px; border-radius: 14px; font-size: 24px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
}
.fi-blue { background: var(--blue-100); color: var(--blue-600); }
.fi-teal { background: var(--teal-100); color: var(--teal-500); }
.fi-navy { background: #e9edf7; color: var(--navy-800); }
.feature-card h3 { font-size: 1.12rem; font-weight: 800; color: var(--navy-900); }
.feature-card p { font-size: .9rem; color: var(--ink-600); flex: 1; }
.feature-card .go { font-size: .88rem; font-weight: 700; color: var(--blue-600); margin-top: 8px; }

.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 24px; }

.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* 공지 리스트 */
.notice-list { list-style: none; }
.notice-list li { border-bottom: 1px solid var(--line); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; }
.notice-list a:hover .nt { color: var(--blue-600); }
.notice-list .nt { flex: 1; font-size: .93rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: color .12s; }
.notice-list .nd { font-size: .8rem; color: var(--ink-400); flex: none; }

.tag {
    flex: none; display: inline-block; padding: 3px 10px; border-radius: 7px;
    font-size: .74rem; font-weight: 700;
}
.tag-안내 { background: var(--blue-100); color: var(--blue-600); }
.tag-모집 { background: #fdeee0; color: var(--amber); }
.tag-시스템 { background: var(--teal-100); color: var(--teal-500); }
.tag-공지 { background: #ffe9e9; color: var(--red); }

/* 일정 리스트 */
.sched-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sched-item {
    display: flex; align-items: center; gap: 14px; padding: 13px 16px;
    border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe;
}
.sched-date {
    flex: none; font-weight: 800; color: var(--blue-600); font-size: .86rem;
    background: var(--blue-100); border-radius: 8px; padding: 6px 10px;
}
.sched-main { flex: 1; min-width: 0; }
.sched-main .st { font-size: .92rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-main .sp { font-size: .79rem; color: var(--ink-400); }

/* ---------- 페이지 헤더 ---------- */
.page-head {
    background: linear-gradient(150deg, var(--navy-800), var(--navy-700) 70%, #14537d);
    color: #fff; padding: 40px 0 34px;
}
.page-head h1 { font-size: 1.55rem; font-weight: 800; }
.page-head .crumb { font-size: .82rem; color: #9fb4d8; margin-bottom: 8px; }

/* ---------- 버튼/뱃지/폼 공통 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: 10px; font-size: .92rem; font-weight: 700;
    border: 1px solid transparent; transition: all .15s;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--navy-800); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.b-blue  { background: var(--blue-100); color: var(--blue-600); }
.b-green { background: #e3f5ec; color: var(--green); }
.b-red   { background: #fdeaea; color: var(--red); }
.b-amber { background: #fdf1df; color: var(--amber); }
.b-gray  { background: #eef1f6; color: var(--ink-600); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-600); margin-bottom: 6px; }
.field label .req { color: var(--red); }
.input, .select, .textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink-900); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46, 111, 242, .12);
}
.textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .78rem; color: var(--ink-400); margin-top: 5px; }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    background: #f2f5fa; color: var(--ink-600); font-weight: 700; font-size: .82rem;
    padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fafd; }
.t-right { text-align: right; } .t-center { text-align: center; }

/* ---------- 알림 ---------- */
.alert { padding: 13px 16px; border-radius: 11px; font-size: .9rem; font-weight: 600; margin-bottom: 18px; }
.alert-ok  { background: #e4f5ed; color: #136b43; border: 1px solid #bfe7d4; }
.alert-err { background: #fdebeb; color: #9e2c2c; border: 1px solid #f3ccca; }

/* ---------- 과정 카드 ---------- */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.course-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cc-top { display: flex; align-items: center; gap: 8px; }
.grade-chip {
    display: inline-block; padding: 4px 12px; border-radius: 8px;
    font-size: .8rem; font-weight: 800; background: var(--navy-800); color: #fff;
}
.grade-chip.g4 { background: var(--teal-500); }
.grade-chip.g3 { background: var(--blue-600); }
.grade-chip.g2 { background: var(--navy-700); }
.grade-chip.g1 { background: var(--navy-900); }
.cc-type { font-size: .78rem; color: var(--ink-400); font-weight: 600; }
.course-card h3 { font-size: 1.08rem; font-weight: 800; color: var(--navy-900); }
.course-card .desc { font-size: .88rem; color: var(--ink-600); flex: 1; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cc-foot .org { font-size: .78rem; color: var(--ink-400); }

/* 진행바 */
.progress { height: 8px; border-radius: 99px; background: #e8edf5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-500), var(--teal-500)); }

/* ---------- 강의실 ---------- */
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.lesson-row + .lesson-row { margin-top: 10px; }
.lesson-no { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--blue-100); color: var(--blue-600); font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.lesson-no.done { background: #e3f5ec; color: var(--green); }
.lesson-main { flex: 1; min-width: 0; }
.lesson-main .lt { font-size: .93rem; font-weight: 700; }
.lesson-main .lm { font-size: .78rem; color: var(--ink-400); }

/* 시험 */
.q-card { padding: 22px; margin-bottom: 14px; }
.q-card .q-no { font-weight: 800; color: var(--blue-600); margin-right: 6px; }
.q-opts { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.q-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .92rem; transition: all .12s; }
.q-opt:hover { border-color: var(--blue-500); background: #f6f9ff; }
.q-opt input { accent-color: var(--blue-600); }

/* ---------- 해역정보 ---------- */
.sea-layout { display: grid; grid-template-columns: 260px 1fr 320px; gap: 16px; align-items: start; }
.sea-panel { padding: 18px; }
.sea-panel h3 { font-size: .95rem; font-weight: 800; color: var(--navy-800); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.layer-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.layer-list label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: .88rem; cursor: pointer; }
.layer-list label:hover { background: #f4f7fc; }
.layer-list input { accent-color: var(--blue-600); }
#seaMap { width: 100%; height: 520px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.sea-info-table { width: 100%; font-size: .86rem; border-collapse: collapse; }
.sea-info-table th { text-align: left; color: var(--ink-400); font-weight: 600; padding: 7px 4px; width: 90px; vertical-align: top; }
.sea-info-table td { padding: 7px 4px; font-weight: 600; color: var(--ink-900); }
.risk-banner { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 800; font-size: .9rem; text-align: center; }
.risk-양호 { background: #e3f5ec; color: var(--green); }
.risk-주의 { background: #fdf1df; color: var(--amber); }
.risk-경고 { background: #fdeaea; color: var(--red); }
.sea-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sea-chip { padding: 8px 14px; border-radius: 99px; font-size: .82rem; font-weight: 700; border: 1px solid var(--line); background: #fff; }

/* ---------- 풋터 ---------- */
.site-foot { background: var(--navy-900); color: #93a5c4; margin-top: 60px; }
.site-foot .container { padding: 36px 20px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { font-weight: 800; color: #fff; font-size: 1rem; margin-bottom: 8px; }
.site-foot p { font-size: .82rem; line-height: 1.8; }
.foot-links { display: flex; gap: 18px; font-size: .84rem; align-items: flex-start; }
.foot-links a:hover { color: #fff; }

/* ---------- 인증 ---------- */
.auth-wrap { max-width: 440px; margin: 48px auto; padding: 0 20px; }
.auth-card { padding: 34px 30px; }
.auth-card h1 { font-size: 1.35rem; font-weight: 800; color: var(--navy-900); text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; font-size: .86rem; color: var(--ink-400); margin-bottom: 24px; }
.auth-card .field + .field { margin-top: 14px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .86rem; color: var(--ink-600); }
.auth-foot a { color: var(--blue-600); font-weight: 700; }

/* ---------- 마이페이지 요약 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-tile { padding: 18px 20px; }
.stat-tile .sl { font-size: .8rem; color: var(--ink-400); font-weight: 600; }
.stat-tile .sv { font-size: 1.5rem; font-weight: 800; color: var(--navy-900); margin-top: 2px; }
.stat-tile .sv small { font-size: .85rem; color: var(--ink-400); font-weight: 600; }

/* ---------- 모바일 ---------- */
@media (max-width: 960px) {
    .feature-grid { grid-template-columns: 1fr; margin-top: 20px; }
    .home-cols { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: 1fr; }
    .sea-layout { grid-template-columns: 1fr; }
    #seaMap { height: 380px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .gnb-toggle { display: block; }
    .gnb .container { flex-wrap: wrap; justify-content: space-between; }
    .gnb-list {
        display: none; flex-direction: column; width: 100%;
        padding-bottom: 8px;
    }
    .gnb-list.open { display: flex; }
    .gnb-list a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
    .gnb-list a.active::after { display: none; }
    .brand-txt .t2 { display: none; }
    .hero .container { padding: 52px 20px 64px; }
}
