@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,500,0,0');

:root {
  color-scheme: light;
  --primary: #4f46b5;
  --primary-dark: #39328f;
  --primary-soft: #eeedff;
  --bg: #f5f5fb;
  --panel: #ffffff;
  --text: #20202b;
  --muted: #77778b;
  --line: #e7e7f0;
  --green: #15956a;
  --amber: #d88b16;
  --coral: #e06468;
  --blue: #3179c7;
  --shadow: 0 12px 35px rgba(58, 55, 103, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', Pretendard, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(79, 70, 181, 0.18);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.material-symbol {
  font-family: 'Material Symbols Rounded', 'Segoe UI Symbol', sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}
.muted { color: var(--muted); }
.eyebrow, .overline {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Login */
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.16fr .84fr; }
.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  padding: clamp(38px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 75% 30%, rgba(153, 143, 255, .52), transparent 25%),
    radial-gradient(circle at 17% 83%, rgba(126, 224, 205, .20), transparent 24%),
    linear-gradient(145deg, #2b286d 0%, #4f46b5 50%, #756dd0 100%);
}
.login-visual::before, .login-visual::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
}
.login-visual::before { width: 620px; height: 620px; right: -210px; top: 80px; }
.login-visual::after { width: 420px; height: 420px; right: -20px; top: 180px; }
.login-logo { position: relative; z-index: 2; width: 126px; filter: brightness(0) invert(1); }
.login-copy { position: relative; z-index: 2; max-width: 650px; margin-top: clamp(100px, 15vh, 190px); }
.login-copy .eyebrow { color: #cbc7ff; }
.login-copy h1 { margin: 18px 0; font-size: clamp(36px, 3.5vw, 56px); line-height: 1.25; letter-spacing: -.045em; }
.login-copy h1 span { white-space: nowrap; }
.login-copy p { max-width: 520px; color: rgba(255,255,255,.75); font-size: 18px; line-height: 1.8; }
.visual-card {
  position: absolute;
  z-index: 3;
  width: 230px;
  padding: 20px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(255,255,255,.13);
  box-shadow: 0 25px 60px rgba(18, 14, 72, .25);
  backdrop-filter: blur(15px);
}
.visual-card .material-symbol { grid-row: 1 / 3; align-self: center; font-size: 30px; color: #d9d5ff; }
.visual-card strong { font-size: 15px; }
.visual-card small { color: rgba(255,255,255,.68); font-size: 11px; }
.visual-card-a { right: 8%; bottom: 24%; }
.visual-card-b { right: 28%; bottom: 9%; }
.login-panel { display: grid; place-items: center; padding: 42px; background: #fff; }
.login-card { width: min(100%, 410px); }
.login-card h2 { margin: 20px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.login-card > .muted { margin: 0 0 34px; }
.version-badge { display: inline-flex; padding: 7px 11px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 800; }
.mobile-logo-wrap { display: none; }
.login-card label, .form-grid label { display: grid; gap: 8px; margin-bottom: 18px; color: #525263; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  transition: border-color .18s, box-shadow .18s;
}
input:hover, select:hover, textarea:hover { border-color: #c9c8d7; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,181,.08); outline: 0; }
.form-error { min-height: 21px; margin: -5px 0 12px; color: #d3474f; font-size: 13px; }
.login-help { margin-top: 23px; text-align: center; color: var(--muted); font-size: 12px; }

/* Buttons */
.primary-button, .secondary-button, .text-button, .icon-button, .filter-chip, .install-button {
  border: 0;
  cursor: pointer;
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
}
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 17px; border-radius: 12px;
  background: var(--primary); color: #fff; font-weight: 700;
  box-shadow: 0 8px 18px rgba(79,70,181,.18);
}
.primary-button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.primary-button.large { width: 100%; min-height: 52px; }
.primary-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-weight: 700; }
.secondary-button:hover { border-color: #c9c7e7; color: var(--primary); background: #fafaff; }
.text-button { padding: 7px; background: transparent; color: var(--primary); font-weight: 700; font-size: 13px; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border-radius: 11px; background: transparent; }
.icon-button:hover { background: var(--primary-soft); color: var(--primary); }
.icon-button.outlined { border: 1px solid var(--line); background: #fff; }
.button-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.is-loading .button-label { display: none; }
.is-loading .button-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; padding: 25px 18px 18px;
  background: #fff; border-right: 1px solid var(--line);
}
.brand { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 11px; color: var(--primary); text-decoration: none; }
.brand img { width: 95px; }
.brand span { margin-top: 5px; padding: 3px 7px; border-radius: 7px; background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.main-nav { display: grid; gap: 7px; margin-top: 45px; }
.nav-item { height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border: 0; border-radius: 13px; background: transparent; color: #6f6f81; cursor: pointer; font-weight: 650; text-align: left; }
.nav-item:hover { background: #f7f7fb; color: #353543; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; }
.install-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f6f6fb; color: #555568; font-size: 12px; font-weight: 700; }
.install-button:hover { color: var(--primary); background: var(--primary-soft); }
.user-mini { display: grid; grid-template-columns: 40px 1fr 34px; align-items: center; gap: 10px; padding: 13px 8px 4px; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--primary), #867ddd); color: #fff; font-weight: 800; }
.user-mini strong, .user-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-mini strong { font-size: 13px; }
.user-mini small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.workspace { min-width: 0; padding: 0 34px 42px; }
.topbar { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; gap: 10px; }
.view { display: none; animation: view-in .22s ease-out; }
.active-view { display: block; }
@keyframes view-in { from { opacity: .3; transform: translateY(4px); } }
.panel { background: var(--panel); border: 1px solid rgba(225,225,237,.8); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel.compact { padding: 17px 20px; box-shadow: 0 5px 20px rgba(58,55,103,.045); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px 16px; }
.panel-heading h2, .photo-toolbar h2, .gallery-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.025em; }
.panel-heading h2 em { color: var(--primary); font-style: normal; }

/* Dashboard */
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.summary-card { position: relative; overflow: hidden; min-height: 132px; padding: 22px 23px; border-radius: 18px; color: #fff; box-shadow: var(--shadow); }
.summary-card::after { content: ''; position: absolute; width: 105px; height: 105px; right: -25px; bottom: -38px; border: 18px solid rgba(255,255,255,.10); border-radius: 50%; }
.summary-card span, .summary-card strong, .summary-card small { display: block; position: relative; z-index: 2; }
.summary-card span { color: rgba(255,255,255,.78); font-size: 12px; }
.summary-card strong { margin: 13px 0 4px; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.04em; }
.summary-card small { color: rgba(255,255,255,.65); font-size: 10px; }
.summary-card.purple { background: linear-gradient(135deg, #5148b8, #756dd0); }
.summary-card.amber { background: linear-gradient(135deg, #d98c1a, #efb35b); }
.summary-card.green { background: linear-gradient(135deg, #178d68, #4ab795); }
.summary-card.coral { background: linear-gradient(135deg, #d45d65, #eb8b8f); }
.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 17px; margin-top: 17px; }
.today-panel { grid-row: span 2; min-height: 520px; }
.event-list { padding: 0 16px 18px; }
.event-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 10px; border-bottom: 1px solid #f0f0f5; cursor: pointer; border-radius: 12px; }
.event-item:hover { background: #f9f9fc; }
.event-time { text-align: center; color: var(--primary); font-size: 12px; font-weight: 800; }
.event-copy { min-width: 0; }
.event-copy strong, .event-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-copy strong { font-size: 13px; }
.event-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.type-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.type-dot.personal { background: var(--blue); }
.type-dot.expense { background: var(--amber); }
.empty { display: grid; place-items: center; min-height: 170px; color: var(--muted); font-size: 12px; text-align: center; }
.trend-chart { min-height: 180px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 14px 24px 24px; }
.trend-column { flex: 1; height: 145px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.trend-bar-wrap { flex: 1; width: min(38px, 65%); display: flex; align-items: flex-end; }
.trend-bar { width: 100%; min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(#7770d4, var(--primary)); transition: height .35s; }
.trend-column strong { font-size: 10px; }
.trend-column small { color: var(--muted); font-size: 9px; }
.activity-list { padding: 0 24px 20px; }
.activity-item { position: relative; padding: 10px 0 10px 22px; border-left: 1px solid var(--line); }
.activity-item::before { content: ''; position: absolute; left: -5px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.activity-item strong { display: block; font-size: 12px; }
.activity-item small { color: var(--muted); font-size: 10px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skeleton-grid::before, .skeleton-grid::after { content: ''; grid-column: span 2; height: 240px; border-radius: 20px; background: linear-gradient(90deg,#ededf5,#f8f8fb,#ededf5); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Calendar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.date-navigation { display: flex; align-items: center; gap: 8px; }
.date-navigation h2 { min-width: 130px; margin: 0 0 0 10px; font-size: 18px; }
.filter-row { display: flex; gap: 7px; }
.filter-chip { min-height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-chip:hover, .filter-chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.calendar-layout { display: grid; grid-template-columns: minmax(640px, 1fr) 300px; gap: 16px; }
.calendar-panel { overflow: hidden; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { border-bottom: 1px solid var(--line); background: #fafafd; }
.weekday-row span { padding: 13px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.weekday-row span:first-child { color: #e05b64; }
.weekday-row span:last-child { color: var(--blue); }
.calendar-day { min-height: 116px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover, .calendar-day.selected { background: #fafaff; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--primary); }
.calendar-day.outside { background: #fbfbfd; color: #b6b6c3; }
.day-number { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 5px; border-radius: 9px; font-size: 11px; font-weight: 700; }
.calendar-day.today .day-number { background: var(--primary); color: #fff; }
.calendar-event { display: block; overflow: hidden; margin: 3px 0; padding: 4px 6px; border-left: 3px solid var(--primary); border-radius: 4px; background: var(--primary-soft); color: #4a438d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.personal { border-color: var(--blue); background: #eaf4ff; color: #2b669f; }
.calendar-event.expense { border-color: var(--amber); background: #fff4df; color: #986010; }
.more-events { color: var(--muted); font-size: 9px; }
.day-agenda { min-height: 600px; }

/* Map */
.map-view { height: calc(100vh - 147px); min-height: 590px; }
.map-layout { height: 100%; display: grid; grid-template-columns: 350px minmax(0, 1fr); overflow: hidden; }
.map-list-pane { min-width: 0; border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.map-list-header { padding: 22px 20px 12px; }
.map-list-header h2 { display: inline; margin: 0; font-size: 17px; }
.map-list-header > p { display: inline; margin-left: 7px; font-size: 11px; }
.search-box { height: 41px; display: flex; align-items: center; gap: 8px; margin: 17px 0 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafafd; color: var(--muted); }
.search-box input { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.search-box.wide { width: min(400px, 42vw); margin: 0; }
.map-event-list { flex: 1; overflow: auto; padding: 0 12px 20px; }
.map-event-card { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin: 4px 0; padding: 13px 10px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.map-event-card:hover, .map-event-card.active { border-color: #dddaf6; background: #f8f7ff; }
.marker-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 800; }
.map-event-card strong, .map-event-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-event-card strong { font-size: 12px; }
.map-event-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.map-canvas-wrap { position: relative; min-width: 0; min-height: 420px; overflow: hidden; background: #e8e7ef; }
.map-canvas { position: relative; width: 100%; height: 100%; min-height: 420px; background: #e8e7ef; }
.map-status { position: absolute; left: 50%; top: 50%; z-index: 5; transform: translate(-50%,-50%); width: 290px; display: grid; place-items: center; gap: 6px; padding: 24px; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); text-align: center; }
.map-status .material-symbol { font-size: 32px; color: var(--primary); }
.map-status strong { font-size: 13px; }
.map-status small { color: var(--muted); font-size: 10px; line-height: 1.55; }

/* Photos */
.photo-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.photo-toolbar h2 { margin: 0; }
.photo-toolbar p { margin: 5px 0 0; font-size: 11px; }
.photos-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; min-height: 620px; }
.photo-schedule-pane { overflow: hidden; }
.photo-schedule-list { max-height: 650px; overflow: auto; padding: 11px; }
.photo-schedule-item { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 12px 10px; border-radius: 12px; cursor: pointer; }
.photo-schedule-item:hover, .photo-schedule-item.active { background: var(--primary-soft); }
.photo-schedule-item .date-tile { display: grid; place-items: center; height: 38px; border-radius: 10px; background: #f1f1f6; color: var(--primary); font-size: 10px; font-weight: 800; }
.photo-schedule-item strong, .photo-schedule-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-schedule-item strong { font-size: 12px; }
.photo-schedule-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.photo-gallery-pane { padding: 0 22px 24px; }
.gallery-heading { min-height: 91px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-heading p { margin: 4px 0 0; font-size: 10px; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-gallery.empty-state { min-height: 420px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state .material-symbol { font-size: 50px; color: #cbc9df; }
.empty-state strong { display: block; margin-top: -20px; font-size: 12px; }
.photo-tile { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #eeeef3; cursor: pointer; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .22s; }
.photo-tile:hover img { transform: scale(1.025); }
.photo-tile input { position: absolute; top: 9px; left: 9px; z-index: 2; width: 20px; height: 20px; accent-color: var(--primary); }
.photo-tile .photo-caption { position: absolute; inset: auto 0 0; padding: 20px 10px 8px; color: #fff; background: linear-gradient(transparent,rgba(0,0,0,.65)); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dialogs */
dialog { padding: 0; border: 0; border-radius: 20px; color: var(--text); box-shadow: 0 30px 90px rgba(25,22,64,.24); }
dialog::backdrop { background: rgba(28,27,45,.48); backdrop-filter: blur(3px); }
.schedule-dialog { width: min(680px, calc(100vw - 32px)); }
.detail-dialog { width: min(560px, calc(100vw - 32px)); }
.schedule-dialog form, .detail-dialog { padding: 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-header h2 { margin: 5px 0 0; font-size: 21px; }
.type-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 20px; padding: 5px; border-radius: 13px; background: #f3f3f8; }
.type-segment label { position: relative; cursor: pointer; }
.type-segment input { position: absolute; opacity: 0; pointer-events: none; }
.type-segment span { display: grid; place-items: center; height: 38px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.type-segment input:checked + span { background: #fff; color: var(--primary); box-shadow: 0 3px 12px rgba(44,42,82,.10); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid label { margin-bottom: 13px; }
.group-field { min-width: 0; margin: 0 0 13px; padding: 0; border: 0; }
.group-field legend { margin-bottom: 8px; color: #525263; font-size: 13px; font-weight: 700; }
.group-field legend small { margin-left: 7px; color: var(--muted); font-size: 10px; font-weight: 500; }
.group-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafafd; }
.group-checklist label { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 8px 10px; border-radius: 9px; background: #fff; cursor: pointer; }
.group-checklist label:hover { background: var(--primary-soft); }
.group-checklist input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; padding: 0; accent-color: var(--primary); box-shadow: none; }
.group-checklist span { overflow: hidden; color: #525263; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.group-checklist.is-disabled { opacity: .5; }
.group-checklist .empty { grid-column: 1 / -1; padding: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.detail-body { display: grid; gap: 0; }
.detail-row { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.detail-row span { color: var(--muted); }
.detail-row strong { white-space: pre-wrap; }
.type-badge { display: inline-flex; padding: 5px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 800; }

/* Toast */
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 280px; max-width: 420px; padding: 14px 17px; border-radius: 12px; background: #2b2b38; color: #fff; box-shadow: 0 15px 35px rgba(0,0,0,.18); font-size: 12px; animation: toast-in .25s ease-out; }
.toast.error { background: #a83d45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { padding-inline: 23px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-layout { grid-template-columns: 1fr; }
  .day-agenda { min-height: 250px; }
  .map-layout { grid-template-columns: 310px minmax(0,1fr); }
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-logo-wrap { display: block; margin-bottom: 28px; }
  .mobile-logo-wrap img { width: 110px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 67px; flex-direction: row; padding: 7px 12px; border: 0; border-top: 1px solid var(--line); }
  .brand, .sidebar-bottom { display: none; }
  .main-nav { width: 100%; grid-template-columns: repeat(4, 1fr); margin: 0; }
  .nav-item { height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 0; font-size: 9px; }
  .workspace { padding: 0 14px 88px; }
  .topbar { min-height: 88px; }
  .topbar p, #refresh-button { display: none; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .map-view { height: auto; min-height: 0; }
  .map-layout { height: 720px; grid-template-columns: 1fr; grid-template-rows: 300px 1fr; }
  .map-list-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .photos-layout { grid-template-columns: 1fr; }
  .photo-schedule-list { max-height: 260px; }
  .photo-toolbar { align-items: flex-start; gap: 12px; }
}

@media (max-width: 620px) {
  .login-panel { padding: 25px; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 115px; }
  .toolbar, .photo-toolbar { display: grid; }
  .toolbar .filter-row { overflow-x: auto; }
  .calendar-panel { overflow-x: auto; }
  .weekday-row, .calendar-grid { min-width: 690px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .group-checklist { grid-template-columns: 1fr; }
  .search-box.wide { width: 100%; }
  .topbar-actions .primary-button { width: 42px; padding: 0; font-size: 0; }
}
