/*
  Business UI polish
  A quieter visual foundation for every workspace: compact geometry, clear
  hierarchy, and restrained elevation. Theme colours remain defined in the
  theme styles; this file only makes their application feel more like a
  working ERP product.
*/

:root {
  --ui-radius: 8px;
  --ui-control-radius: 6px;
  --ui-border: #dfe4ea;
  --ui-subtle: #f7f8fa;
}

/* Purple Works becomes a calm, neutral application surface. */
body:not(.theme-warm):not(.theme-sky):not(.theme-ember),
body:not(.theme-warm):not(.theme-sky):not(.theme-ember) .app {
  background: #f6f7f9;
}

body:not(.theme-warm):not(.theme-sky):not(.theme-ember) aside {
  background: #2b145a;
  box-shadow: none;
}

body:not(.theme-warm):not(.theme-sky):not(.theme-ember) nav .active {
  background: #6a1b9a;
  box-shadow: none;
}

body:not(.theme-warm):not(.theme-sky):not(.theme-ember) .primary {
  background: #6a1b9a;
  border-color: #6a1b9a;
  box-shadow: none;
}

body:not(.theme-warm):not(.theme-sky):not(.theme-ember) .primary:hover {
  background: #571580;
}

/* Cards and controls are consistent across all workspaces and themes. */
.panel, .stat, .quick, .module-card, .quotation-stat,
.table-wrap, .filters, .filter-bar, .toolbar {
  border-radius: var(--ui-radius);
  box-shadow: none;
}

.panel, .stat, .quick, .module-card, .quotation-stat {
  border-color: var(--ui-border);
}

button, .button, .primary, .secondary, .row-button, .q-mini,
.workspace-tag, .theme-switcher, .theme-visibility-toggle {
  border-radius: var(--ui-control-radius);
  box-shadow: none;
}

input, select, textarea, .field, .input, .select {
  border-radius: var(--ui-control-radius);
  box-shadow: none;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgb(106 27 154 / 12%);
}

/* Tables read like data sheets: a quiet header and precise row rhythm. */
th {
  letter-spacing: .035em;
  font-size: 11px;
  font-weight: 700;
}

td { vertical-align: middle; }

.panel-head, .page-head, .section-head { gap: 12px; }

/* Keep themed surfaces readable, while avoiding decorative floating cards. */
.theme-warm .panel, .theme-warm .stat, .theme-warm .quick,
.theme-sky .panel, .theme-sky .stat, .theme-sky .quick,
.theme-ember .panel, .theme-ember .stat, .theme-ember .quick {
  box-shadow: none;
}

.theme-warm nav .active, .theme-warm .primary,
.theme-ember nav .active, .theme-ember .primary,
.theme-sky nav .active, .theme-sky .primary {
  box-shadow: none;
}

/* Dialogs are forms, not floating marketing cards. */
dialog, .modal, .p-dialog, .dialog {
  border-radius: 10px;
  box-shadow: 0 18px 48px rgb(15 23 42 / 22%);
}

dialog::backdrop { background: rgb(15 23 42 / 42%); }

@media (max-width: 780px) {
  .panel, .stat, .quick, .module-card { border-radius: 7px; }
}
