@charset "UTF-8";
/* =========================================================================
 * DaySign v3 모바일(사용자 앱) 공통 스타일
 * - 화면설계서(DaySign-V3-Screen Layout-Mobile-v1.0) 디자인 토큰 기준
 * - 서버렌더 JSP 모바일 웹. 휴대폰 화면(최대 폭 제한) + 상단 헤더 + 하단 탭
 * ========================================================================= */

:root {
    --m-primary: #3B5BA5;      /* 주요 색(헤더·기본 버튼) */
    --m-primary-dk: #2F4A86;
    --m-header-bg: #E9ECEF;    /* 섹션 헤더 배경 */
    --m-label-bg: #F1F3F5;     /* 폼 라벨 배경 */
    --m-line: #D5DADF;         /* 옅은 선 */
    --m-panel: #C9CDD2;        /* 패널 보더 */
    --m-btn: #E7EBF0;          /* 일반(보조) 버튼 */
    --m-btn-bd: #9DB2CE;       /* 버튼 보더 */
    --m-txt: #333333;
    --m-txt2: #888E96;         /* placeholder·보조 텍스트 */
    --m-mark: #E8590C;         /* 강조(배지) */
    --m-ok-bg: #EEF4EE;        /* 상태 박스(정상) 배경 */
    --m-bg: #F4F6F9;           /* 앱 본문 배경 */
    --m-header-h: 50px;
    --m-nav-h: 56px;
    --m-radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #c7ccd4;
    font-family: "Noto Sans KR", "맑은 고딕", "Malgun Gothic", sans-serif;
    color: var(--m-txt);
    font-size: 1rem;   /* 기본 폰트 = 1rem (브라우저 기본 16px) */
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── 앱 컨테이너(휴대폰 화면) ────────────────────────────── */
.m-app {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--m-bg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 24px rgba(0, 0, 0, .18);
}

/* ── 상단 헤더(타이틀바) ─────────────────────────────────── */
.m-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--m-header-h);
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: var(--m-primary);
    color: #fff;
}
.m-header__back,
.m-header__action {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 1.125rem;
}
.m-header__title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 1.0625rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-header__spacer { width: 40px; }
/* 홈 헤더 워드마크 — 흰색 DaySign 글자(아이콘 제외, 투명 배경) */
.m-header__brand { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; }
.m-header__logo { height: 23px; width: auto; max-width: 80%; display: block; }

/* ── 본문 ───────────────────────────────────────────────── */
.m-body {
    flex: 1 1 auto;
    padding: 14px 14px calc(var(--m-nav-h) + 18px);
    overflow-y: auto;
}
.m-body--nonav { padding-bottom: 18px; }

/* ── 하단 탭(글로벌 네비) ───────────────────────────────── */
.m-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 30;
    width: 100%;
    max-width: 480px;
    height: var(--m-nav-h);
    display: flex;
    background: #fff;
    border-top: 1px solid var(--m-line);
}
.m-nav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--m-txt2);
    font-size: 0.6875rem;
}
.m-nav__item i { font-size: 1.1875rem; }
.m-nav__item.is-active { color: var(--m-primary); font-weight: 700; }

/* ── 섹션 헤더 ───────────────────────────────────────────── */
.m-section {
    margin: 16px 0 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--m-txt);
}
.m-section:first-child { margin-top: 2px; }

/* ── 카드 ───────────────────────────────────────────────── */
.m-card {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 13px 14px;
    margin-bottom: 10px;
}
.m-card__title { font-size: 0.875rem; font-weight: 700; margin-bottom: 4px; }
.m-card__meta { font-size: 0.78125rem; color: var(--m-txt2); }
.m-card__row { display: flex; justify-content: space-between; gap: 8px; }
.m-card--link { display: flex; align-items: center; justify-content: space-between; }
.m-card--link::after { content: "\203A"; color: var(--m-txt2); font-size: 1.25rem; }

/* ── 리스트 행 ───────────────────────────────────────────── */
.m-list { background: #fff; border: 1px solid var(--m-line); border-radius: var(--m-radius); overflow: hidden; }
.m-list__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--m-line);
}
.m-list__row:last-child { border-bottom: 0; }
.m-list__row::after { content: "\203A"; margin-left: auto; color: var(--m-txt2); font-size: 1.25rem; }
.m-list__row--plain::after { content: none; }
.m-list__main { min-width: 0; }
.m-list__title { font-size: 0.90625rem; font-weight: 600; }
.m-list__sub { font-size: 0.78125rem; color: var(--m-txt2); margin-top: 2px; }

/* ── 상태 박스 ───────────────────────────────────────────── */
.m-statusbox {
    background: var(--m-ok-bg);
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 12px 14px;
    font-size: 0.84375rem;
    margin-bottom: 12px;
}
.m-statusbox strong { font-weight: 700; }

/* ── 폼 / 입력 ───────────────────────────────────────────── */
.m-field { margin-bottom: 12px; }
.m-field__label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 6px; }
.m-input,
.m-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--m-btn-bd);
    border-radius: 8px;
    background: #fff;
    font-size: 0.9375rem;
    color: var(--m-txt);
}
.m-input::placeholder { color: var(--m-txt2); }
.m-input:focus,
.m-select:focus { outline: none; border-color: var(--m-primary); }
textarea.m-input { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; }

.m-field-row {
    display: flex;
    align-items: center;
    border: 1px solid var(--m-line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}
.m-field-row__label { flex: 0 0 38%; padding: 12px; background: var(--m-label-bg); font-size: 0.8125rem; font-weight: 600; }
.m-field-row__value { flex: 1 1 auto; padding: 12px; font-size: 0.84375rem; color: var(--m-txt); }

/* ── 체크 ───────────────────────────────────────────────── */
.m-check { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 0.875rem; }
.m-check input { width: 18px; height: 18px; }

/* ── 버튼 ───────────────────────────────────────────────── */
.m-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 8px;
    background: var(--m-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}
.m-btn:active { background: var(--m-primary-dk); }
.m-btn--sub { background: var(--m-btn); color: var(--m-txt); border: 1px solid var(--m-btn-bd); }
.m-btn--block { margin-bottom: 10px; }
.m-btn[disabled] { opacity: .5; }

/* ── 탭 ─────────────────────────────────────────────────── */
.m-tabs { display: flex; border: 1px solid var(--m-line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.m-tabs__tab {
    flex: 1 1 0;
    text-align: center;
    padding: 11px 4px;
    font-size: 0.84375rem;
    background: var(--m-label-bg);
    color: var(--m-txt2);
    border: 0;
    border-left: 1px solid var(--m-line);
}
.m-tabs__tab:first-child { border-left: 0; }
.m-tabs__tab.is-active { background: #fff; color: var(--m-txt); font-weight: 700; }
.m-tab-panel { display: none; }
.m-tab-panel.is-active { display: block; }

/* ── 큰 메뉴 그리드 ─────────────────────────────────────── */
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.m-grid__cell {
    background: #fff;
    border: 1px solid var(--m-btn-bd);
    border-radius: var(--m-radius);
    padding: 18px 10px;
    text-align: center;
    font-size: 0.84375rem;
    font-weight: 600;
    color: var(--m-txt);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.m-grid__cell i { font-size: 1.375rem; color: var(--m-primary); }

/* ── 배지 ───────────────────────────────────────────────── */
.m-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.71875rem;
    font-weight: 700;
    background: var(--m-label-bg);
    color: var(--m-txt2);
}
.m-badge--wait { background: #FFF1E6; color: var(--m-mark); }
.m-badge--done { background: #E7F1E8; color: #2E7D32; }
.m-badge--new { background: var(--m-mark); color: #fff; }

/* ── 안내 텍스트 / 빈 목록 ─────────────────────────────── */
.m-help { font-size: 0.78125rem; color: var(--m-txt2); margin: 4px 2px 12px; }
.m-empty { text-align: center; color: var(--m-txt2); padding: 48px 16px; font-size: 0.875rem; }

/* ── 문서(PDF) 영역 ─────────────────────────────────────── */
.m-doc {
    background: #F6F6F6;
    border: 1px solid var(--m-panel);
    border-radius: 8px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--m-txt2);
    font-size: 0.8125rem;
    margin-bottom: 12px;
}

/* ── 스플래시 / 시작 ───────────────────────────────────── */
.m-splash {
    flex: 1 1 auto;
    background: var(--m-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}
.m-splash__logo { font-size: 2rem; font-weight: 800; letter-spacing: .5px; }

/* ── 홈 히어로(상단 네이비 영역) ───────────────────────── */
.m-hero {
    margin: -14px -14px 16px;   /* m-body 패딩 상쇄 → 화면 폭 꽉 채우고 헤더와 이어짐 */
    padding: 8px 18px 22px;
    background: linear-gradient(160deg, #4162AD 0%, var(--m-primary) 46%, #33507E 100%);
    color: #fff;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 8px 18px -12px rgba(47, 74, 134, .55);
}
.m-hero__greet { font-size: 0.84375rem; opacity: .92; margin-top: 4px; }
.m-hero__greet strong { font-weight: 800; }
.m-hero__title { font-size: 1.4375rem; font-weight: 800; line-height: 1.32; margin: 6px 0 9px; letter-spacing: -.2px; }
.m-hero__sub { font-size: 0.8125rem; opacity: .95; margin-bottom: 16px; }
.m-hero__sub b { font-weight: 800; }

/* 히어로 안 진행상황 패널 */
.m-hero__panel {
    display: block;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    padding: 6px 14px;
    margin-bottom: 14px;
    color: #fff;
}
.m-hero__panel--empty { text-align: center; padding: 16px 14px; font-size: 0.8125rem; opacity: .95; }
.m-prog { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.m-prog + .m-prog { border-top: 1px solid rgba(255, 255, 255, .16); }
.m-prog__main { flex: 1 1 auto; min-width: 0; }
.m-prog__name { font-size: 0.875rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-prog__site { font-size: 0.75rem; opacity: .82; margin-top: 2px; }
.m-prog__badge {
    flex: 0 0 auto;
    background: #fff; color: var(--m-primary);
    font-size: 0.71875rem; font-weight: 800;
    padding: 3px 10px; border-radius: 11px; white-space: nowrap;
}
.m-prog__badge--live { background: #E8F6EC; color: #1F7A38; }

/* 관리자 통계 3분할 */
.m-stat { display: flex; padding: 6px 0; }
.m-stat__cell { flex: 1 1 0; text-align: center; padding: 6px 2px; }
.m-stat__cell + .m-stat__cell { border-left: 1px solid rgba(255, 255, 255, .18); }
.m-stat__num { font-size: 1.4375rem; font-weight: 800; line-height: 1.1; }
.m-stat__lbl { font-size: 0.71875rem; opacity: .85; margin-top: 5px; }

/* 히어로 액션 버튼 */
.m-hero__btns { display: flex; gap: 10px; }
.m-hero__btn {
    flex: 1 1 0; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 0.90625rem; font-weight: 700;
}
.m-hero__btn i { font-size: 0.9375rem; }
.m-hero__btn--fill { background: #fff; color: var(--m-primary); }
.m-hero__btn--fill:active { background: #eef1f6; }
.m-hero__btn--ghost { background: rgba(255, 255, 255, .10); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.m-hero__btn--ghost:active { background: rgba(255, 255, 255, .2); }
/* 비활성(토글 off) — 조건 미충족 시 회색 처리, 클릭 불가 */
.m-hero__btn--off { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .42); border: 1.5px solid rgba(255, 255, 255, .16); cursor: default; }

/* ── 바로가기 그리드 ───────────────────────────────────── */
.m-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.m-quick__cell {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--m-line);
    border-radius: 14px; padding: 15px 13px;
    color: var(--m-txt);
}
.m-quick__cell:active { background: #f7f9fc; }
.m-quick__ic {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.125rem;
}
.m-quick__tx { min-width: 0; }
.m-quick__t { font-size: 0.875rem; font-weight: 700; }
.m-quick__s { font-size: 0.71875rem; color: var(--m-txt2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 토스트 ─────────────────────────────────────────────── */
.m-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--m-nav-h) + 20px);
    transform: translateX(-50%);
    z-index: 60;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    padding: 11px 18px;
    border-radius: 22px;
    font-size: 0.84375rem;
    max-width: 86%;
    text-align: center;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}
.m-toast.is-show { opacity: 1; }
