<?php
declare(strict_types=1);
/**
 * gov-portal 공통 크롬 CSS (헤더/사이드바/레이아웃 골격).
 * 대시보드·업무 셸이 공유한다. 카드/그리드 등 대시보드 전용 스타일은 포함하지 않는다.
 */
?>
    :root {
      --navy: #1a2b4b;
      --navy-deep: #002b4e;
      --blue: #0056b3;
      --blue-ui: #007bff;
      --blue-menu: #4a69bd;
      --blue-light: #eef6ff;
      --teal: #009688;
      --bg: #f0f4f8;
      --card: #fff;
      --text: #444;
      --text-dark: #222;
      --muted: #888;
      --border: #dde4ec;
      --font-scale: 1;
    }
    .gov-portal-shell * { box-sizing: border-box; }
    html.gov-portal-html { font-size: calc(14px * var(--font-scale)); -webkit-text-size-adjust: 100%; }
    body.gov-portal-shell {
      margin: 0;
      font-family: 'Pretendard', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
      font-size: 0.8125rem;
      font-weight: 400;
      line-height: 1.45;
      letter-spacing: -0.01em;
      color: var(--text);
      background: var(--bg);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    .gov-portal-shell .layout { display: flex; flex: 1; min-height: 0; }

    /* 좌측 사이드바 (대메뉴 클릭 → 소메뉴) */
    .gov-portal-shell .sidebar {
      width: 188px;
      flex-shrink: 0;
      background: #fff;
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      font-size: 0.8125rem;
    }
    .gov-portal-shell .my-menu-hd {
      background: var(--navy);
      color: #fff;
      padding: 0.55rem 0.7rem;
      font-weight: 700;
      font-size: 0.8125rem;
      letter-spacing: -0.02em;
    }
    .gov-portal-shell .my-menu-list { list-style: none; padding: 0.375rem 0.25rem; margin: 0; flex: 1; overflow-y: auto; }
    .gov-portal-shell .my-menu-list li { margin: 0.1875rem 0.375rem; }
    .gov-portal-shell .my-menu-list a,
    .gov-portal-shell .my-menu-list .menu-sub {
      display: flex;
      align-items: center;
      gap: 0.375rem;
      padding: 0.4375rem 0.625rem;
      margin: 0;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      text-decoration: none;
      font-size: 0.8125rem;
      font-weight: 600;
      line-height: 1.35;
      letter-spacing: -0.02em;
      box-sizing: border-box;
      transition: filter 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .gov-portal-shell .my-menu-list a { color: #fff; background: var(--blue-menu); }
    .gov-portal-shell .my-menu-list a .menu-ico,
    .gov-portal-shell .my-menu-list .menu-sub .menu-ico { font-size: 0.625rem; opacity: .9; width: 0.75rem; text-align: center; flex-shrink: 0; }
    .gov-portal-shell .my-menu-list a:hover { filter: brightness(1.06); border-color: rgba(255, 255, 255, 0.35); }
    .gov-portal-shell .my-menu-list a.active {
      background: #3d5a9e;
      font-weight: 700;
      border-color: rgba(255, 255, 255, 0.4);
      box-shadow: 0 1px 3px rgba(26, 43, 75, 0.12);
    }
    .gov-portal-shell .my-menu-list .menu-sub { background: var(--blue-light); color: var(--blue); font-size: 0.75rem; border-color: rgba(0, 86, 179, 0.18); }
    .gov-portal-shell .sidebar-blocks { margin-top: auto; }
    .gov-portal-shell .sb-teal { background: var(--teal); color: #fff; padding: 0.75rem 0.625rem; font-size: 0.6875rem; line-height: 1.5; letter-spacing: -0.02em; }
    .gov-portal-shell .sb-teal i { font-size: 1.125rem; margin-bottom: 0.25rem; display: block; }
    .gov-portal-shell .sb-gray { background: #4a5568; color: #fff; padding: 0.625rem; font-size: 0.6875rem; line-height: 1.45; }
    .gov-portal-shell .sb-links { padding: 0.625rem; background: #f5f7fa; font-size: 0.6875rem; }
    .gov-portal-shell .sb-links a { display: block; color: #555; text-decoration: none; padding: 0.1875rem 0; letter-spacing: -0.02em; font-weight: 600; }
    .gov-portal-shell .sb-links a:hover { color: var(--blue-ui); }

    /* 본문 영역 */
    .gov-portal-shell .main { flex: 1; min-width: 0; overflow-y: auto; }
    .gov-portal-shell .main.work-main { padding: 0.875rem 1rem 1.25rem; background: var(--bg); }
    .gov-portal-shell .work-titlebar {
      display: flex; align-items: center; gap: .5rem;
      font-size: 1.05rem; font-weight: 800; color: var(--text-dark);
      letter-spacing: -0.03em; margin: 0 0 0.75rem;
    }
    .gov-portal-shell .work-titlebar .tb-ico { color: var(--blue-ui); }
    .gov-portal-shell .work-surface {
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 1px 3px rgba(26,43,75,.06), 0 2px 8px rgba(26,43,75,.04);
      padding: 1rem 1.1rem;
    }
    .gov-portal-shell .work-flash { margin-bottom: 0.75rem; padding: 0.6rem 0.9rem; border-radius: 8px; font-size: 0.8125rem; }
    .gov-portal-shell .work-flash.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
    .gov-portal-shell .work-flash.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
    .gov-portal-shell .portal-footer {
      background: #eef2f7; border-top: 1px solid var(--border);
      padding: 0.3rem 1rem; font-size: 0.6875rem; color: var(--muted);
      display: flex; justify-content: space-between; align-items: center;
    }

    @media (max-width: 1024px) {
      .gov-portal-shell .layout { flex-direction: column; }
      .gov-portal-shell .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
      .gov-portal-shell .my-menu-list { display: flex; flex-wrap: wrap; }
    }
