:root {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --destructive: #ef4444;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #18181b;
  --success-bg: #dcfce7;
  --success-fg: #166534;
  --warning-bg: #fef3c7;
  --warning-fg: #92400e;
  --danger-bg: #fee2e2;
  --danger-fg: #991b1b;
  --radius: .5rem;
  --sidebar-bg: #fafafa;
  --sidebar-fg: #3f3f46;
  --sidebar-accent: #f4f4f5;
  --sidebar-border: #e4e4e7;
  --sidebar-width: 264px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
ol, ul { list-style: none; }

.text-sm { font-size: 14px; line-height: 20px; }
.text-xs { font-size: 12px; line-height: 16px; }
.text-muted { color: var(--muted-foreground); }
.font-medium { font-weight: 500; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.max-w-sm { max-width: 420px; }

.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-xs { width: 12px; height: 12px; }

.dashboard-container { width: 100%; min-height: 100vh; display: flex; background: var(--background); }
.sidebar { width: var(--sidebar-width); min-width: var(--sidebar-width); min-height: 100vh; background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; position: sticky; top: 0; }
.sidebar-header { padding: 8px; }
.sidebar-content { flex: 1; overflow-y: auto; padding: 0 8px; }
.sidebar-footer { padding: 8px; border-top: 1px solid var(--sidebar-border); }
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu-button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 14px; color: var(--sidebar-fg); text-align: left; transition: background-color .15s ease; }
.sidebar-menu-button:hover, .sidebar-menu-button.is-active { background: var(--sidebar-accent); }
.sidebar-menu-button.is-active { font-weight: 600; }
.sidebar-menu-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-menu-title { font-size: 14px; font-weight: 600; line-height: 20px; color: var(--sidebar-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-menu-subtitle { font-size: 12px; line-height: 16px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-menu-sub { margin-left: 24px; padding-left: 12px; border-left: 1px solid var(--sidebar-border); display: flex; flex-direction: column; gap: 2px; padding-top: 2px; padding-bottom: 8px; }
.sidebar-menu-sub-button { display: block; padding: 4px 8px; border-radius: 6px; font-size: 13px; color: var(--sidebar-fg); }
.logout-button { color: var(--destructive); }
.footer-user { pointer-events: none; }

.avatar-square, .avatar-circle { width: 32px; height: 32px; background: var(--primary); color: var(--primary-foreground); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; letter-spacing: -.4px; }
.avatar-square { border-radius: 6px; }
.avatar-circle { border-radius: 50%; }
.avatar-lg { width: 52px; height: 52px; font-size: 19px; }

.main-content { flex: 1; min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.content-header { display: flex; align-items: center; gap: 8px; height: 36px; }
.trigger-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--background); color: var(--foreground); transition: background-color .15s ease; }
.trigger-btn:hover { background: var(--accent); }
.separator-v { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.breadcrumb-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb-link { font-size: 14px; color: var(--muted-foreground); }
.breadcrumb-page { font-size: 14px; color: var(--foreground); }
.breadcrumb-sep { color: var(--muted-foreground); display: flex; align-items: center; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-heading h1 { font-size: 28px; line-height: 36px; letter-spacing: -.7px; }
.page-heading p { color: var(--muted-foreground); margin-top: 4px; }
.eyebrow { font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); font-weight: 700; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-label { font-size: 14px; color: var(--muted-foreground); }
.card-value { font-size: 26px; font-weight: 750; line-height: 32px; letter-spacing: -.5px; }
.stat-card { min-height: 136px; }

.badge, .status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 9999px; font-size: 12px; font-weight: 650; line-height: 16px; white-space: nowrap; }
.badge-success, .status-success { background: var(--success-bg); color: var(--success-fg); }
.badge-warning, .status-warning { background: var(--warning-bg); color: var(--warning-fg); }
.badge-danger, .status-danger { background: var(--danger-bg); color: var(--danger-fg); }
.status-lg { padding: 6px 12px; font-size: 13px; }

.table-section { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.table-wrapper { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; flex: 1; display: flex; flex-direction: column; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead { background: var(--muted); }
.table th { height: 42px; padding: 0 16px; text-align: left; font-size: 13px; font-weight: 650; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { min-height: 56px; padding: 12px 16px; color: var(--foreground); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--muted); }
.table tbody tr:last-child td { border-bottom: none; }
.clickable-row { cursor: pointer; }
.empty-cell { text-align: center; color: var(--muted-foreground); padding: 32px !important; }

.input { height: 38px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); color: var(--foreground); font-size: 14px; outline: none; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: border-color .15s ease, box-shadow .15s ease; }
.input-full { width: 100%; }
.input:focus { border-color: var(--ring); box-shadow: 0 0 0 2px rgba(24,24,27,.10); }
.textarea { min-height: 130px; resize: vertical; }
select.input { appearance: auto; }

.btn { min-height: 38px; padding: 8px 16px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; font-weight: 650; line-height: 20px; white-space: nowrap; transition: background-color .15s ease, opacity .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: .9; }
.btn-outline { background: var(--background); color: var(--foreground); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--accent); }
.btn-full { width: 100%; }

.checkbox { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.checkbox:checked { background: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E"); }

.alert { border-radius: 10px; padding: 12px 14px; border: 1px solid; }
.alert-success { background: var(--success-bg); color: var(--success-fg); border-color: #bbf7d0; }
.alert-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #fecaca; }
.alert.compact { font-size: 13px; }
.alert ul { margin-top: 6px; padding-left: 18px; list-style: disc; }

.request-form-card { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section, .snapshot-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 20px; }
.snapshot-card.soft { background: #fafafa; }
.snapshot-list { display: grid; gap: 10px; }
.snapshot-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.snapshot-row:last-child { border-bottom: none; }
.snapshot-row span { color: var(--muted-foreground); font-size: 13px; }
.snapshot-row strong { font-size: 15px; }
.snapshot-row small { color: var(--muted-foreground); }
.section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.section-title h2 { font-size: 18px; line-height: 26px; }
.section-title p { color: var(--muted-foreground); }
.section-index { width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); display:flex; align-items:center; justify-content:center; font-weight: 700; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field span { font-weight: 650; }
.form-field em { color: var(--destructive); font-style: normal; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-actions.no-border { border-top: none; padding-top: 0; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; align-items: start; }
.detail-card { height: 100%; }
.purpose-text { white-space: pre-wrap; color: #27272a; }
.approver-box { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.approver-box > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 15px; height: 15px; border-radius: 999px; margin-top: 3px; border: 2px solid var(--border); background: #fff; z-index: 1; }
.timeline-item.approved .timeline-dot { border-color: #16a34a; background: #dcfce7; }
.timeline-item.rejected .timeline-dot { border-color: #dc2626; background: #fee2e2; }
.timeline-content { display: flex; flex-direction: column; gap: 4px; }
.timeline-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-box { margin: 4px 0; background: #fafafa; border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: #3f3f46; }
.current-step-box, .empty-state { border: 1px solid var(--border); border-radius: 10px; background: #fafafa; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.radio-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.radio-card:hover { background: var(--muted); }
.radio-card input { accent-color: #18181b; }
.danger-text { color: var(--danger-fg); }

.login-page { min-height: 100vh; background: radial-gradient(circle at top left, #f4f4f5, #fff 42%); display:flex; align-items:center; justify-content:center; padding:24px; }
.login-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 420px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.08); }
.login-brand-panel { background: #18181b; color: #fafafa; padding: 46px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-brand-panel h1 { font-size: 34px; line-height: 40px; letter-spacing: -1px; }
.login-brand-panel p { color: rgba(250,250,250,.76); max-width: 420px; }
.login-highlights { display: flex; flex-wrap: wrap; gap: 8px; }
.login-highlights span { border: 1px solid rgba(250,250,250,.18); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.login-card { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.form-title-block h2 { font-size: 24px; line-height: 32px; }
.form-title-block p { color: var(--muted-foreground); margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.helper-text { color: var(--muted-foreground); font-size: 13px; }

nav[role="navigation"] { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted-foreground); }
nav[role="navigation"] a, nav[role="navigation"] span { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: #fff; }
nav[role="navigation"] span[aria-current="page"] span { background: var(--primary); color: #fff; }

@media (max-width: 980px) {
  .sidebar { position: fixed; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; }
  body:not(.sidebar-collapsed) .sidebar { transform: translateX(0); }
  .main-content { padding: 14px; }
  .cards-grid, .two-columns, .detail-grid, .login-shell { grid-template-columns: 1fr; }
  .approver-box { grid-template-columns: 1fr; }
  .page-heading { flex-direction: column; align-items: stretch; }
  .login-brand-panel { padding: 32px; }
  .login-card { padding: 28px; }
}

@media (max-width: 720px) {
  .responsive-table { display: block; overflow-x: auto; white-space: nowrap; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .timeline-top { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 24px; }
}

.filter-bar { margin: 16px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar .input { width: min(320px, 100%); }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.row-actions form { display: inline-flex; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.sidebar-menu-sub-button.is-active { color: var(--foreground); font-weight: 700; background: var(--muted); border-radius: 8px; }
.check-row { min-height: 42px; display: flex; align-items: center; gap: 10px; color: var(--foreground); font-weight: 650; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-stack { display: flex; flex-direction: column; gap: 8px; align-self: end; }
.mt-4 { margin-top: 16px; }
.text-muted { color: var(--muted-foreground); }
.table td .btn { white-space: nowrap; }

@media (max-width: 720px) {
  .filter-bar .input, .filter-bar .btn { width: 100%; }
  .row-actions { justify-content: flex-start; }
}
.alert-warning { background: var(--warning-bg); color: var(--warning-fg); border-color: #fed7aa; }
.is-soft-disabled { opacity: .72; }
select[multiple].input { min-height: 190px; padding-top: 8px; padding-bottom: 8px; }

/* Better multi-scope picker for User Management */
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.scope-picker { border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(180deg, #fff, #fafafa); padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); display: flex; flex-direction: column; gap: 12px; min-height: 390px; }
.scope-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scope-picker-head span { display: block; font-weight: 750; color: var(--foreground); }
.scope-picker-head small { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: 12px; line-height: 16px; font-weight: 400; }
.scope-count { flex-shrink: 0; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 9px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); font-weight: 750; }
.scope-search-wrap .input { height: 36px; background: #fff; }
.scope-selected { min-height: 34px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px dashed #d4d4d8; background: #fff; border-radius: 10px; padding: 8px; }
.scope-chip-empty { color: var(--muted-foreground); font-size: 12px; padding: 2px 3px; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid #d4d4d8; background: #f4f4f5; color: var(--foreground); border-radius: 999px; padding: 5px 8px 5px 10px; font-size: 12px; line-height: 16px; font-weight: 650; box-shadow: none; }
.scope-chip:hover { background: #e4e4e7; }
.scope-chip span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-chip small { color: var(--muted-foreground); font-weight: 750; }
.scope-chip b { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: var(--muted-foreground); font-size: 13px; line-height: 1; }
.scope-option-list { display: grid; gap: 8px; max-height: 250px; overflow: auto; padding-right: 4px; }
.scope-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.scope-option:hover { border-color: #a1a1aa; background: #fafafa; box-shadow: 0 8px 24px rgba(0,0,0,.05); transform: translateY(-1px); }
.scope-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.scope-check { width: 22px; height: 22px; border-radius: 999px; border: 1px solid #d4d4d8; background: #fff; color: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; transition: all .15s ease; }
.scope-option:has(.scope-checkbox:checked) { border-color: var(--primary); background: #f4f4f5; box-shadow: inset 0 0 0 1px var(--primary); }
.scope-option:has(.scope-checkbox:checked) .scope-check { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.scope-option-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.scope-option-body strong { display: block; color: var(--foreground); font-size: 14px; line-height: 19px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scope-option-body small { color: var(--muted-foreground); font-size: 12px; line-height: 16px; }
.scope-empty { border: 1px dashed var(--border); border-radius: 12px; padding: 14px; background: #fff; color: var(--muted-foreground); font-size: 13px; text-align: center; }
.scope-super-admin-note { margin: -4px 0 16px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.scope-super-admin-note strong { color: #78350f; }
.scope-super-admin-note span { font-size: 13px; }
.is-super-admin-scope { opacity: .58; }
.is-super-admin-scope .scope-picker { background: #fafafa; }
.is-super-admin-scope .scope-option { cursor: not-allowed; }

@media (max-width: 980px) {
  .scope-grid { grid-template-columns: 1fr; }
  .scope-picker { min-height: auto; }
  .scope-option-list { max-height: 280px; }
}

/* Search dropdown for extra approver on Approval Action */
.search-select { position: relative; display: flex; flex-direction: column; gap: 8px; }
.search-select-trigger { width: 100%; min-height: 58px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(180deg, #fff, #fafafa); padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.search-select-trigger:hover, .search-select.is-open .search-select-trigger { border-color: #a1a1aa; box-shadow: 0 0 0 3px rgba(24,24,27,.08); }
.search-select-selected { min-width: 0; display: flex; align-items: center; gap: 10px; }
.search-select-avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; font-weight: 800; flex-shrink: 0; }
.search-select-value { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.search-select-value strong { display: block; max-width: 100%; color: var(--foreground); font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-select-value small { display: block; max-width: 100%; color: var(--muted-foreground); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-select-caret { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; flex-shrink: 0; transition: transform .15s ease; }
.search-select.is-open .search-select-caret { transform: rotate(180deg); }
.search-select-panel { display: none; position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px); border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.search-select.is-open .search-select-panel { display: block; animation: searchSelectIn .12s ease-out; }
@keyframes searchSelectIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.search-select-search-wrap { height: 40px; border: 1px solid var(--border); border-radius: 10px; background: #fafafa; padding: 0 10px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted-foreground); }
.search-select-search { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--foreground); font: inherit; font-size: 14px; }
.search-select-search::placeholder { color: #a1a1aa; }
.search-select-options { display: flex; flex-direction: column; gap: 7px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.search-select-option { width: 100%; min-height: 58px; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 10px; text-align: left; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.search-select-option:hover { border-color: #a1a1aa; background: #fafafa; box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-1px); }
.search-select-option.is-selected { border-color: var(--primary); background: #f4f4f5; box-shadow: inset 0 0 0 1px var(--primary); }
.search-select-option-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.search-select-option-body strong { color: var(--foreground); font-size: 14px; line-height: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-select-option-body small { color: var(--muted-foreground); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-select-role { border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted-foreground); padding: 4px 8px; font-size: 11px; line-height: 14px; font-weight: 750; white-space: nowrap; flex-shrink: 0; }
.search-select-empty { border: 1px dashed var(--border); border-radius: 12px; background: #fafafa; color: var(--muted-foreground); padding: 14px; text-align: center; font-size: 13px; }

@media (max-width: 720px) {
  .search-select-panel { position: static; margin-top: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.10); }
  .search-select-option { align-items: flex-start; }
  .search-select-role { display: none; }
}

/* v7: fixed premium sidebar + provisioning task UI */
body { background: #f8fafc; }
.dashboard-container { display: block; min-height: 100vh; background: radial-gradient(circle at top right, rgba(15,118,110,.06), transparent 28%), #f8fafc; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  height: 100vh;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 54%, #f4f4f5 100%);
  border-right: 1px solid rgba(228,228,231,.95);
  box-shadow: 10px 0 30px rgba(15,23,42,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.sidebar-header { padding: 14px 12px 10px; }
.sidebar-content { padding: 6px 10px 14px; }
.sidebar-footer { padding: 12px; background: rgba(255,255,255,.72); backdrop-filter: blur(10px); }
.sidebar-menu { gap: 5px; }
.sidebar-menu-button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 11px;
  color: #3f3f46;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sidebar-menu-button:hover {
  background: #ffffff;
  border-color: var(--border);
  color: #18181b;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.sidebar-menu-button.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(24,24,27,.18);
}
.sidebar-menu-button.is-active .sidebar-menu-title,
.sidebar-menu-button.is-active .sidebar-menu-subtitle { color: inherit; }
.sidebar-menu-button.is-active .sidebar-menu-subtitle { opacity: .74; }
.sidebar-menu-sub { margin: 7px 0 8px 22px; padding-left: 12px; }
.sidebar-menu-sub-button { padding: 7px 9px; border-radius: 10px; }
.sidebar-menu-sub-button:hover { background: #fff; }
.sidebar-menu-sub-button.is-active { background: #fff; box-shadow: inset 0 0 0 1px var(--border); }
.avatar-square { border-radius: 10px; box-shadow: 0 10px 24px rgba(24,24,27,.16); }
.footer-user { background: #fff; border-color: var(--border); box-shadow: 0 8px 20px rgba(15,23,42,.04); }
.logout-button:hover { background: #fff5f5; border-color: #fecaca; color: #dc2626; }
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 22px;
  transition: margin-left .2s ease;
}
body.sidebar-collapsed .sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); box-shadow: none; }
body.sidebar-collapsed .main-content { margin-left: 0; }
.content-header {
  position: sticky;
  top: 0;
  z-index: 18;
  height: 48px;
  padding: 6px 0 12px;
  background: linear-gradient(180deg, rgba(248,250,252,.96) 0%, rgba(248,250,252,.82) 72%, rgba(248,250,252,0) 100%);
  backdrop-filter: blur(8px);
}
.card { border-radius: 18px; box-shadow: 0 12px 32px rgba(15,23,42,.055); border-color: rgba(226,232,240,.92); }
.hero-heading {
  border: 1px solid rgba(226,232,240,.92);
  background: linear-gradient(135deg, #ffffff, #f8fafc 68%, rgba(15,118,110,.07));
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 40px rgba(15,23,42,.06);
}
.stat-card-gradient { background: linear-gradient(135deg, #18181b, #334155); color: #fff; }
.stat-card-gradient .card-label,
.stat-card-gradient .text-muted { color: rgba(255,255,255,.72); }
.section-heading-sm { font-size: 18px; line-height: 26px; margin-top: 2px; }
.sidebar-backdrop { display: none; }

.provision-assignment-panel {
  border: 1px solid rgba(15,118,110,.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(240,253,250,.92), #ffffff);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 12px 28px rgba(15,118,110,.08);
}
.provision-assignment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.provision-assignment-head span { display: block; font-weight: 800; color: #134e4a; }
.provision-assignment-head small { display: block; margin-top: 3px; color: #0f766e; font-size: 12px; line-height: 17px; }
.textarea-sm { min-height: 92px; }
.provision-summary-card {
  margin-top: 14px;
  border: 1px solid rgba(15,118,110,.22);
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.provision-summary-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}
.provision-summary-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.provision-summary-body strong { color: #134e4a; }
.provision-summary-body p { color: #0f766e; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provision-current-box { background: linear-gradient(135deg, #f0fdfa, #fff); border-color: rgba(15,118,110,.22); }

@media (max-width: 980px) {
  .main-content { margin-left: 0; padding: 14px; }
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 18px 0 60px rgba(15,23,42,.24); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(15,23,42,.38); backdrop-filter: blur(2px); }
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  body.sidebar-collapsed .main-content { margin-left: 0; }
  .content-header { top: 0; }
}
.page-heading {
  border: 1px solid rgba(226,232,240,.92);
  background: linear-gradient(135deg, #ffffff, #f8fafc 68%, rgba(15,118,110,.055));
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 40px rgba(15,23,42,.055);
}
.page-heading h1 { color: #0f172a; }
.table-wrapper { border-radius: 16px; box-shadow: 0 10px 30px rgba(15,23,42,.04); }
.table thead { background: linear-gradient(180deg, #f8fafc, #f4f4f5); }
.table tbody tr { transition: background-color .12s ease, transform .12s ease; }
.table tbody tr:hover { background: #f8fafc; }

/* v8: Teecom login redesign + dashboard notification center */
.brand-button { min-height: 56px; }
.brand-logo-box {overflow: hidden;background: #ffffff;}
.brand-logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 4px; display: block; }
.brand-logo-box span { display: none; color: #fff; font-weight: 900; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #ef4444; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.header-spacer { flex: 1; }

body.teecom-login-page {
  min-height: 100vh;
  background: #f3f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.teecom-login-shell { width: min(1000px, 100%); display: flex; align-items: center; justify-content: center; }
.teecom-login-card {
  width: min(900px, 100%);
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
}
.teecom-login-form-panel {
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.teecom-login-title h1 { font-size: 30px; line-height: 1.1; letter-spacing: -.8px; color: #111827; font-weight: 850; }
.teecom-login-title p { margin-top: 8px; color: #667085; font-size: 13px; font-weight: 650; }
.teecom-login-form { display: flex; flex-direction: column; gap: 13px; }
.teecom-login-field { gap: 6px; }
.teecom-login-field > span,
.password-label-row > span { color: #111827; font-size: 13px; font-weight: 800; }
.teecom-login-field .input {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: #f0f0f3;
  box-shadow: none;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}
.teecom-login-field .input::placeholder { color: #8992a3; font-weight: 650; }
.teecom-login-field .input:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff; }
.password-label-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
.password-label-row a { color: #2563eb; font-size: 11px; font-weight: 800; }
.teecom-remember-row { min-height: 20px; display: none; align-items: center; gap: 8px; color: #667085; font-size: 12px; font-weight: 650; }
.teecom-login-button { height: 37px; min-height: 37px; border-radius: 8px; background: #000; color: #fff; font-size: 13px; font-weight: 850; box-shadow: none; }
.teecom-login-button:hover { opacity: .88; }
.teecom-ms-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; color: #475467; font-size: 12px; font-weight: 750; }
.teecom-ms-link:hover { color: #2563eb; }
.login-alert { margin-bottom: 2px; }
.teecom-login-brand-panel {
  min-height: 330px;
  color: #fff;
  background: radial-gradient(circle at 28% 18%, rgba(14,165,233,.72), transparent 18%), linear-gradient(135deg, #1764f4 0%, #1853ec 45%, #2c29a9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 42px 54px;
  position: relative;
  overflow: hidden;
}
.teecom-login-brand-panel::before,
.teecom-login-brand-panel::after { content: ""; position: absolute; border-radius: 999px; filter: blur(2px); opacity: .34; }
.teecom-login-brand-panel::before { width: 220px; height: 220px; background: #15b8ff; right: -90px; top: -110px; }
.teecom-login-brand-panel::after { width: 260px; height: 260px; background: #4338ca; left: -120px; bottom: -150px; }
.teecom-login-logo { position: relative; z-index: 1; width: 116px; height: 82px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.teecom-login-logo img { max-width: 116px; max-height: 82px; object-fit: contain; filter: drop-shadow(0 16px 22px rgba(15,23,42,.22)); }
.teecom-login-logo span { display: none; font-size: 48px; font-weight: 950; letter-spacing: -5px; color: rgba(255,255,255,.88); }
.teecom-login-brand-copy { position: relative; z-index: 1; max-width: 360px; }
.teecom-login-brand-copy h2 { font-size: 23px; line-height: 1.2; font-weight: 850; letter-spacing: -.4px; }
.teecom-login-brand-copy p { margin-top: 14px; color: rgba(255,255,255,.86); font-size: 13px; line-height: 1.42; font-weight: 650; }

.notification-center { position: relative; }
.notification-center summary { list-style: none; }
.notification-center summary::-webkit-details-marker { display: none; }
.notification-trigger {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.notification-trigger:hover { background: #fff; }
.notification-badge {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
}
.notification-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(390px, calc(100vw - 32px));
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 24px 70px rgba(15,23,42,.18);
  z-index: 50;
  overflow: hidden;
}
.notification-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid #eef2f7; }
.notification-menu-head strong { display: block; font-size: 15px; color: #0f172a; }
.notification-menu-head small { display: block; margin-top: 2px; color: #64748b; font-size: 12px; }
.notification-menu-head button { color: #2563eb; font-size: 12px; font-weight: 800; }
.notification-list { max-height: 390px; overflow-y: auto; }
.notification-list.large { max-height: none; display: flex; flex-direction: column; gap: 10px; overflow: visible; }
.notification-item { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid #f1f5f9; background: #fff; }
.notification-item:hover { background: #f8fafc; }
.notification-item.is-unread { background: #eff6ff; }
.notification-list.large .notification-item { border: 1px solid #e2e8f0; border-radius: 14px; }
.notification-dot { width: 10px; height: 10px; border-radius: 999px; background: #64748b; margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(100,116,139,.12); }
.notification-dot.info { background: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.notification-dot.warning { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.15); }
.notification-dot.success { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.14); }
.notification-dot.danger { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.13); }
.notification-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notification-copy strong { color: #0f172a; font-size: 13px; line-height: 18px; }
.notification-copy small { color: #475569; font-size: 12px; line-height: 17px; }
.notification-copy em { color: #94a3b8; font-size: 11px; line-height: 15px; font-style: normal; margin-top: 2px; }
.notification-empty { padding: 24px 16px; text-align: center; color: #64748b; font-size: 13px; }

.dashboard-hero {
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 26px;
  padding: 26px;
  background: radial-gradient(circle at 88% 20%, rgba(37,99,235,.16), transparent 24%), linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, rgba(15,118,110,.08) 100%);
  box-shadow: 0 20px 50px rgba(15,23,42,.065);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dashboard-hero h1 { font-size: 32px; line-height: 40px; letter-spacing: -.8px; color: #0f172a; }
.dashboard-hero p:not(.eyebrow) { margin-top: 6px; color: #64748b; max-width: 680px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.dashboard-stat-card {
  min-height: 138px;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15,23,42,.055);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dashboard-stat-card span { color: #64748b; font-size: 13px; font-weight: 750; }
.dashboard-stat-card strong { color: #0f172a; font-size: 30px; line-height: 34px; letter-spacing: -.6px; }
.dashboard-stat-card small { color: #94a3b8; font-size: 12px; line-height: 16px; }
.dashboard-stat-card.is-primary { color: #fff; background: linear-gradient(135deg, #0f172a, #1d4ed8); border-color: rgba(37,99,235,.35); }
.dashboard-stat-card.is-primary span,
.dashboard-stat-card.is-primary strong,
.dashboard-stat-card.is-primary small { color: #fff; }
.dashboard-stat-card.is-primary small { opacity: .74; }
.dashboard-main-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dashboard-main-grid.wide-left { grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr); }
.dashboard-panel { padding: 18px; }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-list-item { display: flex; align-items: center; gap: 12px; border: 1px solid #e2e8f0; border-radius: 15px; background: #fff; padding: 12px; transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.mini-list-item:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.mini-icon { width: 34px; height: 34px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.mini-icon.warning { color: #92400e; background: #fef3c7; }
.mini-icon.task { color: #075985; background: #e0f2fe; }
.mini-content { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mini-content strong { color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-content small { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state.soft { border-style: dashed; background: #f8fafc; color: #64748b; }
.dashboard-table-wrapper { box-shadow: none; }
.notification-page-panel { position: sticky; top: 70px; }

@media (max-width: 1200px) {
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-main-grid.wide-left { grid-template-columns: 1fr; }
  .notification-page-panel { position: static; }
}
@media (max-width: 980px) {
  .dashboard-hero { flex-direction: column; }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .notification-menu { right: -8px; }
  .teecom-login-card { grid-template-columns: 1fr; max-width: 560px; }
  .teecom-login-brand-panel { min-height: 280px; order: -1; }
  .teecom-login-form-panel { padding: 34px; }
}
@media (max-width: 720px) {
  .dashboard-stat-grid { grid-template-columns: 1fr; }
  .hero-actions, .hero-actions .btn { width: 100%; }
  .content-header { gap: 6px; }
  .breadcrumb-page, .breadcrumb-link { font-size: 12px; }
  .notification-trigger { width: 38px; height: 38px; border-radius: 12px; }
  .teecom-login-form-panel { padding: 28px 22px; }
  .teecom-login-brand-panel { padding: 32px 24px; }
  .teecom-login-title h1 { font-size: 27px; }
}

/* v9: Workflow status flags - distinct colors per Request Hub status */
.status-badge[class*="status-flag-"] {
  border: 1px solid transparent;
  box-shadow: inset 4px 0 0 rgba(15,23,42,.08);
}
.status-flag-pending-department-head { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.status-flag-pending-resource-team { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-flag-pending-extra-approver { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.status-flag-pending-resource-team-final { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.status-flag-approved { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.status-flag-completed { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.status-flag-department-rejected { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-flag-resource-rejected { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.status-flag-extra-rejected { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }

/* Microsoft 365 avatar storage/display */
.user-avatar {overflow: hidden;position: relative;background: #ffffff;}
.user-avatar img {width: 100%;/* height: 100%; */object-fit: cover;display: block;/* border-radius: inherit; */padding: 2px;}
.user-avatar .avatar-fallback { width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: inherit; }
