/* Simmons Boot UI theme adapted from the OCI CRM design system. */
:root {
  --fsb-font: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
  --oci-red: #E63329;
  --oci-red-dark: #B5261E;
  --oci-red-light: #FCE9E8;
  --oci-black: #1A1A1A;
  --primary: #E63329;
  --primary-dark: #B5261E;
  --primary-light: #FCE9E8;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --surface-3: #F1F3F5;
  --border: #E4E7EB;
  --border-2: #D5D9DF;
  --text-1: #1F2329;
  --text-2: #4E5969;
  --text-3: #86909C;
  --text-4: #B0B6BF;
  --blue: #1664E5;
  --blue-light: #E6F0FE;
  --green: #00A86B;
  --green-light: #E6F7EF;
  --amber: #F59C00;
  --amber-light: #FFF6E5;
  --red: #E63329;
  --red-light: #FCE9E8;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --sidebar-w: 220px;
  --topbar-h: 56px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--text-1);
}

body {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.simmons-app-shell {
  display: flex;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

.simmons-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease;
}

/* 사이드바 토글 (접기/펼치기) */
.simmons-app-shell.sidebar-collapsed .simmons-sidebar {
  width: 64px;
  flex-basis: 64px;
}
/* 접힘 모드: 좁게 + 아이콘만 표시(글자/섹션제목/푸터 숨김) */
.sidebar-collapsed .sidebar-head { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-collapsed .sidebar-head .sidebar-logo { display: none; }
.sidebar-collapsed .nav-section-title { display: none; }
.sidebar-collapsed .nav-item-link {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
  font-size: 0;            /* 글자 라벨 숨김 (아이콘은 고정 크기라 유지) */
}
.sidebar-collapsed .nav-badge { display: none; }
.sidebar-collapsed .sidebar-footer { display: none; }
.sidebar-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-logo img {
  max-width: 126px;
  max-height: 36px;
  object-fit: contain;
}

.sidebar-logo-ic {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-divider {
  width: 1px;
  height: 18px;
  background: var(--border-2);
}

.logo-sub {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}

.logo-sub strong {
  color: var(--oci-red);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-section {
  padding: 6px 0;
}

.nav-section-title {
  padding: 6px 16px;
  color: var(--text-4);
  font-size: 10px;
  font-weight: 700;
}

.nav-item-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 16px;
  color: var(--text-2);
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
}

.nav-item-link:hover {
  background: var(--surface-3);
  color: var(--text-1);
}

.nav-item-link.is-disabled {
  cursor: default;
  pointer-events: none;
}

.nav-item-link.active {
  background: var(--oci-red-light);
  color: var(--oci-red);
  font-weight: 700;
}

.nav-item-link.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--oci-red);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: currentColor;
  opacity: 0.78;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--amber-light);
  color: #B87200;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-name {
  color: var(--text-1);
  font-size: 12px;
  font-weight: 700;
}

.user-role {
  color: var(--text-3);
  font-size: 10px;
}

.simmons-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.page-title {
  margin: 0;
  color: var(--text-1);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.page-breadcrumb {
  padding-left: 10px;
  border-left: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
}

/* 세션 시간 알약 */
.topbar-session {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.topbar-session svg { opacity: 0.7; }

/* 헤더 아이콘 버튼(알림 등) */
.topbar-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.topbar-icon-btn:hover { background: var(--surface-3); color: var(--text-1); }

.topbar-logout-form {
  display: inline-flex;
  margin: 0;
}

/* 구분선 */
.topbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 2px;
}

/* 접속 사용자 이름 */
.topbar-user {
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.simmons-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  background: var(--surface);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-header h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 20px;
  font-weight: 800;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 버튼 시스템(.btn/.btn-primary/.btn-danger/.btn-outline-secondary/.btn-ghost/.btn-xs)은
   fingersales.css 로 이동 — screen-common.css 의 .lead-* 별칭과 통합됨. */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.card-title {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--metric-color, var(--oci-red));
}

.metric-label {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-top: 8px;
  color: var(--text-1);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 25px;
  font-weight: 700;
}

.metric-sub {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.badge-red {
  background: var(--red-light);
  color: var(--red);
}

.badge-green {
  background: var(--green-light);
  color: #0F7A3F;
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-amber {
  background: var(--amber-light);
  color: #B87200;
}

.badge-gray {
  background: var(--gray-light);
  color: var(--gray);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 12px;
}

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

.placeholder-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-3);
  text-align: center;
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-row strong {
  color: var(--text-1);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
}

.stat-row span:first-child {
  color: var(--text-3);
  font-size: 12px;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: -20px -24px 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(245, 246, 248, 0.96);
}

/* .form-field 는 screen-common.css 가 전담(컨테이너+label 전체 스타일) — 여기서는 겹치지 않게
   실제 전용 클래스인 .filter-field 만 건다(admin 목록 화면 필터바 — core/resource.html, calendar.html 전용). */
.filter-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 34px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text-1);
  font-size: 13px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--oci-red);
  box-shadow: 0 0 0 3px rgba(230, 51, 41, 0.12);
}

.form-check-input {
  accent-color: var(--oci-red);
}

.form-check-input:checked {
  border-color: var(--oci-red);
  background-color: var(--oci-red);
}

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

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
}

.data-table td {
  color: var(--text-1);
  font-size: 12px;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--surface-2);
}

.data-table tr.active td,
.data-table tr.active:hover td {
  background: var(--oci-red-light);
}

/* 셀 전체 중앙 정렬 변형 (헤더 + 본문) */
.data-table--center th,
.data-table--center td {
  text-align: center;
}

/* ---------- 페이지네이션 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 14px 12px;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pagination-btn:hover:not(:disabled):not(.is-active) {
  background: var(--surface-2);
  color: var(--text-1);
}

.pagination-btn.is-active {
  background: var(--oci-red);
  border-color: var(--oci-red);
  color: #fff;
  cursor: default;
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 토스트 알림은 Bootstrap Toast(컴포넌트) 사용 — 커스텀 스타일 없음(toast.js 참고). */

.resource-filter-bar {
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto auto;
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 12px;
  align-items: start;
}

.resource-list-card {
  min-width: 0;
}

.resource-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.resource-detail-grid,
.resource-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-form-card {
  scroll-margin-top: 12px;
}

.role-mapping-card {
  scroll-margin-top: 12px;
}

.role-mapping-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.role-mapping-tab {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.role-mapping-tab.is-active {
  border-color: var(--oci-red);
  background: var(--oci-red-light);
  color: var(--oci-red);
}

.role-mapping-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.role-mapping-status {
  min-height: 18px;
  margin-bottom: 8px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}

.role-mapping-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
  padding-right: 2px;
}

.role-mapping-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 58px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
}

.role-mapping-row:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
}

.role-mapping-row .form-check-input {
  margin: 2px 0 0;
}

.role-mapping-row-body {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.role-mapping-row-body strong {
  overflow-wrap: anywhere;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.role-mapping-row-body span {
  overflow-wrap: anywhere;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.35;
}

.role-mapping-empty {
  min-height: 72px;
}

.resource-row {
  cursor: pointer;
}

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

.detail-item {
  min-height: 66px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.detail-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
}

.detail-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-section-title,
.form-section-title {
  margin: 18px 0 10px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
}

.detail-memo {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty {
  padding: 36px 16px;
  color: var(--text-3);
  text-align: center;
}

.department-filter-bar {
  grid-template-columns: minmax(220px, 360px) auto auto;
  justify-content: start;
}

.department-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr);
  gap: 12px;
  align-items: start;
}

.department-tree-card,
.department-detail-card {
  min-height: 446px;
}

.department-tree {
  display: grid;
  max-height: 392px;
  overflow: auto;
  padding: 6px;
}

.department-tree-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  text-align: left;
}

.department-tree-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.department-tree-item:hover,
.department-tree-item.active {
  background: var(--surface-2);
  color: var(--text-1);
}

.department-tree-item.active {
  box-shadow: inset 3px 0 0 var(--oci-red);
}

.department-tree-toggle {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  background: var(--surface);
}

.department-tree-toggle::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(-45deg);
}

.department-tree-toggle.is-expanded::before {
  left: 5px;
  top: 3px;
  transform: rotate(45deg);
}

.department-tree-toggle.is-empty {
  border-color: transparent;
  background: transparent;
}

.department-tree-toggle.is-empty::before {
  display: none;
}

.department-tree-name,
.department-tree-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-tree-name {
  font-weight: 700;
}

.department-tree-code {
  color: var(--text-3);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.department-tree-empty {
  padding: 36px 16px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

.department-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.department-list-card {
  margin-top: 12px;
}

.agreement-section {
  display: grid;
  gap: 16px;
}

.agreement-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.agreement-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.agreement-block-header h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 800;
}

.agreement-block-body {
  padding: 14px;
}

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

.signature-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.signature-title {
  margin-bottom: 8px;
  color: var(--text-2);
  font-weight: 800;
}

.signature-canvas-wrap {
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
}

.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--oci-black);
}

.login-brand {
  position: relative;
  flex: 1 1 58%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(45, 48, 55, 0.94) 62%, rgba(230, 51, 41, 0.88) 100%);
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  width: min(620px, 84%);
  color: #fff;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 46px;
}

.login-brand-logo img {
  max-height: 48px;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-brand-label {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-left: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.login-brand h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.22;
}

.login-brand h1 strong {
  color: #FFB4AD;
}

.login-brand p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.login-feature-list {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.login-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--oci-red);
  box-shadow: 0 0 0 4px rgba(230, 51, 41, 0.22);
}

.login-panel {
  flex: 0 0 42%;
  min-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--surface);
}

.login-card {
  width: min(390px, 100%);
}

.login-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-chip {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--oci-red-light);
  color: var(--oci-red);
  font-size: 12px;
  font-weight: 800;
}

.login-card-header h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 26px;
  font-weight: 900;
}

.login-card-header p {
  margin: 8px 0 0;
  color: var(--text-3);
}

.login-input {
  position: relative;
  margin-bottom: 14px;
}

.login-input input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.login-input input:focus {
  border-color: var(--oci-red);
  box-shadow: 0 0 0 3px rgba(230, 51, 41, 0.12);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
  color: var(--text-2);
}

.login-submit {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--oci-red), var(--oci-red-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--text-3);
  font-size: 12px;
}

.auth-footer {
  position: fixed;
  left: 24px;
  bottom: 18px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.auth-footer p {
  margin: 2px 0;
}

.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.coming-soon .card {
  max-width: 560px;
  width: 100%;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .grid-3,
  .department-layout {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .simmons-app-shell {
    min-height: 100vh;
    height: auto;
  }

  .simmons-sidebar {
    display: flex;
  }

  .topbar {
    padding: 0 14px;
  }

  .page-breadcrumb,
  .topbar-right .topbar-date {
    display: none;
  }

  .simmons-content {
    padding: 16px 14px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .filter-bar,
  .detail-grid,
  .signature-grid,
  .department-filter-bar,
  .department-layout {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: static;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: none;
    background: transparent;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    min-width: 0;
    flex: 1 1 100%;
  }

  .auth-footer {
    display: none;
  }
}

/* Revenue management */
.revenue-management {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.revenue-toolbar {
  padding: 12px;
}

.revenue-filter-grid,
.revenue-form-grid,
.revenue-split-tools {
  display: grid;
  gap: 10px;
}

.revenue-filter-grid {
  grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(130px, 1fr)) auto;
  align-items: end;
}

.revenue-form-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.revenue-split-tools {
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto auto 1fr;
  align-items: end;
  margin: 14px 0;
}

.revenue-field-wide {
  grid-column: span 2;
}

.revenue-filter-grid label,
.revenue-form-grid label,
.revenue-split-tools label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.revenue-filter-grid input,
.revenue-filter-grid select,
.revenue-form-grid input,
.revenue-form-grid select,
.revenue-split-tools input,
.revenue-split-tools select,
.revenue-edit-table input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  padding: 6px 8px;
  font-size: 12px;
}

.revenue-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.revenue-side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.revenue-list-card,
.revenue-detail-card,
.revenue-monthly-card,
.revenue-form-card {
  min-width: 0;
}

.revenue-table td:first-child strong {
  display: block;
  color: var(--text-1);
  font-weight: 800;
}

.revenue-table td:first-child small {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10px;
}

.revenue-group-row {
  cursor: pointer;
}

.revenue-group-row:hover,
.revenue-group-row.is-selected {
  background: var(--surface-3);
}

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

.revenue-summary-grid div {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 8px;
}

.revenue-summary-grid span {
  display: block;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
}

.revenue-summary-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 11px;
  padding: 2px 8px;
  background: var(--gray-light);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 800;
}

.status-planned {
  background: var(--amber-light);
  color: #9A5C00;
}

.status-confirmed {
  background: var(--green-light);
  color: #047857;
}

.status-canceled {
  background: var(--red-light);
  color: var(--red);
}

.type-chip {
  background: var(--blue-light);
  color: var(--blue);
}

.revenue-row-actions {
  display: flex;
  gap: 6px;
  min-width: 108px;
}

.compact-table th,
.compact-table td,
.revenue-line-table th,
.revenue-line-table td,
.revenue-edit-table th,
.revenue-edit-table td {
  white-space: nowrap;
}

.revenue-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.revenue-balance {
  font-size: 12px;
  font-weight: 800;
}

.revenue-balance.is-ok {
  color: var(--green);
}

.revenue-balance.is-error {
  color: var(--red);
}

@media (max-width: 1180px) {
  .revenue-workspace {
    grid-template-columns: 1fr;
  }

  .revenue-filter-grid,
  .revenue-form-grid,
  .revenue-split-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .revenue-filter-grid,
  .revenue-form-grid,
  .revenue-split-tools,
  .revenue-summary-grid {
    grid-template-columns: 1fr;
  }

  .revenue-form-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
