html { font-size: 14px; }

body {
  background: #f5f7fb;
  color: #202938;
  font-family: "Malgun Gothic", "Segoe UI", sans-serif;
}

.app-header {
  background: #12315c;
  color: #fff;
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  box-shadow: 0 1px 8px rgba(15, 23, 42, .16);
}

.app-header .container-fluid {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  margin-right: 2px;
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,.24);
  line-height: 1;
}

.brand:hover { color: #fff; }

.app-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  gap: 12px;
}

.navbar-nav {
  flex-wrap: wrap;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff;
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.32);
}

.nav-separator {
  align-self: stretch;
  width: 1px;
  min-height: 30px;
  background: rgba(255,255,255,.28);
  margin: 2px 4px;
}

.logout-form { display: flex; gap: 12px; align-items: center; margin: 0; }
.user-name { color: rgba(255,255,255,.88); font-size: 13px; }

.page-shell {
  max-width: 1280px;
  margin: 28px auto;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}

.page-title h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}

.page-title p {
  color: #64748b;
  margin: 4px 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
}

.metric span {
  color: #64748b;
  display: block;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 24px;
  letter-spacing: 0;
}

.panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 150px 150px 1fr 100px;
  gap: 10px;
  margin-bottom: 16px;
}

.compact-filter {
  grid-template-columns: 150px 150px 100px;
}

.inline-filter {
  display: grid;
  grid-template-columns: 110px 80px;
  gap: 8px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  margin-bottom: 16px;
}

.edit-panel {
  max-width: 980px;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: #334155;
  font-weight: 700;
}

.field-wide {
  grid-column: span 3;
}

.field-link,
.table-link {
  color: #0f62c9;
  font-weight: 700;
  text-decoration: none;
}

.field-link {
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.form-hint {
  color: #64748b;
  font-size: 13px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #334155;
}

.split-actions {
  display: flex;
  gap: 8px;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.two-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 14px;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.summary-strip strong {
  color: #0f172a;
}

.summary-strip span {
  color: #475569;
}

.table-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.table-actions form {
  margin: 0;
}

.password-update-form {
  display: grid;
  grid-template-columns: 150px 58px;
  gap: 6px;
  align-items: center;
}

.password-update-form .form-control {
  min-width: 140px;
}

.user-create-grid {
  align-items: end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 16px;
  margin-top: 16px;
}

.bar-chart {
  height: 280px;
  display: grid;
  grid-template-columns: repeat(12, minmax(28px, 1fr));
  gap: 8px;
  align-items: end;
  border-bottom: 1px solid #cbd5e1;
  padding: 12px 0 0;
}

.bar-group {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 22px;
  gap: 6px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 100%;
}

.bar {
  width: 8px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}

.bar.amount { background: #a6c7ff; }
.bar.profit { background: #2467d6; }
.bar.deposit { background: #20a66a; }

.chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.legend-amount { background: #a6c7ff; }
.legend-profit { background: #2467d6; }
.legend-deposit { background: #20a66a; }

.status-list {
  display: grid;
  gap: 12px;
}

.status-row {
  display: grid;
  grid-template-columns: 140px 1fr 42px;
  gap: 10px;
  align-items: center;
  color: #475569;
}

.status-track {
  height: 9px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.status-track i {
  display: block;
  height: 100%;
  background: #2467d6;
}

.history-insert {
  color: #14713d;
}

.parking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.month-nav {
  display: flex;
  gap: 8px;
}

.parking-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.parking-summary div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.parking-summary span {
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

.parking-summary strong {
  font-size: 18px;
}

.negative,
.license-state .expired {
  color: #dc2626;
}

.calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.calendar-table th {
  background: #eef4fb;
  padding: 10px;
  color: #334155;
}

.calendar-table th.sun { color: #dc2626; }
.calendar-table th.sat { color: #2563eb; }

.calendar-table td {
  height: 88px;
  border: 1px solid #e2e8f0;
  vertical-align: top;
  background: #fff;
}

.calendar-table td.empty {
  background: #f8fafc;
}

.calendar-table td a {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 86px;
  padding: 9px;
  color: #0f172a;
  text-decoration: none;
}

.calendar-table td.used {
  background: #eaf4ff;
}

.calendar-table td.today {
  outline: 2px solid #facc15;
  outline-offset: -2px;
}

.calendar-table td.selected {
  background: #1f66d1;
}

.calendar-table td.selected a {
  color: #fff;
}

.calendar-table td span {
  color: #1d4ed8;
  font-weight: 800;
}

.calendar-table td.selected span {
  color: #fff;
}

.import-guide {
  display: grid;
  gap: 4px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.error-list {
  margin: 0;
  padding-left: 20px;
  color: #b91c1c;
}

.code-input {
  font-family: Consolas, "Courier New", monospace;
}

.license-state {
  display: grid;
  gap: 8px;
  color: #475569;
}

.license-state strong {
  font-size: 26px;
  color: #15803d;
}

.report-paper {
  background: #fff;
  color: #111827;
  padding: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.report-paper h1 {
  font-size: 26px;
  font-weight: 800;
}

.report-paper h2 {
  margin-top: 28px;
  font-size: 18px;
  font-weight: 800;
}

.report-meta {
  color: #64748b;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.report-summary div {
  border: 1px solid #dbe4ef;
  padding: 12px;
}

.report-summary span {
  display: block;
  color: #64748b;
  margin-bottom: 6px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.report-table th,
.report-table td {
  border: 1px solid #dbe4ef;
  padding: 7px;
}

.report-table th {
  background: #eef4fb;
}

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  background: #eef4fb;
  color: #334155;
  font-weight: 700;
  padding: 10px;
  border-bottom: 1px solid #dbe4ef;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f7;
}

.login-box { width: 390px; }

.login-logo {
  color: #03c75a;
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 24px;
}

.login-card {
  background: #fff;
  border: 1px solid #dadde1;
  padding: 24px 24px 34px;
}

.login-card .form-control {
  height: 50px;
  border-radius: 0;
}

.btn-naver {
  background: #03c75a;
  color: #fff;
  border: 0;
  height: 50px;
  font-weight: 800;
}

.btn-naver:hover {
  background: #00b050;
  color: #fff;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8a949e;
  font-size: 12px;
  margin: 18px 0 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e5e8;
}

.social-login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.social-login {
  height: 46px;
  border-radius: 0;
  font-weight: 800;
  font-size: 14px;
}

.google-login {
  background: #fff;
  color: #202124;
  border: 1px solid #dadde1;
}

.kakao-login {
  background: #fee500;
  color: #191919;
  border: 1px solid #fee500;
}

.google-login:hover {
  background: #f8f9fa;
  color: #202124;
}

.kakao-login:hover {
  background: #f6dc00;
  color: #191919;
}

.validation-summary-valid,
.field-validation-valid {
  display: none;
}

@media (max-width: 480px) {
  .login-box {
    width: min(390px, calc(100vw - 28px));
  }

  .login-card {
    padding: 22px 18px 30px;
  }

  .social-login-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row,
  .search-row,
  .edit-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: span 1; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .dashboard-grid,
  .parking-layout,
  .two-panel { grid-template-columns: 1fr; }
  .parking-summary,
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-row { grid-template-columns: 1fr; }
}

@media print {
  body {
    background: #fff;
  }

  .app-header,
  .no-print {
    display: none !important;
  }

  .container-fluid,
  .page-shell {
    margin: 0;
    padding: 0;
    max-width: none;
  }

  .report-paper {
    border: 0;
    padding: 0;
  }
}
