/* ==================================================
   Admin CSS — かいごの相談所 管理画面
   ================================================== */

:root {
  --adm-primary:       #C0562A;
  --adm-primary-dark:  #9C4220;
  --adm-primary-light: #F4DDD0;
  --adm-primary-pale:  #FDF7F4;
  --adm-secondary:     #3A9688;
  --adm-secondary-lt:  #CBE8E4;
  --adm-accent:        #E09618;
  --adm-accent-lt:     #FEF2D8;
  --adm-danger:        #CC3B3B;
  --adm-success:       #2D8A58;
  --adm-bg:            #F5F1ED;
  --adm-surface:       #FFFFFF;
  --adm-text:          #2A1A0F;
  --adm-text-sub:      #9A7868;
  --adm-text-hint:     #C8AFA3;
  --adm-border:        #EDE4DB;
  --adm-border-lt:     #F6F0EB;
  --adm-sidebar-bg:    #2A1A0F;
  --adm-sidebar-text:  #E8D8CC;
  --adm-font:          'Noto Sans JP', sans-serif;
  --adm-r-sm:          8px;
  --adm-r-md:          12px;
  --adm-r-lg:          16px;
  --adm-sh-sm:         0 1px 3px rgba(42,26,15,.06), 0 1px 2px rgba(42,26,15,.04);
  --adm-sh-md:         0 4px 16px rgba(42,26,15,.07), 0 1px 4px rgba(42,26,15,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--adm-font);
  background: var(--adm-bg);
  color: var(--adm-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--adm-font); }
ul, ol { list-style: none; }

/* ==================================================
   Sidebar
   ================================================== */
.adm-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--adm-sidebar-bg);
  color: var(--adm-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.adm-sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.adm-sidebar-logo {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
}

.adm-sidebar-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
  letter-spacing: .06em;
}

.adm-sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--adm-r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--adm-sidebar-text);
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.adm-nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.adm-nav-item.active {
  background: var(--adm-primary);
  color: #fff;
}

.adm-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.adm-sidebar-footer {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.adm-nav-logout { color: rgba(255,255,255,.5); }
.adm-nav-logout:hover { color: #fff; background: rgba(204,59,59,.3); }

/* ==================================================
   Main Content
   ================================================== */
.adm-main {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

.adm-header {
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--adm-text);
}

.adm-header-user {
  font-size: 13px;
  color: var(--adm-text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--adm-primary-light);
  color: var(--adm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.adm-body {
  padding: 28px 32px;
}

/* ==================================================
   Cards
   ================================================== */
.adm-card {
  background: var(--adm-surface);
  border-radius: var(--adm-r-lg);
  box-shadow: var(--adm-sh-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.adm-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-card-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--adm-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==================================================
   Stats Grid
   ================================================== */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.adm-stat {
  background: var(--adm-surface);
  border-radius: var(--adm-r-md);
  box-shadow: var(--adm-sh-sm);
  padding: 20px;
  text-align: center;
}

.adm-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.adm-stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-stat-icon.coral  { background: linear-gradient(135deg, #E17A4C, #C0562A); }
.adm-stat-icon.teal   { background: linear-gradient(135deg, #57B7A7, #3A9688); }
.adm-stat-icon.blue   { background: linear-gradient(135deg, #5A9FD6, #3D86BE); }
.adm-stat-icon.gold   { background: linear-gradient(135deg, #F0B443, #E09618); }

.adm-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--adm-text);
  line-height: 1.2;
}

.adm-stat-value .adm-stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--adm-text-sub);
  margin-left: 2px;
}

.adm-stat-label {
  font-size: 12px;
  color: var(--adm-text-sub);
  margin-top: 4px;
}

.adm-stat-change {
  font-size: 11px;
  margin-top: 6px;
  font-weight: 700;
}

.adm-stat-change.up   { color: var(--adm-success); }
.adm-stat-change.down { color: var(--adm-danger); }

/* ==================================================
   Chart Placeholder
   ================================================== */
.adm-chart-placeholder {
  background: var(--adm-bg);
  border-radius: var(--adm-r-sm);
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.adm-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  width: 100%;
  max-width: 500px;
  padding: 0 10px;
}

.adm-chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.adm-chart-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--adm-primary), var(--adm-primary-dark));
  transition: height .3s;
}

.adm-chart-bar-label {
  font-size: 10px;
  color: var(--adm-text-sub);
  white-space: nowrap;
}

/* ==================================================
   Content Ranking
   ================================================== */
.adm-ranking {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-lt);
}

.adm-ranking-item:last-child { border-bottom: none; }

.adm-ranking-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--adm-primary-pale);
  color: var(--adm-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-ranking-item:nth-child(1) .adm-ranking-num {
  background: var(--adm-primary);
  color: #fff;
}

.adm-ranking-item:nth-child(2) .adm-ranking-num {
  background: var(--adm-primary-light);
  color: var(--adm-primary-dark);
}

.adm-ranking-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.adm-ranking-bar-wrap {
  flex: 2;
  height: 8px;
  background: var(--adm-border-lt);
  border-radius: 4px;
  overflow: hidden;
}

.adm-ranking-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--adm-primary), var(--adm-primary-dark));
}

.adm-ranking-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text);
  min-width: 45px;
  text-align: right;
}

/* ==================================================
   Time Distribution
   ================================================== */
.adm-time-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.adm-time-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  gap: 2px;
}

.adm-time-cell .time-label {
  font-size: 9px;
  color: var(--adm-text-sub);
}

.adm-time-cell .time-val {
  font-size: 11px;
  font-weight: 700;
}

.adm-time-cell.heat-0 { background: var(--adm-border-lt); color: var(--adm-text-hint); }
.adm-time-cell.heat-1 { background: #FEF2D8; color: #B97707; }
.adm-time-cell.heat-2 { background: #F4DDD0; color: #9C4220; }
.adm-time-cell.heat-3 { background: var(--adm-primary-light); color: var(--adm-primary-dark); }
.adm-time-cell.heat-4 { background: var(--adm-primary); color: #fff; }

/* ==================================================
   Table
   ================================================== */
.adm-table-wrap {
  overflow-x: auto;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.adm-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-text-sub);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 14px;
  border-bottom: 2px solid var(--adm-border);
  white-space: nowrap;
}

.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--adm-border-lt);
  vertical-align: middle;
}

.adm-table tbody tr:hover {
  background: var(--adm-primary-pale);
}

.adm-table .adm-emp-name {
  font-weight: 500;
}

.adm-table .adm-emp-email {
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.adm-badge.active   { background: #DFF5E8; color: var(--adm-success); }
.adm-badge.inactive { background: #FDF0F0; color: var(--adm-danger); }

.adm-table-actions {
  display: flex;
  gap: 6px;
}

.adm-action-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  color: var(--adm-text);
  cursor: pointer;
  transition: background .15s;
}

.adm-action-btn:hover { background: var(--adm-bg); }
.adm-action-btn.danger { color: var(--adm-danger); border-color: #F5CCCC; }
.adm-action-btn.danger:hover { background: #FDF0F0; }

/* ==================================================
   Buttons
   ================================================== */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--adm-r-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.adm-btn:active { transform: translateY(1px); }

.adm-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-btn-primary {
  background: var(--adm-primary);
  color: #fff;
}

.adm-btn-primary:hover { background: var(--adm-primary-dark); }

.adm-btn-secondary {
  background: var(--adm-surface);
  color: var(--adm-text);
  border: 1px solid var(--adm-border);
}

.adm-btn-secondary:hover { background: var(--adm-bg); }

/* ==================================================
   Form
   ================================================== */
.adm-form-group {
  margin-bottom: 20px;
}

.adm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 6px;
}

.adm-form-label .required {
  color: var(--adm-danger);
  font-size: 11px;
  margin-left: 4px;
}

.adm-form-input,
.adm-form-select {
  width: 100%;
  max-width: 400px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--adm-r-sm);
  font-family: var(--adm-font);
  font-size: 14px;
  color: var(--adm-text);
  background: var(--adm-surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.adm-form-input:focus,
.adm-form-select:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px rgba(192,86,42,.1);
}

.adm-form-input::placeholder {
  color: var(--adm-text-hint);
}

.adm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.adm-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--adm-border);
}

/* ==================================================
   Grid Layouts
   ================================================== */
.adm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.adm-grid-3-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* ==================================================
   Dashboard
   ================================================== */
.adm-dashboard-filter {
  padding: 18px 20px;
}

.adm-dashboard-filter-form {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.adm-dashboard-filter-fields {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

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

.adm-dashboard-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-text-sub);
}

.adm-dashboard-filter-input {
  width: 188px;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--adm-r-sm);
  font-family: var(--adm-font);
  font-size: 14px;
  color: var(--adm-text);
  background: var(--adm-surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.adm-dashboard-filter-input:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px rgba(192,86,42,.1);
}

.adm-dashboard-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-dashboard-filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.adm-dashboard-preset {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--adm-border);
  background: var(--adm-bg);
  color: var(--adm-text-sub);
  font-size: 12px;
  font-weight: 700;
  transition: background .15s, color .15s, border-color .15s;
}

.adm-dashboard-preset:hover {
  background: var(--adm-primary-pale);
  border-color: rgba(192,86,42,.2);
  color: var(--adm-primary-dark);
}

.adm-dashboard-filter-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--adm-text-sub);
}

.adm-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.adm-dashboard-copy {
  flex: 1;
  min-width: 0;
}

.adm-dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 10px;
}

.adm-dashboard-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--adm-primary);
}

.adm-dashboard-title {
  font-size: 24px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.adm-dashboard-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--adm-text-sub);
}

.adm-dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.adm-dashboard-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--adm-primary-pale);
  color: var(--adm-primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.adm-insight-grid {
  width: 360px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  flex-shrink: 0;
}

.adm-insight-card {
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r-md);
  padding: 16px;
}

.adm-insight-label {
  font-size: 12px;
  color: var(--adm-text-sub);
  font-weight: 700;
}

.adm-insight-value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.adm-insight-unit {
  font-size: 13px;
  color: var(--adm-text-sub);
  margin-left: 3px;
}

.adm-insight-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-card-sub {
  margin-top: -8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--adm-text-sub);
  line-height: 1.7;
}

.adm-chart-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}

.adm-legend-dot.primary {
  background: var(--adm-primary);
}

.adm-funnel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-funnel-step {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--adm-border-lt);
}

.adm-funnel-step:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.adm-funnel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.adm-funnel-label {
  font-size: 13px;
  font-weight: 700;
}

.adm-funnel-count {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
}

.adm-funnel-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--adm-border-lt);
  overflow: hidden;
}

.adm-funnel-fill {
  min-width: 14px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--adm-primary), var(--adm-primary-dark));
}

.adm-funnel-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-mini-table {
  display: flex;
  flex-direction: column;
}

.adm-mini-table-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 60px 80px minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--adm-border-lt);
}

.adm-mini-table-row:last-child {
  border-bottom: none;
}

.adm-mini-table-row.head {
  padding-top: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-text-sub);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.adm-mini-table-label {
  font-size: 13px;
  font-weight: 600;
}

.adm-mini-table-count {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
}

.adm-mini-table-trend {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-success);
}

.adm-mini-table-source {
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.adm-signal-card {
  padding: 16px;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r-md);
  background: var(--adm-bg);
}

.adm-signal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.adm-signal-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-signal-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-signal-icon.coral { background: linear-gradient(135deg, #E17A4C, #C0562A); }
.adm-signal-icon.teal { background: linear-gradient(135deg, #57B7A7, #3A9688); }
.adm-signal-icon.blue { background: linear-gradient(135deg, #5A9FD6, #3D86BE); }
.adm-signal-icon.gold { background: linear-gradient(135deg, #F0B443, #E09618); }

.adm-signal-title {
  font-size: 13px;
  font-weight: 700;
}

.adm-signal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-signal-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.adm-signal-item-label {
  color: var(--adm-text-sub);
}

.adm-signal-item-value {
  font-weight: 700;
}

.adm-module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.adm-module-card {
  padding: 16px;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r-md);
  background: var(--adm-bg);
}

.adm-module-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.adm-module-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--adm-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-module-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-module-title {
  font-size: 14px;
  font-weight: 700;
}

.adm-module-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-module-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.6;
}

.adm-module-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--adm-primary);
}

.adm-privacy-note {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--adm-primary-pale);
  border-radius: var(--adm-r-sm);
  font-size: 12px;
  color: var(--adm-text-sub);
  line-height: 1.7;
}

.adm-anim-fade {
  opacity: 0;
  transform: translateY(16px);
  animation: admFadeUp .5s ease forwards;
  animation-delay: var(--anim-delay, 0s);
}

@keyframes admFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.adm-anim-change {
  opacity: 0;
  animation: admFadeIn .4s ease forwards;
  animation-delay: 1.2s;
}

@keyframes admFadeIn {
  to { opacity: 1; }
}

.adm-bar-anim {
  transition: height .8s cubic-bezier(.22,.61,.36,1);
}

.adm-bar-anim-w {
  transition: width .8s cubic-bezier(.22,.61,.36,1);
}

.adm-stat-note {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--adm-text-sub);
}

.adm-stats .adm-stat:nth-child(n+5) {
  display: none;
}

.adm-dashboard-focus-grid {
  margin-bottom: 20px;
  align-items: stretch;
}

.adm-dashboard-legacy {
  display: none;
}

.adm-donut-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.adm-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.adm-donut-chart {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(from -90deg, var(--adm-border-lt) 0 100%);
  box-shadow: inset 0 0 0 1px rgba(42,26,15,.05), 0 10px 24px rgba(42,26,15,.08);
  opacity: .5;
  transform: scale(.92) rotate(-18deg);
  transition: transform .9s cubic-bezier(.22,.61,.36,1), opacity .5s ease;
}

.adm-donut-chart.is-animated {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.adm-donut-hole {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: var(--adm-surface);
  box-shadow: inset 0 0 0 1px var(--adm-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.adm-donut-total {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--adm-text);
}

.adm-donut-unit {
  margin-top: 4px;
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.adm-donut-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--adm-border-lt);
  border-radius: var(--adm-r-sm);
  background: #FFFCFA;
}

.adm-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.adm-donut-label {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-text);
}

.adm-donut-rate {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-primary-dark);
}

.adm-donut-count {
  font-size: 12px;
  color: var(--adm-text-sub);
}

.adm-demand-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.adm-demand-group {
  padding: 16px;
  border-radius: var(--adm-r-md);
  border: 1px solid var(--adm-border);
  background: var(--adm-bg);
}

.adm-demand-title {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-text);
}

.adm-demand-item + .adm-demand-item {
  margin-top: 12px;
}

.adm-demand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--adm-text);
}

.adm-demand-top strong {
  flex-shrink: 0;
  color: var(--adm-primary-dark);
}

.adm-demand-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--adm-border);
}

.adm-demand-fill {
  height: 100%;
  border-radius: 999px;
}

.adm-demand-fill.high {
  background: linear-gradient(90deg, #E17A4C, #C0562A);
}

.adm-demand-fill.low {
  background: linear-gradient(90deg, #BFAFA4, #8E776B);
}

.adm-time-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-time-bar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--adm-r-sm);
  border: 1px solid transparent;
  background: var(--adm-bg);
}

.adm-time-bar-row.is-peak {
  background: #FFF6F1;
  border-color: rgba(192,86,42,.2);
}

.adm-time-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-text-sub);
}

.adm-time-bar-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--adm-border);
}

.adm-time-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #E09618, #C0562A);
}

.adm-time-bar-value {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-text);
}

.adm-time-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--adm-text-sub);
}

/* ==================================================
   Login Page
   ================================================== */
body.adm-login {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(160deg, #2A1A0F 0%, #3D2A1C 50%, #4A3528 100%);
}

.adm-login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  gap: 0;
}

.adm-login-brand {
  text-align: center;
  margin-bottom: 40px;
}

.adm-login-logo-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}

.adm-login-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.2);
}

.adm-login-logo {
  font-size: 22px;
  font-weight: 700;
  color: #F5E3D5;
  line-height: 1.3;
  letter-spacing: .02em;
}

.adm-login-sub {
  font-size: 12px;
  color: var(--adm-primary);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(192,86,42,.15);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(192,86,42,.3);
  font-weight: 700;
  letter-spacing: .04em;
}

.adm-login-sub::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--adm-primary);
}

.adm-login-card {
  width: 100%;
  max-width: 360px;
  background: var(--adm-surface);
  border-radius: var(--adm-r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 32px 28px 28px;
}

.adm-login-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 20px;
  text-align: center;
}

.adm-login-field {
  position: relative;
  margin-bottom: 16px;
}

.adm-login-field-email .adm-login-field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--adm-text-hint);
}

.adm-login-field-email .adm-login-field-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-login-field-email .adm-login-input {
  padding-right: 48px;
  letter-spacing: 0;
}

.adm-login-input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 18px;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--adm-r-md);
  font-family: var(--adm-font);
  font-size: 16px;
  letter-spacing: .12em;
  color: var(--adm-text);
  background: var(--adm-bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.adm-login-input:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px rgba(192,86,42,.12);
  background: var(--adm-surface);
}

.adm-login-input::placeholder {
  letter-spacing: .04em;
  color: var(--adm-text-hint);
  font-size: 14px;
}

.adm-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--adm-text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
}

.adm-toggle-pw svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-login-error {
  display: none;
  font-size: 13px;
  color: var(--adm-danger);
  margin: -12px 0 14px;
  padding: 8px 12px;
  background: #FDF0F0;
  border-radius: var(--adm-r-sm);
  border: 1px solid #F5CCCC;
}

.adm-login-error.show {
  display: block;
}

.adm-login-btn {
  width: 100%;
  height: 54px;
  background: var(--adm-sidebar-bg);
  color: #fff;
  border: none;
  border-radius: var(--adm-r-md);
  font-family: var(--adm-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transition: background .15s, transform .1s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.adm-login-btn:active {
  background: #1A100A;
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.adm-login-btn:hover {
  background: #1A100A;
}

.adm-login-btn svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adm-login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--adm-text-sub);
  margin-top: 20px;
  line-height: 1.7;
}

/* ==================================================
   Responsive
   ================================================== */
@media (max-width: 1024px) {
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-grid-2, .adm-grid-3-1 { grid-template-columns: 1fr; }
  .adm-dashboard-head { flex-direction: column; }
  .adm-insight-grid { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .adm-module-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-dashboard-filter-form { align-items: flex-start; }
  .adm-donut-layout { grid-template-columns: 1fr; }
  .adm-demand-columns { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .adm-sidebar { width: 200px; }
  .adm-main { margin-left: 200px; }
  .adm-header { padding: 16px 20px; }
  .adm-body { padding: 20px; }
  .adm-dashboard-title { font-size: 20px; }
  .adm-dashboard-filter-fields,
  .adm-dashboard-filter-actions { width: 100%; }
  .adm-dashboard-filter-field,
  .adm-dashboard-filter-input { width: 100%; }
  .adm-insight-grid,
  .adm-signal-grid,
  .adm-module-grid { grid-template-columns: 1fr; }
  .adm-donut-chart { width: 200px; }
  .adm-donut-row {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    row-gap: 2px;
  }
  .adm-donut-count { grid-column: 2 / 4; }
  .adm-time-bar-row {
    grid-template-columns: 52px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 8px 10px;
  }
  .adm-mini-table-row { grid-template-columns: minmax(0, 1.5fr) 52px 72px; }
  .adm-mini-table-source,
  .adm-mini-table-row.head .adm-mini-table-source { display: none; }
}
