/* SOLA Management Luxury UI V1
   Visual-only enhancement: no business logic, permissions, or data flow changes. */
:root {
  --purple: #5d287a;
  --purple2: #7a3f91;
  --purple3: #2a1535;
  --orange: #b98532;
  --bg: #f5f1eb;
  --surface: #fffdf9;
  --line: #e5ddd2;
  --text: #251f28;
  --muted: #746d78;
  --soft-purple: #eee6f0;
  --soft-orange: #f8ecda;
  --soft-green: #e7f2eb;
  --soft-red: #f8e9e8;
  --luxury-ink: #1d1026;
  --luxury-ink-soft: #2e183a;
  --luxury-ivory: #fffaf1;
  --luxury-gold: #c59a50;
  --luxury-gold-deep: #a7782f;
  --luxury-border: #ded2c3;
  --luxury-shadow: 0 18px 48px rgba(42, 21, 53, 0.08);
  --luxury-shadow-soft: 0 7px 22px rgba(42, 21, 53, 0.055);
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-image:
    radial-gradient(circle at 82% -10%, rgba(197, 154, 80, 0.1), transparent 25rem),
    linear-gradient(135deg, #f8f5ef 0%, #f4f0ea 48%, #f2eee9 100%);
}

::selection {
  background: rgba(197, 154, 80, 0.3);
  color: var(--luxury-ink);
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(197, 154, 80, 0.38);
  outline-offset: 2px;
}

/* Login and loading experience */
.loading-screen,
.auth-screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(197, 154, 80, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 80%, rgba(126, 67, 148, 0.22), transparent 30rem),
    linear-gradient(145deg, #1b0e23 0%, #32183f 58%, #4a245c 100%);
}

.loading-screen::before,
.auth-screen::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(224, 193, 134, 0.18);
  border-radius: 28px;
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  padding: 38px 36px 34px;
  border: 1px solid rgba(223, 205, 181, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 34px 90px rgba(10, 4, 15, 0.42);
}

.auth-logo {
  width: 200px;
  height: 98px;
  margin-bottom: 18px;
}

.auth-card h1 {
  color: var(--luxury-ink);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card > p {
  color: var(--muted);
  font-size: 13.5px;
}

.auth-card label {
  color: #5c5260;
  font-size: 12.5px;
  font-weight: 700;
}

.auth-card input {
  height: 46px;
  border-color: var(--luxury-border);
  border-radius: 12px;
  background: #fffdf9;
}

.auth-card input:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--luxury-gold);
  box-shadow: 0 0 0 4px rgba(197, 154, 80, 0.14);
}

/* Premium navigation shell */
.sidebar {
  border-right: 1px solid rgba(224, 193, 134, 0.14);
  background:
    radial-gradient(circle at 100% 5%, rgba(197, 154, 80, 0.12), transparent 16rem),
    linear-gradient(180deg, #1b0e23 0%, #26122f 50%, #1b0d22 100%);
  box-shadow: 16px 0 44px rgba(25, 12, 32, 0.08);
}

.brand {
  height: 102px;
  padding: 8px 16px;
  border-bottom: 1px solid #e6ded3;
  background: var(--luxury-ivory);
}

.brand img {
  width: 176px;
  height: 84px;
}

.brand span {
  color: var(--luxury-gold-deep);
  font-weight: 800;
}

.org-card {
  margin: 15px 13px 7px;
  padding: 12px;
  border: 1px solid rgba(224, 193, 134, 0.32);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 250, 241, 0.12), rgba(197, 154, 80, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.org-card .org-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(234, 204, 149, 0.3);
  border-radius: 10px;
  background: rgba(197, 154, 80, 0.16);
  color: #f1d39a;
}

.org-card b {
  color: #fffaf2;
  font-size: 13px;
}

.org-card small {
  color: #cfc1d4;
  opacity: 1;
}

.nav-scroll {
  scrollbar-color: rgba(224, 193, 134, 0.28) transparent;
  scrollbar-width: thin;
}

.nav-group {
  padding: 16px 20px 7px;
  color: #aa96b3;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.5px;
}

.nav-link {
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #d8cddd;
  font-size: 13.5px;
  font-weight: 620;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  border-color: rgba(224, 193, 134, 0.12);
  background: rgba(255, 250, 241, 0.08);
  color: #fffaf2;
  transform: translateX(2px);
}

.nav-link.active {
  border-color: rgba(224, 193, 134, 0.42);
  background: linear-gradient(90deg, rgba(197, 154, 80, 0.26), rgba(255, 250, 241, 0.1));
  color: #fffaf2;
  box-shadow: inset 3px 0 0 #d7ad63, 0 8px 20px rgba(8, 3, 12, 0.16);
  font-weight: 780;
}

.nav-link .ico svg {
  stroke-width: 1.65;
}

.nav-link .count {
  border: 1px solid rgba(255, 250, 241, 0.15);
  background: var(--luxury-gold-deep);
}

.sidebar-user {
  min-height: 68px;
  border-top: 1px solid rgba(224, 193, 134, 0.15);
  background: rgba(8, 3, 12, 0.17);
}

.sidebar-user .avatar {
  border: 1px solid rgba(224, 193, 134, 0.34);
  background: rgba(197, 154, 80, 0.14);
  color: #efd49f;
}

.sidebar-user b {
  color: #fffaf2;
}

.sidebar-user small {
  color: #ad9fb4;
}

.sidebar-user .icon-btn,
.sidebar-close {
  border-color: rgba(224, 193, 134, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #e3d8e7;
}

/* Header and main canvas */
.topbar {
  height: 66px;
  padding: 0 26px;
  border-bottom: 1px solid rgba(205, 190, 171, 0.72);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 4px 22px rgba(42, 21, 53, 0.035);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.breadcrumb {
  color: #887e8a;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.breadcrumb b {
  color: var(--luxury-ink);
}

.search input {
  height: 39px;
  border: 1px solid #e7ded3;
  background: #f7f3ee;
  color: var(--text);
}

.search input:focus {
  border-color: var(--luxury-gold);
  background: #fffdf9;
  box-shadow: 0 0 0 4px rgba(197, 154, 80, 0.1);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-color: var(--luxury-border);
  border-radius: 10px;
  background: #fffdf9;
}

.content {
  padding: 26px 28px 54px;
}

.view {
  gap: 18px;
}

.hero {
  min-height: 142px;
  padding: 28px 30px;
  border: 1px solid rgba(224, 193, 134, 0.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 35%, rgba(197, 154, 80, 0.22), transparent 13rem),
    linear-gradient(120deg, #24102f 0%, #431c55 58%, #69307c 100%);
  box-shadow: 0 22px 55px rgba(42, 21, 53, 0.16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(224, 193, 134, 0.18);
  border-radius: 15px;
  pointer-events: none;
}

.hero::after {
  right: -45px;
  top: -96px;
  width: 330px;
  height: 330px;
  border-color: rgba(233, 205, 154, 0.25);
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.035), 0 0 0 84px rgba(197, 154, 80, 0.025);
}

.hero h1,
.page-head h1,
.panel-head h2,
.section-heading h3,
.modal-head h2 {
  font-family: Georgia, Cambria, "Times New Roman", serif;
}

.hero h1 {
  margin-bottom: 7px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hero p {
  color: #ded2e3;
  font-size: 13px;
  opacity: 1;
}

.hero .today {
  color: #ead8b7;
  font-size: 10.5px;
  letter-spacing: 1.25px;
}

.page-head {
  min-height: 72px;
}

.page-head h1 {
  color: var(--luxury-ink);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page-head p {
  color: var(--muted);
  font-size: 13px;
}

/* Actions and controls */
.btn {
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid rgba(224, 193, 134, 0.2);
  border-radius: 11px;
  background: linear-gradient(135deg, #4a205d, #662d7c);
  box-shadow: 0 9px 20px rgba(66, 27, 82, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 12px;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(66, 27, 82, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn.secondary {
  border-color: var(--luxury-border);
  background: #fffdf9;
  color: #4d4350;
  box-shadow: 0 4px 12px rgba(42, 21, 53, 0.04);
}

.btn.orange {
  border-color: #c89b55;
  background: linear-gradient(135deg, #b47e2c, #c9994b);
}

.btn.small {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 10.5px;
}

.sync {
  padding: 6px 11px;
  border: 1px solid rgba(47, 139, 88, 0.16);
}

.toolbar {
  padding: 12px 14px;
  border-color: var(--luxury-border);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: var(--luxury-shadow-soft);
}

.toolbar input,
.toolbar select {
  height: 39px;
  border-color: var(--luxury-border);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--text);
}

/* Cards, KPIs, data and forms */
.kpis {
  gap: 15px;
}

.kpi {
  min-height: 112px;
  padding: 19px 20px;
  border: 1px solid var(--luxury-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffefb, #fcf8f2);
  box-shadow: var(--luxury-shadow-soft);
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #d1aa69, #87549a);
}

.kpi::after {
  right: -33px;
  bottom: -40px;
  width: 116px;
  height: 116px;
  background: radial-gradient(circle, rgba(123, 58, 161, 0.13), rgba(123, 58, 161, 0.02) 64%, transparent 66%);
}

.kpi.orange::after {
  background: radial-gradient(circle, rgba(197, 154, 80, 0.19), rgba(197, 154, 80, 0.02) 64%, transparent 66%);
}

.kpi.green::after {
  background: radial-gradient(circle, rgba(47, 139, 88, 0.14), rgba(47, 139, 88, 0.02) 64%, transparent 66%);
}

.kpi.blue::after {
  background: radial-gradient(circle, rgba(57, 120, 188, 0.14), rgba(57, 120, 188, 0.02) 64%, transparent 66%);
}

.kpi .label {
  color: #776d78;
  font-size: 10.5px;
  letter-spacing: 0.9px;
}

.kpi strong {
  margin: 9px 0 5px;
  color: var(--luxury-ink);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
}

.panel,
.table-card {
  border: 1px solid var(--luxury-border);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--luxury-shadow-soft);
}

.panel-head {
  min-height: 70px;
  padding: 17px 20px;
  border-bottom-color: #ece4da;
  align-items: center;
}

.panel-head h2 {
  color: var(--luxury-ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-head p {
  color: var(--muted);
  font-size: 11.5px;
}

.panel-head button.link {
  color: #6a397c;
  font-size: 11px;
  font-weight: 800;
}

.panel-body {
  padding: 18px 20px;
}

.pipeline-step,
.crm-package-card,
.account-box {
  border-color: #e7ded4;
  border-radius: 12px;
  background: #faf7f3;
}

.pipeline-step strong {
  color: #643078;
  font-family: Georgia, Cambria, "Times New Roman", serif;
}

.list-row,
.ops-exception,
th,
td {
  border-bottom-color: #ede6dd;
}

th {
  height: 44px;
  background: #f4efe8;
  color: #6e6470;
  font-size: 10px;
  letter-spacing: 0.7px;
}

td {
  height: 54px;
  background: rgba(255, 253, 249, 0.72);
}

tbody tr:hover td {
  background: #faf5ed;
}

td.money {
  color: var(--luxury-gold-deep);
}

.status {
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(89, 82, 94, 0.08);
}

.modal-backdrop {
  background: rgba(19, 9, 25, 0.72);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.modal {
  border: 1px solid rgba(224, 193, 134, 0.4);
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 34px 100px rgba(15, 6, 20, 0.5);
}

.modal-head {
  height: 74px;
  padding: 0 22px;
  border-bottom-color: var(--luxury-border);
}

.modal-head h2 {
  color: var(--luxury-ink);
  font-size: 21px;
  font-weight: 600;
}

.modal-form {
  padding: 21px 22px;
  gap: 15px;
}

.modal-form label {
  color: #5b515e;
  font-size: 11.5px;
  font-weight: 750;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  min-height: 43px;
  border-color: var(--luxury-border);
  border-radius: 10px;
  background: #fffdfa;
  font-size: 12px;
}

.modal-foot {
  padding: 14px 22px;
  border-top-color: var(--luxury-border);
  background: #f8f4ee;
  box-shadow: 0 -10px 30px rgba(42, 21, 53, 0.06);
}

.toast {
  min-height: 48px;
  border: 1px solid rgba(224, 193, 134, 0.28);
  border-radius: 12px;
  background: #26152f;
  box-shadow: 0 18px 44px rgba(18, 8, 24, 0.3);
  font-size: 12px;
}

@media (max-width: 900px) {
  .sidebar {
    box-shadow: 24px 0 60px rgba(15, 6, 20, 0.38);
  }

  .content {
    padding: 20px 16px 42px;
  }
}

@media (max-width: 650px) {
  .loading-screen::before,
  .auth-screen::before {
    inset: 10px;
    border-radius: 20px;
  }

  .auth-card {
    padding: 29px 20px 27px;
  }

  .topbar {
    height: 60px;
    padding: 0 12px;
  }

  .content {
    padding: 15px 12px 36px;
  }

  .hero {
    min-height: 150px;
    padding: 23px 21px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 23px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .kpis {
    gap: 10px;
  }

  .kpi {
    min-height: 112px;
    padding: 15px;
    border-radius: 15px;
  }

  .kpi strong {
    font-size: 23px;
  }

  .panel,
  .table-card {
    border-radius: 15px;
  }

  .panel-head {
    min-height: 64px;
    padding: 15px 16px;
  }

  .panel-head h2 {
    font-size: 17px;
  }

  .modal-head,
  .modal-form,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn:not(.small) {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #b8ada1;
    --luxury-border: #b8ada1;
    --muted: #5e5662;
  }

  .nav-link {
    color: #f0e7f2;
  }
}

/* Minimalist Luxury Enterprise V2
   Reduce decorative color and reserve semantic hues for real business state. */
:root {
  --luxury-canvas: #f6f3ee;
  --luxury-surface: #fffdf9;
  --luxury-stone: #f1ede7;
  --luxury-hairline: #ddd5ca;
  --luxury-metal: #b58a42;
  --luxury-metal-soft: #d7bb86;
}

body {
  background-color: var(--luxury-canvas);
  background-image: linear-gradient(180deg, #f8f6f2 0%, #f4f1ec 100%);
}

.topbar {
  border-bottom-color: var(--luxury-hairline);
  box-shadow: none;
}

.content {
  padding-top: 32px;
}

.view {
  gap: 22px;
}

.hero {
  min-height: 150px;
  border-color: rgba(215, 187, 134, 0.4);
  background: linear-gradient(112deg, #1c0d23 0%, #2b1335 72%, #3a1946 100%);
  box-shadow: 0 18px 42px rgba(31, 14, 38, 0.12);
}

.hero::before {
  inset: 12px;
  border-color: rgba(215, 187, 134, 0.22);
}

.hero::after {
  right: 34px;
  top: 24px;
  width: 1px;
  height: calc(100% - 48px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(215, 187, 134, 0.55), transparent);
  box-shadow: none;
}

.hero h1 {
  font-size: 29px;
  letter-spacing: -0.02em;
}

.hero p {
  color: #d9cedd;
}

.hero .today {
  padding-right: 28px;
  color: #d9c49b;
}

.kpis {
  gap: 16px;
}

.kpi {
  min-height: 118px;
  padding: 22px;
  border-color: var(--luxury-hairline);
  background: var(--luxury-surface);
  box-shadow: 0 5px 18px rgba(34, 24, 37, 0.035);
}

.kpi::before {
  inset: 0 22px auto;
  width: auto;
  height: 2px;
  background: var(--luxury-metal);
}

.kpi::after,
.kpi.orange::after,
.kpi.green::after,
.kpi.blue::after {
  display: none;
}

.kpi .label {
  color: #776f79;
  letter-spacing: 1.05px;
}

.kpi strong {
  margin-top: 12px;
  color: #24152a;
}

.panel,
.table-card,
.toolbar {
  border-color: var(--luxury-hairline);
  background: var(--luxury-surface);
  box-shadow: 0 5px 18px rgba(34, 24, 37, 0.035);
}

.panel-head {
  min-height: 76px;
  padding: 20px 22px;
  border-bottom-color: #e8e1d8;
}

.panel-body {
  padding: 21px 22px;
}

.pipeline-step,
.crm-package-card,
.account-box {
  border-color: #e4ddd4;
  background: #f8f5f1;
}

.pipeline-step strong {
  color: #392040;
}

.segmented {
  border-color: var(--luxury-hairline);
  background: var(--luxury-surface);
  box-shadow: none;
}

.segmented button {
  color: #615a64;
}

.segmented button.active {
  border-color: #3a1a45;
  background: #2c1435;
  color: #fffaf3;
  box-shadow: none;
}

th {
  background: var(--luxury-stone);
  color: #625b64;
}

td {
  background: var(--luxury-surface);
}

tbody tr:hover td {
  background: #f8f4ee;
}

.btn {
  border-color: rgba(215, 187, 134, 0.28);
  background: #32163d;
  box-shadow: 0 6px 16px rgba(42, 21, 53, 0.12);
}

.btn:hover:not(:disabled) {
  background: #3b1a48;
  box-shadow: 0 9px 20px rgba(42, 21, 53, 0.16);
}

.btn.orange {
  border-color: #b88a42;
  background: #a67834;
}

.btn.secondary {
  border-color: var(--luxury-hairline);
  background: var(--luxury-surface);
}

.modal {
  background: var(--luxury-surface);
}

.modal-foot {
  background: #f5f1eb;
}

.dashboard-privacy {
  border: 1px solid var(--luxury-hairline);
  border-left: 3px solid var(--luxury-metal);
  background: #f8f5f0;
  color: #5c555f;
}

.dashboard-privacy.finance,
.dashboard-privacy.operations {
  border-left-color: var(--luxury-metal);
  background: #f8f5f0;
}

.dashboard-chart-legend .revenue::before,
.dashboard-finance-bars .revenue,
.chart-legend .revenue::before,
.finance-chart .revenue {
  background: #8f6b36;
}

.dashboard-chart-legend .expense::before,
.dashboard-finance-bars .expense,
.chart-legend .expense::before,
.finance-chart .expense {
  background: #9c929f;
}

.dashboard-chart-legend .profit::before,
.dashboard-finance-bars .profit {
  background: #392044;
}

.dashboard-finance-bars .profit.negative {
  background: var(--red);
}

.sola-ai-boundary > div,
.sola-ai-metric,
.sola-ai-workflow {
  border-color: var(--luxury-hairline);
  background: var(--luxury-surface);
  box-shadow: 0 5px 18px rgba(34, 24, 37, 0.035);
}

.sola-ai-metric::after,
.sola-ai-metric.orange::after,
.sola-ai-metric.red::after,
.sola-ai-metric.green::after,
.sola-ai-metric.neutral::after {
  display: none;
}

.sola-ai-workflow,
.sola-ai-workflow.attention,
.sola-ai-workflow.critical {
  border-top-color: var(--luxury-metal);
}

.sola-ai-workflow header > span,
.sola-ai-workflow-result,
.sola-ai-locks span {
  background: #f3eee7;
  color: #3b2144;
}

@media (max-width: 650px) {
  .content {
    padding-top: 18px;
  }

  .view {
    gap: 16px;
  }

  .hero {
    min-height: 154px;
  }

  .hero::after {
    display: none;
  }

  .kpi {
    padding: 18px 16px;
  }

  .kpi::before {
    right: 16px;
    left: 16px;
  }

  .panel-head,
  .panel-body {
    padding-left: 17px;
    padding-right: 17px;
  }
}
