:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-soft: #f7f8fa;
    --sidebar: #2f3840;
    --sidebar-dark: #222b32;
    --text: #25313a;
    --muted: #6b7883;
    --line: #dce2e8;
    --blue: #1683f7;
    --green: #22a75a;
    --orange: #f6a623;
    --red: #e94b5f;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
    --sidebar-width: 268px;
    --sidebar-collapsed: 64px;
    --scrollbar-track: rgba(7, 18, 29, 0.08);
    --scrollbar-thumb: rgba(22, 131, 247, 0.42);
    --scrollbar-thumb-hover: rgba(22, 131, 247, 0.68);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--scrollbar-thumb), rgba(245, 183, 61, 0.46));
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--scrollbar-thumb-hover), rgba(245, 183, 61, 0.68));
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.sidebar-collapsed {
    --sidebar-width: var(--sidebar-collapsed);
}

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

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

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 8px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    color: #4b5660;
    transition: left 180ms ease;
}

body.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed);
}

.topbar-left,
.topbar-right,
.top-links,
.breadcrumb,
.card-titlebar,
.metric-row,
.legend,
.overview-row {
    display: flex;
    align-items: center;
}

.topbar-left,
.topbar-right {
    gap: 16px;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #56636e;
    cursor: pointer;
}

.hamburger {
    display: none;
}

.top-links {
    gap: 24px;
    color: #5f6b75;
    font-size: 13px;
}

.top-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f6f8fb;
}

.top-search input {
    min-height: 32px;
    width: 150px;
    border: 0;
    background: transparent;
    color: #394650;
    padding: 8px 10px;
}

.top-search button {
    width: 34px;
    border: 0;
    border-left: 1px solid var(--line);
    background: #f1f3f6;
    color: #53616c;
}

.top-notification,
.top-grid {
    position: relative;
    color: #6b7782;
    font-size: 15px;
}

.top-notification small {
    position: absolute;
    top: -10px;
    right: -9px;
    display: grid;
    place-items: center;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
}

.top-notification.warning small {
    background: #ffc043;
    color: #4d3a00;
}

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    padding-top: 50px;
    transition: grid-template-columns 180ms ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 231, 255, 0.44) rgba(255, 255, 255, 0.06);
    border-right: 1px solid #1f2931;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-dark) 100%);
    padding: 0 6px 18px;
    transition: width 180ms ease;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(124, 231, 255, 0.55), rgba(245, 183, 61, 0.48));
    border: 2px solid rgba(7, 30, 48, 0.88);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(124, 231, 255, 0.82), rgba(245, 183, 61, 0.72));
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    margin: 0 -6px 8px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e7edf2;
    font-size: 16px;
}

.brand-title {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
    color: #f2f7fb;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #f4f7fa;
    color: #30383f;
    font-weight: 900;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dbe2e7;
    padding: 12px 10px 16px;
    font-size: 13px;
}

.sidebar-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f7fa;
    color: #2b333a;
    font-weight: 800;
}

.sidebar-section {
    display: grid;
    gap: 4px;
    margin-bottom: 20px;
}

.sidebar-group {
    display: grid;
    gap: 4px;
}

.sidebar-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 3px;
    font: inherit;
    color: #cfd6dc;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    text-align: left;
}

.sidebar-group-title.is-active {
    color: #fff;
    background: rgba(22, 131, 247, 0.18);
}

.sidebar-submenu {
    display: none;
    gap: 2px;
    padding-left: 10px;
}

.sidebar-group.is-open .sidebar-submenu {
    display: grid;
}

.sidebar-group.is-open .sidebar-caret {
    transform: rotate(180deg);
}

.sidebar-submenu a:not(.sidebar-brand) {
    min-height: 31px;
    font-size: 12px;
    opacity: 0.95;
}

.sidebar-label {
    color: #9faab3;
    font-size: 11px;
    letter-spacing: 0;
    padding: 18px 10px 8px;
    text-transform: uppercase;
}

.sidebar-separator {
    display: block;
    height: 1px;
    margin: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar a:not(.sidebar-brand) {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    border-radius: 3px;
    color: #cfd6dc;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 10px;
}

.sidebar a:hover,
.sidebar a.is-active {
    background: var(--blue);
    color: #fff;
}

.sidebar-icon {
    display: grid;
    place-items: center;
    width: 18px;
    color: currentColor;
    font-size: 13px;
}

.sidebar-caret {
    margin-left: auto;
    font-size: 12px;
}

body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-caret {
    display: none;
}

body.sidebar-collapsed .sidebar-submenu,
body.sidebar-collapsed .sidebar-group-title {
    display: none;
}

body.sidebar-collapsed .sidebar a:not(.sidebar-brand),
body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-user {
    justify-content: center;
}

.shell {
    grid-column: 2;
    width: 100%;
    padding: 18px 14px 38px;
}

.breadcrumb {
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--blue);
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

h1 {
    color: #26313b;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

h2 {
    color: #25313a;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}

h3 {
    color: #25313a;
    font-size: 16px;
    font-weight: 600;
}

p,
.eyebrow,
small {
    color: var(--muted);
}

.eyebrow {
    color: #74818c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.panel,
.stat-card,
.auth-card,
.login-card,
.installer-card,
.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.panel,
.stat-card {
    padding: 14px;
}

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

.executive-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.executive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
}

.dashboard-filters {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    margin-bottom: 12px;
}

.success-card {
    border-left: 4px solid var(--green);
}

.warning-card {
    border-left: 4px solid var(--orange);
}

.danger-card {
    border-left: 4px solid var(--red);
}

.dashboard-bars .bar-group {
    grid-template-columns: 22px;
}

.dashboard-bars .bar-primary {
    width: 22px;
}

.project-progress-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 180px) 48px;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}

.quick-reports {
    margin-top: 12px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wide-card {
    min-width: 0;
}

.card-titlebar {
    justify-content: space-between;
    gap: 12px;
}

.card-titlebar a {
    color: var(--blue);
    font-size: 12px;
}

.metric-row {
    justify-content: space-between;
    margin-bottom: 10px;
}

.metric-row strong {
    display: block;
    font-size: 18px;
}

.metric-row span {
    color: #1d2b34;
    font-size: 12px;
}

.trend {
    color: var(--green);
    font-size: 12px;
    text-align: right;
}

.trend small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.line-chart svg {
    width: 100%;
    height: 170px;
}

.grid-lines line {
    stroke: #d8dee5;
    stroke-width: 1;
}

.line-main,
.line-muted {
    fill: none;
    stroke-width: 4;
}

.line-main {
    stroke: var(--blue);
}

.line-muted {
    stroke: #cbd3da;
}

.line-dots circle {
    fill: var(--blue);
}

.chart-labels,
.legend {
    display: flex;
    justify-content: space-between;
    color: #5e6b75;
    font-size: 11px;
}

.legend {
    justify-content: flex-end;
    gap: 7px;
    margin-top: 10px;
}

.blue-dot,
.dark-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.blue-dot {
    background: var(--blue);
}

.dark-dot {
    background: #1d2329;
}

.bar-chart {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 150px;
    border-bottom: 1px solid var(--line);
    padding-top: 16px;
}

.bar-group {
    display: grid;
    grid-template-columns: 16px 16px;
    align-items: end;
    gap: 6px;
    height: 100%;
    position: relative;
}

.bar-primary,
.bar-muted {
    display: block;
    width: 16px;
}

.bar-primary {
    background: var(--blue);
}

.bar-muted {
    background: #cbd3da;
}

.bar-group small {
    position: absolute;
    bottom: -20px;
    left: 0;
    color: #5e6b75;
    font-size: 10px;
}

.overview-row {
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.overview-row strong {
    display: block;
    text-align: right;
}

.overview-row small {
    font-size: 11px;
}

.overview-row em {
    color: var(--green);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.overview-icon {
    font-size: 24px;
}

.overview-icon.green {
    color: var(--green);
}

.overview-icon.orange {
    color: var(--orange);
}

.overview-icon.blue {
    color: var(--blue);
}

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

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    display: block;
    color: #25313a;
    font-size: 38px;
    margin-top: 8px;
}

.status-summary-card {
    grid-column: span 1;
}

.status-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.project-priority-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-summary-grid small {
    display: grid;
    gap: 2px;
    min-height: 48px;
    place-items: center;
    padding: 8px 6px;
    border: 1px solid rgba(141, 158, 173, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    color: #5d7182;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.status-summary-grid small strong {
    margin: 0;
    color: #1c3142;
    font-size: 18px;
    line-height: 1;
}

.saas-base-theme.dark-mode .status-summary-grid small {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(226, 242, 252, 0.72);
}

.saas-base-theme.dark-mode .status-summary-grid small strong {
    color: #eff9ff;
}

.content-grid,
.form-grid {
    display: grid;
    gap: 14px;
}

.content-grid {
    grid-template-columns: minmax(280px, 380px) 1fr;
}

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

.full-field {
    grid-column: 1 / -1;
}

.form-stack,
.installer-form,
.form-section {
    display: grid;
    gap: 14px;
}

.form-actions,
.actions-cell,
.password-inline {
    display: flex;
    gap: 8px;
}

.filters-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    gap: 10px;
    margin-bottom: 14px;
}

.pieces-filter {
    grid-template-columns: minmax(180px, 1fr) 180px 190px 180px auto;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    padding: 0 14px;
    transition: 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--blue);
    color: #fff;
}

.button-secondary,
.button-small {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--text);
}

.button-small {
    min-height: 32px;
    padding: 0 10px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.050em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    background: #ffffff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #1d2b34;
    font-size: 12px;
}

td small {
    display: block;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    text-transform: uppercase;
    line-height: 1;
    border: 1px solid transparent;
}

.badge-active,
.badge-ativo,
.badge-approved,
.badge-completed,
.badge-finished {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.16);
}

.saas-base-theme.dark-mode .badge-active,
.saas-base-theme.dark-mode .badge-ativo,
.saas-base-theme.dark-mode .badge-approved,
.saas-base-theme.dark-mode .badge-completed,
.saas-base-theme.dark-mode .badge-finished {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-inactive,
.badge-inativo,
.badge-planned,
.badge-planning,
.badge-registered,
.badge-awaiting_separation,
.badge-awaiting_assembly,
.badge-awaiting_welding,
.badge-awaiting_visual,
.badge-awaiting_check,
.badge-priority-priority {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.16);
}

.saas-base-theme.dark-mode .badge-inactive,
.saas-base-theme.dark-mode .badge-inativo,
.saas-base-theme.dark-mode .badge-planned,
.saas-base-theme.dark-mode .badge-planning,
.saas-base-theme.dark-mode .badge-registered,
.saas-base-theme.dark-mode .badge-awaiting_separation,
.saas-base-theme.dark-mode .badge-awaiting_assembly,
.saas-base-theme.dark-mode .badge-awaiting_welding,
.saas-base-theme.dark-mode .badge-awaiting_visual,
.saas-base-theme.dark-mode .badge-awaiting_check,
.saas-base-theme.dark-mode .badge-priority-priority {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-rejected,
.badge-cancelled,
.badge-divergence,
.badge-priority-maximum {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.16);
}

.saas-base-theme.dark-mode .badge-rejected,
.saas-base-theme.dark-mode .badge-cancelled,
.saas-base-theme.dark-mode .badge-divergence,
.saas-base-theme.dark-mode .badge-priority-maximum {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-production,
.badge-in_separation,
.badge-in_assembly,
.badge-in_welding,
.badge-in_finishing {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.16);
}

.saas-base-theme.dark-mode .badge-production,
.saas-base-theme.dark-mode .badge-in_separation,
.saas-base-theme.dark-mode .badge-in_assembly,
.saas-base-theme.dark-mode .badge-in_welding,
.saas-base-theme.dark-mode .badge-in_finishing {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-paused,
.badge-priority-normal,
.badge-priority-none {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.16);
}

.saas-base-theme.dark-mode .badge-paused,
.saas-base-theme.dark-mode .badge-priority-normal,
.saas-base-theme.dark-mode .badge-priority-none {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.2);
}

.badge-priority-high {
    background: rgba(246, 166, 35, 0.14);
    color: #b17000;
}

.badge-priority-urgent {
    background: rgba(233, 75, 95, 0.13);
    color: var(--red);
}

.progress-mini {
    width: 120px;
    max-width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe5eb;
}

.progress-mini span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.project-detail {
    margin-bottom: 14px;
}

.piece-sheet {
    margin-bottom: 14px;
}

.operation-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 12px;
    align-items: start;
}

.confirmation-grid {
    grid-template-columns: minmax(320px, 1.2fr) minmax(300px, 0.8fr);
}

.operation-column {
    display: grid;
    gap: 10px;
    min-height: 180px;
    background: #eef2f6;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px;
}

.operation-column h2 {
    margin-bottom: 2px;
    font-size: 15px;
}

.piece-card {
    display: grid;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 12px;
}

.piece-card strong {
    display: block;
}

.piece-card p {
    margin-bottom: 0;
}

.piece-actions {
    display: grid;
    gap: 8px;
}

.piece-detail-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 18px;
}

.label-preview {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 1px dashed var(--line);
    border-radius: 4px;
    padding: 14px;
    text-align: center;
}

.label-preview img {
    width: 160px;
    height: 160px;
}

@media print {
    body * {
        visibility: hidden;
    }

    .label-preview,
    .label-preview * {
        visibility: visible;
    }

    .label-preview {
        position: fixed;
        top: 20px;
        left: 20px;
        width: 260px;
        background: #fff;
    }
}

.alert,
.toast {
    border-radius: 4px;
    padding: 12px 14px;
    font-weight: 700;
}

.alert {
    margin-bottom: 14px;
}

.alert-success {
    background: rgba(34, 167, 90, 0.12);
    color: var(--green);
}

.alert-danger {
    background: rgba(233, 75, 95, 0.12);
    color: var(--red);
}

.toast-wrap {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
}

.toast {
    min-width: min(340px, calc(100vw - 32px));
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 18px;
}

.modal-backdrop.is-open {
    display: grid;
}

.modal-card {
    width: min(560px, 100%);
    padding: 24px;
}

.piece-flow-modal {
    width: min(820px, 100%);
    padding: 0;
    overflow: hidden;
}

.piece-flow-modal form {
    padding: 20px 22px 22px;
}

.flow-modal-hero {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 14px;
    align-items: flex-start;
    padding: 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(16, 185, 129, 0.08));
}

.flow-modal-icon,
.flow-choice-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
}

.flow-modal-icon i,
.flow-choice-icon i,
.flow-modal-note i {
    width: 18px;
    height: 18px;
}

.flow-modal-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flow-modal-hero h2 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.15;
}

.flow-modal-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.flow-piece-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
}

.flow-piece-summary > div {
    min-width: 0;
    padding: 14px 18px;
    background: var(--surface);
}

.flow-piece-summary small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.flow-piece-summary strong,
.flow-piece-summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-piece-summary strong {
    color: var(--text);
    font-size: 13px;
}

.flow-piece-summary span {
    color: var(--muted);
    font-size: 12px;
}

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

.flow-choice {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.flow-choice:hover {
    transform: translateY(-1px);
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.04);
}

.flow-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.flow-choice:has(input:checked) {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.18) inset;
}

.flow-choice.is-current .flow-choice-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.flow-choice-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.flow-choice-copy strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.2;
}

.flow-choice-copy small {
    color: #0891b2;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.flow-choice-copy span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.flow-choice-copy em {
    color: var(--text);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.flow-modal-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 4px;
    padding: 11px 12px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.06);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .flow-modal-hero,
    .flow-piece-summary,
    .flow-choice-grid {
        grid-template-columns: 1fr;
    }

    .flow-modal-hero {
        position: relative;
        padding-right: 64px;
    }

    .flow-modal-hero .action-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}

.panel-icon {
    border: 0;
    background: transparent;
    color: #80909c;
}

.auth-page,
.login-page,
.installer-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #2f3840, #1f272e);
}

.auth-page,
.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card,
.login-card,
.installer-card {
    width: min(100%, 460px);
    padding: 30px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.installer-page {
    padding: 28px;
}

.installer-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.35fr);
    gap: 28px;
    min-height: calc(100vh - 56px);
    align-items: center;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.installer-hero h1 {
    color: #fff;
    font-size: clamp(38px, 6vw, 72px);
}

.installer-hero p {
    color: #dce2e8;
}

.progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.progress span {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 10px;
    text-align: center;
}

.progress span.active,
.progress span.done {
    background: rgba(22, 131, 247, 0.12);
    color: var(--blue);
}

/* Quarteto Control premium skin */
.saas-base-theme {
    --bg: #10161c;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-soft: #eef3f8;
    --sidebar: #0e151b;
    --sidebar-dark: #090d12;
    --text: #15212b;
    --muted: #71808c;
    --line: rgba(16, 28, 38, 0.11);
    --blue: #00a7ff;
    --green: #17b978;
    --orange: #ffb84d;
    --red: #f05d5e;
    --shadow: 0 18px 48px rgba(8, 13, 18, 0.13);
    background:
        radial-gradient(circle at 16% 4%, rgba(0, 167, 255, 0.2), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(255, 184, 77, 0.14), transparent 24%),
        linear-gradient(135deg, #0e141a 0%, #17232c 48%, #0d1116 100%);
}

.saas-base-theme .topbar {
    min-height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 34px rgba(5, 12, 18, 0.08);
    backdrop-filter: blur(18px);
}

.saas-base-theme .app-layout {
    padding-top: 64px;
}

.saas-base-theme .sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(16, 24, 31, 0.96), rgba(7, 11, 16, 0.98)),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 12px);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.28);
}

.saas-base-theme .sidebar-brand {
    min-height: 64px;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.saas-base-theme .brand-mark {
    border-radius: 12px;
    background: linear-gradient(135deg, #00a7ff, #61f3c1);
    color: #041018;
    box-shadow: 0 14px 28px rgba(0, 167, 255, 0.25);
}

.saas-base-theme .sidebar-user {
    margin: 10px 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.saas-base-theme .sidebar a:not(.sidebar-brand) {
    min-height: 42px;
    border-radius: 12px;
    color: #d6e0e8;
    font-weight: 700;
}

.saas-base-theme .sidebar a:hover,
.saas-base-theme .sidebar a.is-active {
    background: linear-gradient(135deg, rgba(0, 167, 255, 0.95), rgba(0, 132, 204, 0.9));
    box-shadow: 0 12px 24px rgba(0, 167, 255, 0.22);
}

.saas-base-theme .sidebar-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.saas-base-theme .shell {
    padding: 26px 24px 44px;
}

.saas-base-theme .breadcrumb {
    color: rgba(255, 255, 255, 0.68);
}

.saas-base-theme .breadcrumb a,
.saas-base-theme .breadcrumb span:last-child {
    color: #dff5ff;
}

.saas-base-theme .page-head {
    min-height: 86px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05)),
        linear-gradient(90deg, rgba(0, 167, 255, 0.18), transparent);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.saas-base-theme h1 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: 0;
}

.saas-base-theme .eyebrow {
    color: #61f3c1;
}

.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .auth-card,
.saas-base-theme .login-card,
.saas-base-theme .installer-card,
.saas-base-theme .modal-card,
.saas-base-theme .piece-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.saas-base-theme .stat-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 20px;
}

.saas-base-theme .stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 167, 255, 0.13), transparent 42%);
    pointer-events: none;
}

.saas-base-theme .stat-card span,
.saas-base-theme .stat-card strong {
    position: relative;
}

.saas-base-theme .stat-card strong {
    color: #0c1720;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.05;
}

.saas-base-theme .button {
    min-height: 42px;
    border-radius: 12px;
    font-weight: 900;
}

.saas-base-theme .button-primary {
    border: 0;
    background: linear-gradient(135deg, #00a7ff, #017bd7);
    box-shadow: 0 12px 24px rgba(0, 167, 255, 0.25);
}

.saas-base-theme .button-secondary,
.saas-base-theme .button-small {
    background: #fff;
    border-color: rgba(13, 30, 42, 0.12);
}

.saas-base-theme input,
.saas-base-theme select,
.saas-base-theme textarea {
    border-radius: 12px;
    border-color: rgba(13, 30, 42, 0.13);
    background-color: #f9fbfd;
}

.saas-base-theme table {
    border-collapse: separate;
    border-spacing: 0;
}

.saas-base-theme th {
    color: #536674;
    background: #f4f8fb;
}

.saas-base-theme th:first-child {
    border-top-left-radius: 12px;
}

.saas-base-theme th:last-child {
    border-top-right-radius: 12px;
}

.saas-base-theme td {
    background: #fff;
}

.saas-base-theme tr:hover td {
    background: #f8fbff;
}

.saas-base-theme .operation-column {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 44px rgba(8, 13, 18, 0.1);
}

.saas-base-theme .top-search {
    width: min(420px, 42vw);
    border: 1px solid rgba(13, 30, 42, 0.1);
    border-radius: 14px;
    background: #f4f8fb;
}

.saas-base-theme .top-search input {
    width: 100%;
}

.saas-base-theme .top-search button {
    width: 48px;
    color: #fff;
    background: #0c1720;
}

.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .icon-button {
    min-width: 42px;
    min-height: 38px;
    border-radius: 12px;
    background: #f4f8fb;
    color: #23313b;
    font-size: 12px;
    font-weight: 900;
    padding: 0 10px;
}

/* Industrial dark premium direction */
.saas-base-theme {
    --bg: #080c10;
    --surface: #111820;
    --surface-soft: #17212b;
    --sidebar: #070b0f;
    --sidebar-dark: #05080b;
    --text: #e7eef5;
    --muted: #8d9baa;
    --line: rgba(129, 211, 255, 0.14);
    --blue: #28c7ff;
    --green: #23d18b;
    --orange: #ffb84d;
    --red: #ff5d6c;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    background:
        radial-gradient(circle at 12% 8%, rgba(40, 199, 255, 0.18), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(35, 209, 139, 0.12), transparent 24%),
        linear-gradient(135deg, #06090c 0%, #0d141a 48%, #06080b 100%);
    color: var(--text);
}

.saas-base-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 78%);
    pointer-events: none;
}

.saas-base-theme .topbar {
    min-height: 68px;
    background: rgba(8, 13, 18, 0.78);
    border-bottom: 1px solid rgba(40, 199, 255, 0.16);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
    color: #dce7ef;
}

.saas-base-theme .app-layout {
    padding-top: 68px;
}

.saas-base-theme .sidebar {
    background:
        linear-gradient(180deg, rgba(8, 13, 18, 0.98), rgba(3, 6, 9, 0.98)),
        linear-gradient(135deg, rgba(40, 199, 255, 0.08), transparent 44%);
    border-right: 1px solid rgba(40, 199, 255, 0.14);
    box-shadow: 22px 0 70px rgba(0, 0, 0, 0.42);
}

.saas-base-theme .sidebar-brand {
    min-height: 68px;
    border-bottom: 1px solid rgba(40, 199, 255, 0.14);
}

.saas-base-theme .sidebar-brand .sidebar-text {
    display: grid;
    gap: 1px;
    color: #f3f8fb;
    font-size: 15px;
    line-height: 1.1;
}

.saas-base-theme .sidebar-brand small {
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.saas-base-theme .brand-mark {
    border-radius: 10px;
    background: linear-gradient(135deg, #28c7ff, #23d18b);
    color: #020608;
    box-shadow: 0 0 0 1px rgba(40, 199, 255, 0.35), 0 16px 34px rgba(40, 199, 255, 0.24);
}

.saas-base-theme .sidebar-user {
    margin: 12px 8px 16px;
    border: 1px solid rgba(40, 199, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: #dfe9f1;
}

.saas-base-theme .sidebar-avatar {
    background: #111c25;
    color: var(--green);
    box-shadow: inset 0 0 0 1px rgba(35, 209, 139, 0.25);
}

.saas-base-theme .sidebar-label {
    color: #597080;
}

.saas-base-theme .sidebar a:not(.sidebar-brand) {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #b9c7d3;
    font-weight: 800;
}

.saas-base-theme .sidebar a:hover {
    background: rgba(40, 199, 255, 0.08);
    border-color: rgba(40, 199, 255, 0.15);
    color: #fff;
}

.saas-base-theme .sidebar a.is-active {
    background: linear-gradient(135deg, rgba(40, 199, 255, 0.2), rgba(35, 209, 139, 0.12));
    border-color: rgba(40, 199, 255, 0.38);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--blue), 0 14px 30px rgba(0, 0, 0, 0.24);
}

.saas-base-theme .sidebar-icon {
    background: rgba(40, 199, 255, 0.1);
    color: var(--blue);
}

.saas-base-theme .top-links a {
    color: #b6c4cf;
    font-weight: 800;
}

.saas-base-theme .top-links a:hover {
    color: #fff;
}

.saas-base-theme .top-search {
    width: min(460px, 42vw);
    border: 1px solid rgba(40, 199, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
}

.saas-base-theme .top-search input {
    color: #eaf3f9;
    background: transparent;
}

.saas-base-theme .top-search input::placeholder {
    color: #718393;
}

.saas-base-theme .top-search button {
    width: 48px;
    background: rgba(40, 199, 255, 0.14);
    color: var(--blue);
    border-left: 1px solid rgba(40, 199, 255, 0.14);
}

.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .icon-button {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(40, 199, 255, 0.14);
    color: #dce8f0;
}

.saas-base-theme .top-grid {
    color: var(--green);
}

.saas-base-theme .shell {
    padding: 26px 24px 44px;
}

.saas-base-theme .breadcrumb {
    justify-content: flex-start;
    color: #708291;
}

.saas-base-theme .breadcrumb a,
.saas-base-theme .breadcrumb span:last-child {
    color: #bfeeff;
}

.saas-base-theme .page-head {
    min-height: 96px;
    padding: 20px 22px;
    border: 1px solid rgba(40, 199, 255, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(40, 199, 255, 0.13), rgba(35, 209, 139, 0.06)),
        rgba(12, 19, 25, 0.82);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.saas-base-theme h1 {
    color: #f4fbff;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 950;
}

.saas-base-theme h2,
.saas-base-theme h3 {
    color: #e9f4fb;
}

.saas-base-theme p,
.saas-base-theme small,
.saas-base-theme .eyebrow {
    color: #91a3b2;
}

.saas-base-theme .eyebrow {
    color: var(--green);
    font-weight: 950;
}

.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .auth-card,
.saas-base-theme .login-card,
.saas-base-theme .installer-card,
.saas-base-theme .modal-card,
.saas-base-theme .piece-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.035)),
        #0f171e;
    border: 1px solid rgba(40, 199, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.saas-base-theme .stat-card {
    min-height: 136px;
    padding: 20px;
}

.saas-base-theme .stat-card::before {
    background:
        linear-gradient(135deg, rgba(40, 199, 255, 0.17), transparent 48%),
        radial-gradient(circle at 100% 0%, rgba(35, 209, 139, 0.14), transparent 38%);
}

.saas-base-theme .stat-card span {
    color: #8fa1af;
}

.saas-base-theme .stat-card strong {
    color: #f6fbff;
    font-weight: 950;
}

.saas-base-theme .success-card {
    border-left-color: var(--green);
}

.saas-base-theme .warning-card {
    border-left-color: var(--orange);
}

.saas-base-theme .danger-card {
    border-left-color: var(--red);
}

.saas-base-theme input,
.saas-base-theme select,
.saas-base-theme textarea {
    background-color: #0b1218;
    border-color: rgba(40, 199, 255, 0.14);
    border-radius: 12px;
    color: #eaf3f9;
}

.saas-base-theme select option {
    background: #0b1218;
    color: #eaf3f9;
}

.saas-base-theme input:focus,
.saas-base-theme select:focus,
.saas-base-theme textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(40, 199, 255, 0.13);
}

.saas-base-theme .button {
    min-height: 42px;
    border-radius: 12px;
    font-weight: 950;
}

.saas-base-theme .button-primary {
    background: linear-gradient(135deg, #28c7ff, #0079bc);
    color: #fff;
    box-shadow: 0 16px 32px rgba(40, 199, 255, 0.22);
}

.saas-base-theme .button-secondary,
.saas-base-theme .button-small {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(40, 199, 255, 0.14);
    color: #dce8f0;
}

.saas-base-theme table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.saas-base-theme th {
    color: #8fa1af;
    background: transparent;
    border-bottom: 0;
}

.saas-base-theme td {
    background: rgba(255, 255, 255, 0.045);
    border-top: 1px solid rgba(40, 199, 255, 0.08);
    border-bottom: 1px solid rgba(40, 199, 255, 0.08);
    color: #e6f0f7;
}

.saas-base-theme td:first-child {
    border-left: 1px solid rgba(40, 199, 255, 0.08);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.saas-base-theme td:last-child {
    border-right: 1px solid rgba(40, 199, 255, 0.08);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.saas-base-theme tr:hover td {
    background: rgba(40, 199, 255, 0.075);
}

.saas-base-theme .operation-column {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(40, 199, 255, 0.12);
    border-radius: 18px;
}

.saas-base-theme .progress-mini {
    background: rgba(255, 255, 255, 0.1);
}

.saas-base-theme .progress-mini span,
.saas-base-theme .bar-primary {
    background: linear-gradient(180deg, var(--blue), #0079bc);
}

.saas-base-theme .bar-muted {
    background: rgba(255, 255, 255, 0.12);
}

.saas-base-theme .grid-lines line {
    stroke: rgba(255, 255, 255, 0.1);
}

.saas-base-theme .line-main {
    stroke: var(--blue);
}

.saas-base-theme .line-muted {
    stroke: rgba(255, 255, 255, 0.22);
}

.saas-base-theme .alert-success,
.saas-base-theme .toast {
    background: rgba(35, 209, 139, 0.12);
    border: 1px solid rgba(35, 209, 139, 0.22);
    color: #baf8df;
}

.saas-base-theme .alert-danger {
    background: rgba(255, 93, 108, 0.12);
    border: 1px solid rgba(255, 93, 108, 0.22);
    color: #ffd0d5;
}

/* Industrial squared refinement */
.saas-base-theme {
    --radius: 8px;
    --radius-lg: 10px;
}

.saas-base-theme .topbar {
    background: rgba(7, 10, 14, 0.94);
    border-bottom: 1px solid rgba(40, 199, 255, 0.12);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.saas-base-theme .sidebar {
    background: #080d12;
    border-right: 1px solid rgba(40, 199, 255, 0.12);
}

.saas-base-theme .sidebar::after {
    background:
        linear-gradient(90deg, rgba(40, 199, 255, 0.08), transparent),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 38px);
}

.saas-base-theme .brand-mark,
.saas-base-theme .sidebar-icon,
.saas-base-theme .icon-button,
.saas-base-theme .top-search,
.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme input,
.saas-base-theme select,
.saas-base-theme textarea,
.saas-base-theme .button,
.saas-base-theme .button-primary,
.saas-base-theme .button-secondary,
.saas-base-theme .button-small,
.saas-base-theme .badge,
.saas-base-theme .status-badge,
.saas-base-theme .status-pill {
    border-radius: 6px;
}

.saas-base-theme .sidebar-user,
.saas-base-theme .sidebar a:not(.sidebar-brand),
.saas-base-theme .page-head,
.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .auth-card,
.saas-base-theme .login-card,
.saas-base-theme .installer-card,
.saas-base-theme .modal-card,
.saas-base-theme .piece-card,
.saas-base-theme .operation-column {
    border-radius: 8px;
}

.saas-base-theme .page-head,
.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .piece-card,
.saas-base-theme .operation-column {
    background: #0d141b;
    border: 1px solid rgba(64, 83, 98, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.saas-base-theme .page-head {
    border-left: 4px solid var(--blue);
    min-height: 88px;
}

.saas-base-theme .stat-card::before {
    background:
        linear-gradient(90deg, rgba(40, 199, 255, 0.16), transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.saas-base-theme .sidebar a:hover,
.saas-base-theme .sidebar a.is-active {
    border-color: rgba(40, 199, 255, 0.34);
    box-shadow: inset 3px 0 0 var(--blue);
}

.saas-base-theme .sidebar a.is-active {
    background: rgba(40, 199, 255, 0.12);
}

.saas-base-theme .button-primary {
    background: #0b8fca;
    border: 1px solid rgba(40, 199, 255, 0.45);
    box-shadow: 0 10px 24px rgba(0, 121, 188, 0.22);
}

.saas-base-theme .button-primary:hover {
    background: #10a9e8;
    transform: translateY(-1px);
}

.saas-base-theme td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.saas-base-theme td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Dashcube inspired light/dark theme */
.saas-base-theme {
    --dash-sidebar: #0f172a;
    --dash-sidebar-deep: #020617;
    --dash-blue: #2563eb;
    --dash-purple: #4f46e5;
    --dash-cyan: #06b6d4;
    --dash-bg: #f8fafc;
    --dash-card: #ffffff;
    --dash-line: #e2e8f0;
    --dash-text: #0f172a;
    --dash-muted: #64748b;
    
    /* Base color overrides for high-end feel */
    --blue: #3b82f6;
    --green: #10b981;
    --orange: #f59e0b;
    --red: #ef4444;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);

    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.04), transparent 40%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text);
}

.saas-base-theme.dark-mode {
    --dash-bg: #090d16;
    --dash-card: rgba(17, 24, 39, 0.75);
    --dash-line: rgba(255, 255, 255, 0.06);
    --dash-text: #f3f4f6;
    --dash-muted: #9ca3af;
    
    /* Base color overrides for cosmic obsidian dark mode */
    --blue: #38bdf8;
    --green: #34d399;
    --orange: #fbbf24;
    --red: #f87171;
    --bg: #090d16;
    --surface: #111827;
    --surface-soft: #1f2937;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.06);
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);

    background:
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.12), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.1), transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.08), transparent 40%),
        linear-gradient(180deg, #090d16 0%, #0b0f19 100%);
    color: var(--text);
}

.saas-base-theme .topbar {
    min-height: 64px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent), linear-gradient(90deg, #09263e 0%, #105c8c 50%, #463b99 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(9, 38, 62, 0.15);
    transition: left 180ms ease, background 0.3s ease, border-color 0.3s ease;
}

.saas-base-theme.dark-mode .topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent), linear-gradient(90deg, #020617 0%, #052136 50%, #20133c 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.saas-base-theme .sidebar {
    width: var(--sidebar-width);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99)),
        linear-gradient(135deg, rgba(6, 182, 212, 0.18), transparent);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 16px 0 32px rgba(2, 6, 23, 0.25);
}

.saas-base-theme .sidebar::after {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 10% 50%, rgba(6, 182, 212, 0.15), transparent 32%);
}

.saas-base-theme .sidebar-brand {
    min-height: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.saas-base-theme .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid rgba(255, 255, 255, 0.94);
    box-shadow: inset -6px 0 0 rgba(6, 182, 212, 0.32);
    color: transparent;
}

.saas-base-theme .sidebar-brand .sidebar-text {
    color: #fff;
    font-size: 20px;
}

.saas-base-theme .sidebar-brand small {
    color: rgba(255, 255, 255, 0.64);
    letter-spacing: 0.08em;
}

.saas-base-theme .sidebar-user {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.saas-base-theme .sidebar-avatar {
    background: linear-gradient(135deg, #06b6d4, #4f46e5);
    color: #fff;
}

.saas-base-theme .sidebar-label {
    color: rgba(219, 237, 249, 0.5);
}

.saas-base-theme .sidebar a:not(.sidebar-brand) {
    color: rgba(236, 247, 255, 0.84);
    border: 0;
    border-radius: 8px;
    min-height: 40px;
    margin: 2px 0;
    transition: all 0.2s ease;
}

.saas-base-theme .sidebar a:hover,
.saas-base-theme .sidebar a.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 4px 0 0 #06b6d4;
}

.saas-base-theme .sidebar-icon {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.82);
    border-radius: 6px;
}

.saas-base-theme .top-links a,
.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .icon-button {
    color: #ffffff;
}

.saas-base-theme.dark-mode .top-links a,
.saas-base-theme.dark-mode .top-notification,
.saas-base-theme.dark-mode .top-grid,
.saas-base-theme.dark-mode .icon-button {
    color: #ffffff;
}

.saas-base-theme .top-links a {
    opacity: 0.82;
}

.saas-base-theme .top-search {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.saas-base-theme.dark-mode .top-search {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-base-theme .top-search input,
.saas-base-theme .top-search input::placeholder {
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.8;
}

.saas-base-theme.dark-mode .top-search input,
.saas-base-theme.dark-mode .top-search input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.saas-base-theme .top-search button,
.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .icon-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.saas-base-theme.dark-mode .top-search button,
.saas-base-theme.dark-mode .top-notification,
.saas-base-theme.dark-mode .top-grid,
.saas-base-theme.dark-mode .icon-button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-base-theme .top-search button:hover,
.saas-base-theme .top-notification:hover,
.saas-base-theme .icon-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.22);
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.saas-base-theme.dark-mode .theme-switch {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.theme-switch-track {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 22px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.15);
}

.saas-base-theme.dark-mode .theme-switch-track {
    background: rgba(255, 255, 255, 0.25);
}

.theme-switch-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.dark-mode .theme-switch-thumb {
    transform: translateX(20px);
}

.saas-base-theme .shell {
    padding: 26px 24px 44px;
}

.saas-base-theme .breadcrumb {
    color: var(--dash-muted);
}

.saas-base-theme .breadcrumb a,
.saas-base-theme .breadcrumb span:last-child {
    color: #1679bd;
}

.saas-base-theme.dark-mode .breadcrumb a,
.saas-base-theme.dark-mode .breadcrumb span:last-child {
    color: #dff5ff;
}

.saas-base-theme .page-head,
.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .auth-card,
.saas-base-theme .login-card,
.saas-base-theme .installer-card,
.saas-base-theme .modal-card,
.saas-base-theme .piece-card,
.saas-base-theme .operation-column {
    background: var(--dash-card);
    border: 1px solid var(--dash-line);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.01), 0 10px 24px -5px rgba(15, 23, 42, 0.05);
}

.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .piece-card,
.saas-base-theme .operation-column {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease;
}

.saas-base-theme .panel:hover,
.saas-base-theme .stat-card:hover,
.saas-base-theme .piece-card:hover,
.saas-base-theme .operation-column:hover {
    transform: translateY(-4px) scale(1.006);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.25);
    border-color: rgba(37, 99, 235, 0.35);
}

.saas-base-theme.dark-mode .page-head,
.saas-base-theme.dark-mode .panel,
.saas-base-theme.dark-mode .stat-card,
.saas-base-theme.dark-mode .auth-card,
.saas-base-theme.dark-mode .login-card,
.saas-base-theme.dark-mode .installer-card,
.saas-base-theme.dark-mode .modal-card,
.saas-base-theme.dark-mode .piece-card,
.saas-base-theme.dark-mode .operation-column {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.saas-base-theme.dark-mode .panel:hover,
.saas-base-theme.dark-mode .stat-card:hover,
.saas-base-theme.dark-mode .piece-card:hover,
.saas-base-theme.dark-mode .operation-column:hover {
    transform: translateY(-4px) scale(1.006);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
}

.saas-base-theme .page-head {
    border-left: 0;
    min-height: 92px;
    background:
        linear-gradient(135deg, rgba(16, 135, 216, 0.08), rgba(107, 85, 217, 0.06)),
        var(--dash-card);
}

.saas-base-theme.dark-mode .page-head {
    background:
        linear-gradient(135deg, rgba(16, 135, 216, 0.18), rgba(107, 85, 217, 0.16)),
        var(--dash-card);
}

.saas-base-theme h1,
.saas-base-theme h2,
.saas-base-theme h3,
.saas-base-theme .stat-card strong {
    color: var(--dash-text);
}

.saas-base-theme p,
.saas-base-theme small,
.saas-base-theme .stat-card span {
    color: var(--dash-muted);
}

.saas-base-theme .eyebrow {
    color: #1087d8;
}

.saas-base-theme.dark-mode .eyebrow {
    color: #7ce7ff;
}

.saas-base-theme .stat-card::before {
    background:
        linear-gradient(135deg, rgba(16, 135, 216, 0.11), transparent 54%),
        radial-gradient(circle at 100% 100%, rgba(107, 85, 217, 0.1), transparent 40%);
}

.saas-base-theme input,
.saas-base-theme select,
.saas-base-theme textarea {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
}

.saas-base-theme.dark-mode input,
.saas-base-theme.dark-mode select,
.saas-base-theme.dark-mode textarea,
.saas-base-theme.dark-mode select option {
    background-color: rgba(17, 24, 39, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
}

.saas-base-theme input:focus,
.saas-base-theme select:focus,
.saas-base-theme textarea:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.saas-base-theme.dark-mode input:focus,
.saas-base-theme.dark-mode select:focus,
.saas-base-theme.dark-mode textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
}

.saas-base-theme .button,
.saas-base-theme .button-primary,
.saas-base-theme .button-secondary,
.saas-base-theme .button-small {
    border-radius: 12px;
}

.saas-base-theme .button-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: 0;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.saas-base-theme .button-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.saas-base-theme .button-secondary,
.saas-base-theme .button-small {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--dash-text);
}

.saas-base-theme.dark-mode .button-secondary,
.saas-base-theme.dark-mode .button-small {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
}

.saas-base-theme table {
    border-spacing: 0;
    width: 100%;
}

.saas-base-theme th {
    background: #f8fafc;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 12px 14px;
}

.saas-base-theme td {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    border-top: 0;
    color: #334155;
    font-size: 13.5px;
    padding: 14px 14px;
}

.saas-base-theme.dark-mode th {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.saas-base-theme.dark-mode td {
    background: rgba(17, 24, 39, 0.4);
    border-color: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
}

.saas-base-theme td:first-child,
.saas-base-theme td:last-child {
    border-radius: 0;
}

.saas-base-theme tr:hover td {
    background: #f1f5f9;
}

.saas-base-theme.dark-mode tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.saas-base-theme .progress-mini {
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.saas-base-theme.dark-mode .progress-mini {
    background: rgba(255, 255, 255, 0.08);
}

.saas-base-theme .progress-mini span,
.saas-base-theme .bar-primary {
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.brand-logo {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.login-brand .brand-logo {
    width: 72px;
    height: 72px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.saas-base-theme .sidebar-brand .brand-logo {
    width: 38px;
    height: 38px;
    padding: 2px;
}

body.sidebar-collapsed .sidebar-brand .brand-logo {
    width: 34px;
    height: 34px;
}

.page-title-with-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.page-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(16, 135, 216, 0.14);
    box-shadow: 0 12px 24px rgba(38, 86, 125, 0.14);
    flex: 0 0 auto;
}

.saas-base-theme.dark-mode .page-logo {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

/* Topbar action buttons polish */
.saas-base-theme .topbar-right {
    gap: 10px;
}

.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .theme-switch {
    position: relative;
    height: 38px;
    min-width: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(13, 42, 76, 0.16);
    line-height: 1;
}

.saas-base-theme .top-notification:hover,
.saas-base-theme .top-grid:hover,
.saas-base-theme .theme-switch:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.top-action-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 950;
}

.top-action-label {
    font-size: 12px;
    font-weight: 850;
}

.saas-base-theme .top-notification small {
    position: absolute;
    top: -7px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: #ff3d57;
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    box-shadow: 0 8px 16px rgba(255, 61, 87, 0.28);
}

.saas-base-theme .top-notification.warning small {
    background: #ffad18;
    box-shadow: 0 8px 16px rgba(255, 173, 24, 0.26);
}

.saas-base-theme .top-grid {
    padding-right: 14px;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.06em;
}

.saas-base-theme .top-grid span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #33e08a;
    box-shadow: 0 0 0 5px rgba(51, 224, 138, 0.14);
}

.saas-base-theme .theme-switch {
    padding-left: 8px;
}

.saas-base-theme .theme-switch-track {
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.16);
}

.saas-base-theme .theme-switch-thumb {
    background: #fff;
}

.saas-base-theme.dark-mode .top-notification,
.saas-base-theme.dark-mode .top-grid,
.saas-base-theme.dark-mode .theme-switch {
    background: rgba(6, 25, 39, 0.34);
    border-color: rgba(255, 255, 255, 0.16);
}

.top-action-wrap {
    position: relative;
    display: inline-flex;
}

.top-notification {
    cursor: pointer;
    font-family: inherit;
}

.top-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 120;
    width: min(360px, 86vw);
    max-height: 430px;
    overflow: auto;
    padding: 10px;
    display: none;
    border: 1px solid rgba(16, 135, 216, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 60px rgba(13, 42, 76, 0.24);
}

.top-dropdown.is-open {
    display: block;
}

.top-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: inherit;
    border-left: 1px solid rgba(16, 135, 216, 0.16);
    border-top: 1px solid rgba(16, 135, 216, 0.16);
    transform: rotate(45deg);
}

.top-dropdown-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid #e3edf5;
}

.top-dropdown-head strong {
    color: #173349;
    font-size: 14px;
}

.top-dropdown-head span,
.top-empty {
    color: #6d7f90;
    font-size: 12px;
}

.top-empty {
    margin: 0;
    padding: 14px 8px 8px;
}

.top-dropdown-item {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 11px 10px 11px 14px;
    color: #203545;
    text-decoration: none;
    border-bottom: 1px solid #edf3f8;
}

.top-dropdown-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 999px;
    background: #1087d8;
}

.top-dropdown-item.warning::before {
    background: #ffad18;
}

.top-dropdown-item.danger::before {
    background: #ff3d57;
}

.top-dropdown-item:hover {
    background: #f1f8fd;
}

.top-dropdown-item span {
    font-size: 13px;
    font-weight: 900;
}

.top-dropdown-item small {
    color: #6d7f90;
    font-size: 12px;
}

.saas-base-theme.dark-mode .top-dropdown {
    background: rgba(7, 28, 44, 0.98);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 70px rgba(0, 12, 24, 0.34);
}

.saas-base-theme.dark-mode .top-dropdown-head {
    border-color: rgba(255, 255, 255, 0.11);
}

.saas-base-theme.dark-mode .top-dropdown-head strong,
.saas-base-theme.dark-mode .top-dropdown-item {
    color: #effaff;
}

.saas-base-theme.dark-mode .top-dropdown-head span,
.saas-base-theme.dark-mode .top-dropdown-item small,
.saas-base-theme.dark-mode .top-empty {
    color: #a8c0d1;
}

.saas-base-theme.dark-mode .top-dropdown-item {
    border-color: rgba(255, 255, 255, 0.08);
}

.saas-base-theme.dark-mode .top-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-menu-wrap {
    margin-left: 2px;
}

.user-chip {
    min-height: 42px;
    padding: 4px 10px 4px 5px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(13, 42, 76, 0.14);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.user-chip:hover {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px rgba(13, 42, 76, 0.2);
    transform: translateY(-1px);
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffbf45, #19b6d6);
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(13, 42, 76, 0.2);
}

.user-avatar.large {
    width: 48px;
    height: 48px;
}

.user-chip-text {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.user-chip-text strong {
    max-width: 130px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip-text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
}

.user-chip-caret {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 950;
}

.user-dropdown {
    width: 244px;
    padding: 0;
    overflow: visible;
}

.user-dropdown::before {
    right: 34px;
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid #edf3f8;
}

.user-dropdown-head strong {
    display: block;
    color: #203545;
    font-size: 14px;
}

.user-dropdown-head small {
    color: #6d7f90;
    font-size: 12px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #33495b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
}

.user-dropdown-item span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d3e0ea;
    border-radius: 50%;
    color: #576b7c;
    font-size: 12px;
    font-weight: 950;
}

.user-dropdown-item:hover {
    background: #f2f8fd;
    color: #0f73bd;
}

.user-dropdown-logout {
    display: flex;
    justify-content: center;
    margin: 12px 14px 14px;
    padding: 11px 14px;
    border-radius: 7px;
    background: linear-gradient(135deg, #0d73ff, #075ee4);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(13, 115, 255, 0.22);
}

.user-dropdown-logout:hover {
    background: linear-gradient(135deg, #2383ff, #0b63ea);
}

.profile-summary {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 8px;
}

.profile-avatar {
    width: 78px;
    height: 78px;
    font-size: 28px;
}

.saas-base-theme.dark-mode .user-dropdown-head {
    border-color: rgba(255, 255, 255, 0.1);
}

.saas-base-theme.dark-mode .user-dropdown-head strong,
.saas-base-theme.dark-mode .user-dropdown-item {
    color: #effaff;
}

.saas-base-theme.dark-mode .user-dropdown-head small {
    color: #a8c0d1;
}

.saas-base-theme.dark-mode .user-dropdown-item span {
    border-color: rgba(255, 255, 255, 0.18);
    color: #d8f3ff;
}

.saas-base-theme.dark-mode .user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #7ce7ff;
}

.button.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.record-id {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(16, 135, 216, 0.1);
    border: 1px solid rgba(16, 135, 216, 0.18);
    color: #126093;
    font-size: 12px;
    font-weight: 950;
}

.saas-base-theme.dark-mode .record-id {
    background: rgba(124, 231, 255, 0.12);
    border-color: rgba(124, 231, 255, 0.2);
    color: #dff5ff;
}

.role-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 210px;
    padding: 10px;
    overflow: auto;
    border: 1px solid #d8e6f1;
    border-radius: 10px;
    background: #f8fcff;
}

.saas-base-theme.dark-mode .role-picker {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.role-chip {
    position: relative;
    display: block;
    cursor: pointer;
}

.role-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-chip span {
    display: block;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid #cfdeea;
    border-radius: 8px;
    background: #fff;
    color: #244052;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    transition: all 0.18s ease;
}

.saas-base-theme.dark-mode .role-chip span {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #effaff;
}

.role-chip input:checked + span {
    border-color: rgba(16, 135, 216, 0.58);
    background: linear-gradient(135deg, rgba(16, 135, 216, 0.18), rgba(25, 182, 214, 0.12));
    color: #0d3d61;
    box-shadow: 0 8px 16px rgba(16, 135, 216, 0.16);
}

.saas-base-theme.dark-mode .role-chip input:checked + span {
    color: #dff5ff;
    border-color: rgba(124, 231, 255, 0.45);
    background: linear-gradient(135deg, rgba(16, 135, 216, 0.3), rgba(107, 85, 217, 0.2));
}

.type-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.type-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    border: 1px solid rgba(141, 158, 173, 0.32);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-option-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(22, 131, 247, 0.12), rgba(245, 183, 61, 0.13));
    color: #1671c7;
}

.type-option-icon i {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.type-option strong,
.type-option small {
    display: block;
}

.type-option strong {
    color: #1c3142;
    font-size: 14px;
    font-weight: 900;
}

.type-option small {
    margin-top: 3px;
    color: #6a7c8b;
    font-size: 12px;
    line-height: 1.25;
}

.field-label {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.service-contract-field {
    display: none;
}

.service-contract-field.is-visible {
    display: block;
}

.type-option:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 131, 247, 0.36);
    box-shadow: 0 12px 24px rgba(18, 67, 104, 0.1);
}

.type-option:has(input:checked) {
    border-color: rgba(22, 131, 247, 0.62);
    background: linear-gradient(135deg, rgba(22, 131, 247, 0.13), rgba(25, 182, 214, 0.08));
    box-shadow: inset 0 0 0 1px rgba(22, 131, 247, 0.18), 0 14px 28px rgba(22, 131, 247, 0.12);
}

.type-option:has(input:checked) .type-option-icon {
    background: linear-gradient(135deg, #1683f7, #19b6d6);
    color: #fff;
}

.lookup-field {
    position: relative;
}

.lookup-field input[type="search"] {
    width: 100%;
}

.lookup-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(22, 131, 247, 0.22);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(16, 54, 84, 0.18);
}

.lookup-results.is-open {
    display: grid;
    gap: 6px;
}

.lookup-option,
.lookup-empty {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    color: #1c3142;
    text-align: left;
}

.lookup-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.lookup-option strong,
.lookup-option small {
    display: block;
}

.lookup-option strong {
    font-size: 13px;
    font-weight: 900;
}

.lookup-option small {
    color: #6a7c8b;
    font-size: 11px;
    font-weight: 800;
}

.lookup-option:hover {
    background: linear-gradient(135deg, rgba(22, 131, 247, 0.1), rgba(25, 182, 214, 0.08));
}

.lookup-option-stacked {
    display: block;
}

.qualification-cards {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.qualification-cards.is-visible {
    display: grid;
}

.qualification-card {
    min-height: 76px;
    padding: 14px;
    border: 1px solid rgba(22, 131, 247, 0.18);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(22, 131, 247, 0.09), rgba(245, 183, 61, 0.08));
    box-shadow: 0 12px 24px rgba(18, 67, 104, 0.08);
}

.qualification-card span,
.qualification-card strong {
    display: block;
}

.qualification-card span {
    color: #6a7c8b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qualification-card strong {
    margin-top: 6px;
    color: #1c3142;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
}

.linked-pieces-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(141, 158, 173, 0.18);
}

.piece-weight-preview {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(22, 131, 247, 0.2);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(22, 131, 247, 0.1), rgba(245, 183, 61, 0.1)),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 28px rgba(18, 67, 104, 0.08);
}

.piece-weight-preview span {
    color: #6a7c8b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.piece-weight-preview strong {
    color: #172c3d;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.piece-weight-preview small {
    color: #6a7c8b;
    font-size: 12px;
    font-weight: 800;
}

.lookup-empty {
    color: #6a7c8b;
    font-size: 12px;
    font-weight: 800;
}

.saas-base-theme.dark-mode .type-option {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.saas-base-theme.dark-mode .type-option strong {
    color: #eff9ff;
}

.saas-base-theme.dark-mode .type-option small {
    color: rgba(226, 242, 252, 0.68);
}

.saas-base-theme.dark-mode .type-option:has(input:checked) {
    border-color: rgba(124, 231, 255, 0.48);
    background: linear-gradient(135deg, rgba(25, 182, 214, 0.18), rgba(107, 85, 217, 0.12));
}

.saas-base-theme.dark-mode .lookup-results {
    background: #10283a;
    border-color: rgba(124, 231, 255, 0.22);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.saas-base-theme.dark-mode .lookup-option,
.saas-base-theme.dark-mode .lookup-empty {
    color: #eef9ff;
}

.saas-base-theme.dark-mode .lookup-option small,
.saas-base-theme.dark-mode .lookup-empty {
    color: rgba(226, 242, 252, 0.68);
}

.saas-base-theme.dark-mode .qualification-card {
    background: linear-gradient(135deg, rgba(25, 182, 214, 0.13), rgba(245, 183, 61, 0.08));
    border-color: rgba(124, 231, 255, 0.18);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.saas-base-theme.dark-mode .qualification-card span {
    color: rgba(226, 242, 252, 0.68);
}

.saas-base-theme.dark-mode .qualification-card strong {
    color: #eff9ff;
}

.saas-base-theme.dark-mode .linked-pieces-box {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.saas-base-theme.dark-mode .piece-weight-preview {
    background:
        linear-gradient(135deg, rgba(25, 182, 214, 0.14), rgba(245, 183, 61, 0.09)),
        rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 231, 255, 0.2);
}

.saas-base-theme.dark-mode .piece-weight-preview span,
.saas-base-theme.dark-mode .piece-weight-preview small {
    color: rgba(226, 242, 252, 0.68);
}

.saas-base-theme.dark-mode .piece-weight-preview strong {
    color: #eff9ff;
}

.actions-cell {
    gap: 8px;
}

.action-btn {
    display: inline-grid;
    place-items: center;
    align-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
    font-size: 0;
}

.action-btn i {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.action-whatsapp {
    background: linear-gradient(135deg, #10a857, #0e944d);
    color: #fff;
    border: 1px solid rgba(16, 168, 87, 0.34);
}

.action-whatsapp i {
    color: #0d7d42;
}

.action-dashboard {
    background: linear-gradient(135deg, #23a6f2, #136fc5);
    color: #fff;
    border: 1px solid rgba(35, 166, 242, 0.38);
}

.action-dashboard i {
    color: #1261ad;
}

.action-payment {
    background: linear-gradient(135deg, #25b875, #11965b);
    color: #fff;
    border: 1px solid rgba(37, 184, 117, 0.38);
}

.action-payment i {
    color: #0d7c4a;
}

.action-edit {
    background: linear-gradient(135deg, #157fdd, #0f66b6);
    color: #fff;
    border: 1px solid rgba(21, 127, 221, 0.36);
}

.action-edit i {
    color: #0f66b6;
}

.action-view {
    background: linear-gradient(135deg, #5f7187, #425268);
    color: #fff;
    border: 1px solid rgba(95, 113, 135, 0.36);
}

.action-view i {
    color: #425268;
}

.action-qr {
    background: linear-gradient(135deg, #f5b73d, #d99012);
    color: #fff;
    border: 1px solid rgba(245, 183, 61, 0.4);
}

.action-qr i {
    color: #bc760c;
}

.action-history {
    background: linear-gradient(135deg, #27a7a2, #168681);
    color: #fff;
    border: 1px solid rgba(39, 167, 162, 0.36);
}

.action-history i {
    color: #13706c;
}

.action-print {
    background: linear-gradient(135deg, #7c5cff, #5b3fd4);
    color: #fff;
    border: 1px solid rgba(124, 92, 255, 0.36);
}

.action-print i {
    color: #4e36bd;
}

.action-status {
    background: linear-gradient(135deg, #f5b73d, #dd9516);
    color: #fff;
    border: 1px solid rgba(245, 183, 61, 0.4);
}

.action-status i {
    color: #b8750d;
}

.action-priority {
    background: linear-gradient(135deg, #ff6b35, #db3f1f);
    color: #fff;
    border: 1px solid rgba(255, 107, 53, 0.38);
}

.action-priority i {
    color: #c53317;
}

.status-modal-card {
    max-width: 520px;
}

.action-delete {
    background: linear-gradient(135deg, #e74d61, #cd3147);
    color: #fff;
    border: 1px solid rgba(231, 77, 97, 0.36);
}

.action-delete i {
    color: #bd2942;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.action-btn.is-disabled {
    background: linear-gradient(135deg, #8f9fb0, #7f8e9e);
    border-color: rgba(127, 142, 158, 0.35);
    color: #f5f9fd;
}

.confirm-modal-card {
    max-width: 420px;
    text-align: center;
    border-radius: 14px;
    border: 1px solid rgba(231, 77, 97, 0.22);
}

.confirm-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(231, 77, 97, 0.14);
    border: 1px solid rgba(231, 77, 97, 0.26);
    color: #cf3147;
    font-size: 22px;
    font-weight: 950;
}

/* Clean topbar menu/search */
.menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.13);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(13, 42, 76, 0.14);
    transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: #fff;
}

body.sidebar-collapsed .menu-toggle.desktop-only span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.sidebar-collapsed .menu-toggle.desktop-only span:nth-child(2) {
    opacity: 0;
}

body.sidebar-collapsed .menu-toggle.desktop-only span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.saas-base-theme .top-search {
    width: min(560px, 48vw);
    height: 42px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 22px rgba(13, 42, 76, 0.14);
}

.search-icon {
    width: 18px;
    height: 18px;
    margin-left: 14px;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    position: relative;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    transform: rotate(45deg);
}

.saas-base-theme .top-search input {
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-weight: 700;
}

.saas-base-theme .top-search input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.saas-base-theme .top-search button {
    height: 30px;
    margin-right: 6px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #126093;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
}

.saas-base-theme .top-search button:hover {
    background: #fff;
}

/* Topbar final controls */
.saas-base-theme .topbar-left {
    gap: 12px;
}

.saas-base-theme .menu-toggle,
.dashboard-shortcut {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(13, 42, 76, 0.16);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.saas-base-theme .menu-toggle:hover,
.dashboard-shortcut:hover {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px rgba(13, 42, 76, 0.2);
    transform: translateY(-1px);
}

.saas-base-theme .menu-toggle span {
    width: 16px;
}

.dashboard-shortcut span {
    width: 17px;
    height: 17px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    border: 0;
    border-radius: 0;
}

.dashboard-shortcut span::before,
.dashboard-shortcut span::after {
    content: "";
    display: block;
    border-radius: 3px;
    background:
        linear-gradient(#fff, #fff) left top / 7px 7px no-repeat,
        linear-gradient(#fff, #fff) right top / 7px 7px no-repeat,
        linear-gradient(#fff, #fff) left bottom / 7px 7px no-repeat,
        linear-gradient(#fff, #fff) right bottom / 7px 7px no-repeat;
}

.dashboard-shortcut span::before {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.dashboard-shortcut span::after {
    display: none;
}

.saas-base-theme .top-search {
    width: min(620px, 50vw);
    height: 44px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 28px rgba(13, 42, 76, 0.16);
}

.saas-base-theme.dark-mode .top-search {
    background: rgba(5, 30, 48, 0.74);
    border-color: rgba(255, 255, 255, 0.18);
}

.saas-base-theme .top-search input {
    color: #1b3448;
    font-weight: 800;
}

.saas-base-theme.dark-mode .top-search input {
    color: #fff;
}

.saas-base-theme .top-search input::placeholder {
    color: #7a8d9d;
}

.saas-base-theme.dark-mode .top-search input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.search-icon {
    border-color: #4f6f86;
}

.search-icon::after {
    background: #4f6f86;
}

.saas-base-theme.dark-mode .search-icon {
    border-color: rgba(255, 255, 255, 0.76);
}

.saas-base-theme.dark-mode .search-icon::after {
    background: rgba(255, 255, 255, 0.76);
}

.saas-base-theme .top-search button {
    width: 34px;
    height: 34px;
    margin-right: 5px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #1087d8, #6b55d9);
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 135, 216, 0.22);
}

.saas-base-theme .top-search button:hover {
    background: linear-gradient(135deg, #1799ef, #7660ec);
}

.search-submit span {
    width: 14px;
    height: 14px;
    display: block;
    position: relative;
    border: 2px solid #fff;
    border-radius: 50%;
}

.search-submit span::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transform: rotate(45deg);
}

/* Calendar */
.calendar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calendar-month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 950;
    letter-spacing: 0.06em;
}

.calendar-panel {
    overflow: hidden;
}

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

.calendar-weekday {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 950;
    text-align: center;
}

.saas-base-theme .calendar-weekday {
    background: rgba(255, 255, 255, 0.72);
    color: #244052;
    border: 1px solid rgba(219, 231, 241, 0.9);
}

.saas-base-theme.dark-mode .calendar-weekday {
    background: rgba(255, 255, 255, 0.08);
    color: #effaff;
    border-color: rgba(255, 255, 255, 0.12);
}

.calendar-day {
    min-height: 130px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(219, 231, 241, 0.9);
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
}

.saas-base-theme.dark-mode .calendar-day {
    background: rgba(7, 28, 44, 0.62);
    border-color: rgba(255, 255, 255, 0.12);
}

.calendar-day.is-muted {
    opacity: 0.52;
}

.calendar-day.is-today {
    outline: 3px solid rgba(16, 135, 216, 0.22);
}

.saas-base-theme.dark-mode .calendar-day.is-today {
    outline: 3px solid rgba(124, 231, 255, 0.2);
}

.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.calendar-day-head strong {
    color: #183246;
    font-weight: 950;
}

.saas-base-theme.dark-mode .calendar-day-head strong {
    color: #effaff;
}

.calendar-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(16, 135, 216, 0.12);
    border: 1px solid rgba(16, 135, 216, 0.2);
    color: #0f73bd;
    font-size: 12px;
    font-weight: 950;
}

.saas-base-theme.dark-mode .calendar-count {
    background: rgba(124, 231, 255, 0.12);
    border-color: rgba(124, 231, 255, 0.18);
    color: #dff5ff;
}

.calendar-empty {
    color: #8aa0b2;
    font-weight: 800;
}

.saas-base-theme.dark-mode .calendar-empty {
    color: rgba(232, 247, 255, 0.62);
}

.calendar-item {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    background: #f2f8fd;
    border: 1px solid #dbe7f1;
    color: #203545;
}

.saas-base-theme.dark-mode .calendar-item {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    color: #effaff;
}

.calendar-item:hover {
    background: #eaf6ff;
    border-color: rgba(16, 135, 216, 0.28);
}

.saas-base-theme.dark-mode .calendar-item:hover {
    background: rgba(25, 182, 214, 0.14);
    border-color: rgba(124, 231, 255, 0.22);
}

.calendar-item-title {
    font-weight: 950;
    font-size: 13px;
    line-height: 1.1;
}

.calendar-item-meta {
    font-size: 12px;
    color: #6d7f90;
    font-weight: 800;
}

.saas-base-theme.dark-mode .calendar-item-meta {
    color: #a8c0d1;
}

.calendar-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(16, 135, 216, 0.14);
    overflow: hidden;
}

.calendar-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #19b6d6, #6b55d9);
}

.calendar-item.status-completed .calendar-progress span {
    background: linear-gradient(90deg, #33e08a, #19b6d6);
}

.calendar-item.status-cancelled {
    opacity: 0.72;
}

.print-page {
    background: #eef2f6;
    color: #162536;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.project-print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 18px auto;
    padding: 12mm;
    background: #fff;
    box-shadow: 0 16px 45px rgba(16, 37, 54, 0.16);
}

.project-print-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d9e4ee;
}

.project-print-head img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.project-print-head span {
    display: block;
    color: #607487;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-print-head h1 {
    margin: 2px 0;
    color: #142b3d;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.05;
}

.project-print-head p {
    margin: 0;
    color: #607487;
    font-size: 11px;
    font-weight: 800;
}

.project-print-kpis {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, 1fr);
    gap: 6px;
    margin: 10px 0;
}

.project-print-kpis div {
    padding: 8px;
    border-radius: 8px;
    background: #142b3d;
    color: #fff;
}

.project-print-kpis span,
.project-print-kpis strong {
    display: block;
}

.project-print-kpis span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-print-kpis strong {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 900;
}

.project-print-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 10px 0;
}

.project-print-grid div,
.project-print-section {
    border: 1px solid #dce8f1;
    border-radius: 7px;
    padding: 7px;
}

.project-print-grid span {
    display: block;
    margin-bottom: 3px;
    color: #718394;
    font-size: 8.5px;
    font-weight: 900;
    text-transform: uppercase;
}

.project-print-grid strong {
    color: #172c3d;
    font-size: 10.5px;
    line-height: 1.18;
}

.project-print-section {
    margin-top: 8px;
}

.project-print-section h2 {
    margin: 0 0 6px;
    color: #172c3d;
    font-size: 12px;
    font-weight: 900;
}

.project-print-section p {
    margin: 0;
    color: #263d50;
    font-size: 10px;
    line-height: 1.35;
}

.project-print-section table {
    width: 100%;
    border-collapse: collapse;
}

.project-print-section th,
.project-print-section td {
    padding: 4px 5px;
    border-bottom: 1px solid #e5edf4;
    text-align: left;
    font-size: 9px;
    line-height: 1.2;
}

.project-print-section th {
    color: #607487;
    font-size: 8px;
    text-transform: uppercase;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 7mm;
    }

    body.print-page {
        background: #fff;
    }

    .project-print-sheet {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* Sidebar premium navigation */
.saas-base-theme .sidebar {
    padding: 0 10px 22px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.99)),
        radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 34%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.saas-base-theme:not(.sidebar-collapsed) {
    --sidebar-width: 284px;
}

.saas-base-theme .sidebar-brand {
    margin: 0 -10px 10px;
    padding: 12px 14px;
    min-height: 68px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-base-theme .brand-title {
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.saas-base-theme .sidebar-user {
    margin: 10px 0 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-base-theme .sidebar-section {
    gap: 5px;
}

.saas-base-theme .sidebar-separator {
    height: 1px;
    margin: 10px 8px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.saas-base-theme .sidebar a:not(.sidebar-brand),
.saas-base-theme .sidebar-group-title {
    position: relative;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: rgba(236, 247, 255, 0.82);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.saas-base-theme .sidebar a:not(.sidebar-brand):hover,
.saas-base-theme .sidebar-group-title:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(2px);
}

.saas-base-theme .sidebar a.is-active,
.saas-base-theme .sidebar-group-title.is-active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.12));
    border-color: rgba(6, 182, 212, 0.3);
    color: #fff;
    box-shadow: inset 3px 0 0 #06b6d4, 0 12px 22px rgba(2, 6, 23, 0.3);
}

.saas-base-theme .sidebar-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.saas-base-theme .sidebar-icon i,
.saas-base-theme .sidebar-caret i {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.saas-base-theme .sidebar a.is-active .sidebar-icon,
.saas-base-theme .sidebar-group-title.is-active .sidebar-icon {
    background: rgba(124, 231, 255, 0.18);
    color: #e8fbff;
}

.saas-base-theme .sidebar-submenu {
    gap: 4px;
    margin: 5px 0 3px;
    padding-left: 18px;
}

.saas-base-theme .sidebar-submenu a:not(.sidebar-brand) {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 10px;
}

.saas-base-theme .sidebar-submenu .sidebar-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 8px;
}

.saas-base-theme .sidebar-caret {
    margin-left: auto;
    display: inline-grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.18s ease;
}

body.saas-base-theme.sidebar-collapsed .sidebar-group-title {
    display: flex;
    justify-content: center;
}

body.saas-base-theme.sidebar-collapsed .sidebar-submenu {
    display: none;
}

body.sidebar-collapsed .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.sidebar-collapsed .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.sidebar-collapsed .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Sidebar brand polish */
.saas-base-theme .sidebar-brand {
    justify-content: flex-start;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
}

.saas-base-theme .sidebar-brand .brand-logo {
    width: 36px;
    height: 36px;
    padding: 1px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.saas-base-theme .brand-title {
    max-width: 170px;
    color: rgba(255, 255, 255, 0.94);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.saas-base-theme.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    min-height: 62px;
    padding: 12px 0;
}

body.saas-base-theme.sidebar-collapsed .sidebar-brand .brand-title,
body.saas-base-theme.sidebar-collapsed .sidebar-brand .sidebar-text {
    display: none;
}

body.saas-base-theme.sidebar-collapsed .sidebar-brand .brand-logo {
    width: 38px;
    height: 38px;
}

/* Compact sidebar header */
.saas-base-theme .sidebar {
    padding-top: 0;
    padding-bottom: 12px;
}

.saas-base-theme .sidebar-brand {
    gap: 9px;
    min-height: 42px;
    margin: 0 -10px 4px;
    padding: 6px 12px;
}

.saas-base-theme .sidebar-brand .brand-logo {
    width: 28px;
    height: 28px;
}

.saas-base-theme .brand-title {
    max-width: 150px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.01em;
}

.saas-base-theme .sidebar-user {
    min-height: 32px;
    margin: 4px 0 5px;
    padding: 4px 8px;
    border-radius: 10px;
}

.saas-base-theme .sidebar-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.saas-base-theme .sidebar-user .sidebar-text {
    font-size: 11px;
    line-height: 1.1;
}

.saas-base-theme .sidebar-section {
    gap: 2px;
}

.saas-base-theme .sidebar-separator {
    margin: 4px 10px;
}

.saas-base-theme .sidebar a:not(.sidebar-brand),
.saas-base-theme .sidebar-group-title {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 10.5px;
    letter-spacing: 0.035em;
}

.saas-base-theme .sidebar-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 8px;
}

.saas-base-theme .sidebar-icon i,
.saas-base-theme .sidebar-caret i {
    width: 14px;
    height: 14px;
}

.saas-base-theme .sidebar-submenu {
    margin: 3px 0 2px;
    padding-left: 13px;
}

.saas-base-theme .sidebar-submenu a:not(.sidebar-brand) {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 10px;
}

.saas-base-theme .sidebar-submenu .sidebar-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

body.saas-base-theme.sidebar-collapsed .sidebar-brand {
    min-height: 42px;
    margin-bottom: 4px;
    padding: 5px 0;
}

body.saas-base-theme.sidebar-collapsed .sidebar-brand .brand-logo {
    width: 30px;
    height: 30px;
}

body.saas-base-theme.sidebar-collapsed .sidebar-user {
    min-height: 32px;
    padding: 4px 0;
    margin: 4px 0 5px;
}

/* ==========================================================================
   PREMIUM POLISH & MODERN DESIGN ACCENTS (WEB3 & OBSIDIAN STYLE)
   ========================================================================== */

/* Headings with high-end text fill gradients */
.saas-base-theme h1, 
.saas-base-theme h2, 
.saas-base-theme h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.03em;
}

.saas-base-theme .brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px !important;
    font-weight: 900;
    letter-spacing: 0.04em !important;
    background: linear-gradient(135deg, #ffffff 40%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

/* Glassmorphism for panels and stat cards */
.saas-base-theme .panel,
.saas-base-theme .stat-card,
.saas-base-theme .piece-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.saas-base-theme.dark-mode .panel,
.saas-base-theme.dark-mode .stat-card,
.saas-base-theme.dark-mode .piece-card,
.saas-base-theme.dark-mode .operation-column,
.saas-base-theme.dark-mode .login-card,
.saas-base-theme.dark-mode .auth-card,
.saas-base-theme.dark-mode .modal-card {
    background: rgba(17, 24, 39, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4) !important;
}

/* Stat card metrics look */
.saas-base-theme .stat-card strong {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text) 30%, rgba(15, 23, 42, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.saas-base-theme.dark-mode .stat-card strong {
    background: linear-gradient(135deg, #ffffff 40%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glowing charts & mini-charts */
.saas-base-theme .bar-primary {
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--blue), rgba(37, 99, 235, 0.8));
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.saas-base-theme.dark-mode .bar-primary {
    background: linear-gradient(180deg, var(--blue), rgba(6, 182, 212, 0.7));
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.saas-base-theme .bar-group:hover .bar-primary {
    filter: brightness(1.15) saturate(1.1);
    transform: translateY(-2px) scaleX(1.1);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.45);
}

/* Ultra premium buttons */
.saas-base-theme .button {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.05em;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.saas-base-theme .button:hover {
    transform: translateY(-2px);
}

.saas-base-theme .button-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 10px 20px -6px rgba(59, 130, 246, 0.35);
    border: 0;
}

.saas-base-theme .button-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 12px 24px -4px rgba(99, 102, 241, 0.45);
}

.saas-base-theme.dark-mode .button-primary {
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    box-shadow: 0 8px 20px -4px rgba(6, 182, 212, 0.4);
}

.saas-base-theme.dark-mode .button-primary:hover {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    box-shadow: 0 12px 24px -2px rgba(56, 189, 248, 0.5);
}

/* Inputs, Selects & Form controls */
.saas-base-theme input,
.saas-base-theme select,
.saas-base-theme textarea {
    font-family: 'Plus Jakarta Sans', sans-serif;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.saas-base-theme.dark-mode input,
.saas-base-theme.dark-mode select,
.saas-base-theme.dark-mode textarea {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.saas-base-theme input:focus,
.saas-base-theme select:focus,
.saas-base-theme textarea:focus {
    border-color: var(--blue);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.saas-base-theme.dark-mode input:focus,
.saas-base-theme.dark-mode select:focus,
.saas-base-theme.dark-mode textarea:focus {
    background-color: rgba(17, 24, 39, 0.8) !important;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18) !important;
}

/* Table styles */
.saas-base-theme table {
    border-collapse: separate;
    border-spacing: 0 6px;
}

.saas-base-theme th {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
    border-bottom: 0;
    padding: 10px 14px;
}

.saas-base-theme td {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease, transform 0.2s ease;
}

.saas-base-theme td:first-child {
    border-left: 1px solid var(--line);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.saas-base-theme td:last-child {
    border-right: 1px solid var(--line);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.saas-base-theme tr:hover td {
    background: var(--surface-soft);
}

.saas-base-theme.dark-mode td {
    background: rgba(17, 24, 39, 0.4);
    border-color: rgba(255, 255, 255, 0.04);
}

.saas-base-theme.dark-mode tr:hover td {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Breadcrumbs premium tracking look */
.saas-base-theme .breadcrumb {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.08em;
}

/* Alerts and operational toast enhancements */
.saas-base-theme .alert,
.saas-base-theme .toast {
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.saas-base-theme .alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #059669;
}

.saas-base-theme .alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #dc2626;
}

.saas-base-theme.dark-mode .alert-success {
    background: rgba(52, 211, 153, 0.08) !important;
    border: 1px solid rgba(52, 211, 153, 0.16) !important;
    color: #34d399 !important;
}

.saas-base-theme.dark-mode .alert-danger {
    background: rgba(248, 113, 113, 0.08) !important;
    border: 1px solid rgba(248, 113, 113, 0.16) !important;
    color: #f87171 !important;
}

/* ==========================================================================
   ULTRA-PREMIUM INTEGRATED FULL-HEIGHT SIDEBAR & TOPBAR (Linear & Stripe SaaS Style)
   ========================================================================== */

/* ==========================================================================
   ULTRA-PREMIUM FLOATING GLASSMORPHIC SIDEBAR & TOPBAR (macOS & SaaS Style)
   ========================================================================== */

@media (min-width: 1025px) {
    /* ─── FLOATING GLASS SIDEBAR (DOCK) ─── */
    .saas-base-theme .sidebar {
        position: fixed !important;
        top: 16px !important;
        left: 16px !important;
        bottom: 16px !important;
        height: calc(100vh - 32px) !important;
        width: var(--sidebar-width) !important;
        border-radius: 20px !important;
        background: 
            radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15), transparent 45%),
            radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.12), transparent 45%),
            linear-gradient(180deg, rgba(9, 13, 22, 0.95) 0%, rgba(3, 4, 6, 0.98) 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
        padding: 0 14px 24px !important;
        z-index: 80 !important;
        overflow-y: auto !important;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s ease !important;
    }

    /* ─── FLOATING GLASS TOPBAR ─── */
    .saas-base-theme .topbar {
        position: fixed !important;
        top: 16px !important;
        left: calc(var(--sidebar-width) + 32px) !important;
        right: 16px !important;
        height: 52px !important;
        min-height: 52px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.72) !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        padding: 6px 20px !important;
        z-index: 50 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s ease, top 0.3s ease, background 0.3s ease !important;
    }

    .saas-base-theme.dark-mode .topbar {
        background: rgba(9, 13, 22, 0.75) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    }

    /* Theme toggle overrides for Light Mode */
    .saas-base-theme:not(.dark-mode) .sidebar {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(243, 245, 248, 0.98) 100%) !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-brand {
        border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    }

    .saas-base-theme:not(.dark-mode) .brand-title {
        background: linear-gradient(135deg, #0f172a 30%, #4338ca 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-user {
        background: rgba(15, 23, 42, 0.03) !important;
        border: 1px solid rgba(15, 23, 42, 0.05) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-user .sidebar-text {
        color: #1e293b !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-separator {
        background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.06), transparent) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-label {
        color: rgba(71, 85, 105, 0.6) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a:not(.sidebar-brand),
    .saas-base-theme:not(.dark-mode) .sidebar-group-title {
        color: #334155 !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a:not(.sidebar-brand):hover,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title:hover {
        background: rgba(15, 23, 42, 0.04) !important;
        border-color: rgba(15, 23, 42, 0.06) !important;
        color: #0f172a !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a.is-active,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title.is-active {
        background: rgba(2, 132, 199, 0.08) !important;
        border-color: rgba(2, 132, 199, 0.2) !important;
        color: #0284c7 !important;
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a.is-active::before {
        background: #0284c7 !important;
        box-shadow: 0 0 8px rgba(2, 132, 199, 0.5) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-icon {
        background: rgba(15, 23, 42, 0.04) !important;
        color: #64748b !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a:not(.sidebar-brand):hover .sidebar-icon,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title:hover .sidebar-icon {
        background: rgba(2, 132, 199, 0.1) !important;
        color: #0284c7 !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar a.is-active .sidebar-icon,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title.is-active .sidebar-icon {
        background: rgba(2, 132, 199, 0.15) !important;
        color: #0284c7 !important;
    }

    /* Light Mode Caret overrides to restore visibility of submenu indicators */
    .saas-base-theme:not(.dark-mode) .sidebar-caret,
    .saas-base-theme:not(.dark-mode) .sidebar-caret i,
    .saas-base-theme:not(.dark-mode) .sidebar-caret svg {
        color: rgba(51, 65, 85, 0.45) !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-group-title:hover .sidebar-caret i,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title:hover .sidebar-caret svg {
        color: #0f172a !important;
    }

    .saas-base-theme:not(.dark-mode) .sidebar-group.is-open .sidebar-caret i,
    .saas-base-theme:not(.dark-mode) .sidebar-group.is-open .sidebar-caret svg,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title.is-active .sidebar-caret i,
    .saas-base-theme:not(.dark-mode) .sidebar-group-title.is-active .sidebar-caret svg {
        color: #0284c7 !important;
    }

    .saas-base-theme:not(.dark-mode) .topbar {
        background: rgba(255, 255, 255, 0.72) !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
    }

    .saas-base-theme .app-layout {
        padding-top: 84px !important;
    }

    .saas-base-theme .shell {
        padding: 0 16px 32px 32px !important;
        margin-left: 0 !important;
    }
}

/* Fallback/Default Mobile Sidebar & Topbar */
@media (max-width: 1024px) {
    .saas-base-theme .sidebar {
        width: var(--sidebar-width);
        background: linear-gradient(180deg, #090d16 0%, #030406 100%) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3) !important;
        padding: 0 10px 20px !important;
    }

    .saas-base-theme .topbar {
        min-height: 52px !important;
        height: 52px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        padding: 6px 16px !important;
    }

    .saas-base-theme.dark-mode .topbar {
        background: rgba(9, 13, 22, 0.9) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .saas-base-theme .app-layout {
        padding-top: 52px !important;
    }
}

/* Sidebar Brand Polish */
.saas-base-theme .sidebar-brand {
    margin: 0 -14px 12px !important;
    padding: 12px 20px !important;
    min-height: 56px !important;
    height: 56px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}

.saas-base-theme .sidebar-brand .brand-logo {
    width: 32px !important;
    height: 32px !important;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.45)) !important;
    transition: transform 0.3s ease !important;
}

.saas-base-theme .sidebar-brand:hover .brand-logo {
    transform: scale(1.1) rotate(5deg);
}

.saas-base-theme .brand-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

/* Sidebar User Info Card */
.saas-base-theme .sidebar-user {
    margin: 8px 0 16px !important;
    padding: 10px 12px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.saas-base-theme .sidebar-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #6366f1, #06b6d4) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.saas-base-theme .sidebar-user .sidebar-text {
    font-family: 'Outfit', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.2 !important;
}

/* Sidebar Separator & Headers */
.saas-base-theme .sidebar-separator {
    height: 1px !important;
    margin: 12px 6px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent) !important;
}

.saas-base-theme .sidebar-label {
    font-family: 'Outfit', sans-serif !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    color: rgba(148, 163, 184, 0.5) !important;
    padding: 16px 8px 6px !important;
    text-transform: uppercase !important;
}

/* Sidebar Links (Modern Menu Items) */
.saas-base-theme .sidebar a:not(.sidebar-brand),
.saas-base-theme .sidebar-group-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: rgba(241, 245, 249, 0.72) !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    margin: 3px 0 !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.saas-base-theme .sidebar a:not(.sidebar-brand):hover,
.saas-base-theme .sidebar-group-title:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
    transform: translateX(4px) !important;
}

.saas-base-theme .sidebar a.is-active,
.saas-base-theme .sidebar-group-title.is-active {
    background: rgba(6, 182, 212, 0.06) !important;
    border-color: rgba(6, 182, 212, 0.15) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    padding-left: 15px !important;
}

.saas-base-theme .sidebar a.is-active::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 8px !important;
    bottom: 8px !important;
    width: 3px !important;
    border-radius: 99px !important;
    background: #06b6d4 !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important;
}

/* Collapsed sidebar active states overrides */
body.sidebar-collapsed .saas-base-theme .sidebar a.is-active {
    padding-left: 12px !important;
}

body.sidebar-collapsed .saas-base-theme .sidebar a.is-active::before {
    left: 2px !important;
}

/* Sidebar Icons */
.saas-base-theme .sidebar-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    display: inline-grid !important;
    place-items: center !important;
    transition: all 0.22s ease !important;
}

.saas-base-theme .sidebar a:not(.sidebar-brand):hover .sidebar-icon,
.saas-base-theme .sidebar-group-title:hover .sidebar-icon {
    background: rgba(6, 182, 212, 0.15) !important;
    color: #06b6d4 !important;
}

.saas-base-theme .sidebar a.is-active .sidebar-icon,
.saas-base-theme .sidebar-group-title.is-active .sidebar-icon {
    background: rgba(6, 182, 212, 0.22) !important;
    color: #38bdf8 !important;
}

/* Sidebar Submenus */
.saas-base-theme .sidebar-submenu {
    margin: 2px 0 4px !important;
    padding-left: 16px !important;
    gap: 3px !important;
}

.saas-base-theme .sidebar-submenu a:not(.sidebar-brand) {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 9.5px !important;
}

.saas-base-theme .sidebar-submenu .sidebar-icon {
    width: 20px !important;
    height: 20px !important;
}

/* Search Bar Polish - Slimmed down */
.saas-base-theme .top-search {
    width: min(380px, 40vw) !important;
    height: 34px !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: none !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

.saas-base-theme.dark-mode .top-search {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.search-icon {
    width: 12px !important;
    height: 12px !important;
    margin-left: 11px !important;
    border-color: var(--muted) !important;
}

.search-icon::after {
    background: var(--muted) !important;
}

.saas-base-theme .top-search input {
    color: var(--text) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 0 8px !important;
}

.saas-base-theme .top-search input::placeholder {
    color: var(--muted) !important;
    opacity: 0.75 !important;
}

.saas-base-theme .top-search button {
    height: 24px !important;
    margin-right: 4px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: var(--blue) !important;
    color: #fff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.2s ease !important;
}

.saas-base-theme .top-search button:hover {
    background: var(--text) !important;
    color: #fff !important;
    transform: translateY(0) !important;
}

.saas-base-theme.dark-mode .top-search button:hover {
    background: #ffffff !important;
    color: #090d16 !important;
}

/* Circle Action Buttons (NO TEXT) */
.saas-base-theme .menu-toggle,
.saas-base-theme .dashboard-shortcut {
    border-radius: 50% !important;
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: var(--text) !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    box-shadow: none !important;
    display: inline-grid !important;
    place-items: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.saas-base-theme.dark-mode .menu-toggle,
.saas-base-theme.dark-mode .dashboard-shortcut {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.saas-base-theme .menu-toggle:hover,
.saas-base-theme .dashboard-shortcut:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: var(--blue) !important;
    transform: translateY(-2px) !important;
}

.saas-base-theme.dark-mode .menu-toggle:hover,
.saas-base-theme.dark-mode .dashboard-shortcut:hover {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: var(--blue) !important;
}

/* Horizontal Pill Chips (CONTAIN TEXT AND ICONS) */
.saas-base-theme .top-notification,
.saas-base-theme .top-grid,
.saas-base-theme .theme-switch {
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: var(--text) !important;
    width: auto !important;
    min-width: auto !important;
    height: 34px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.saas-base-theme.dark-mode .top-notification,
.saas-base-theme.dark-mode .top-grid,
.saas-base-theme.dark-mode .theme-switch {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.saas-base-theme .top-notification:hover,
.saas-base-theme .top-grid:hover,
.saas-base-theme .theme-switch:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: var(--blue) !important;
    transform: translateY(-2px) !important;
}

.saas-base-theme.dark-mode .top-notification:hover,
.saas-base-theme.dark-mode .top-grid:hover,
.saas-base-theme.dark-mode .theme-switch:hover {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: var(--blue) !important;
}

/* User Menu Polish */
.saas-base-theme .user-chip {
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: var(--text) !important;
    padding: 3px 12px 3px 4px !important;
    height: 34px !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.saas-base-theme.dark-mode .user-chip {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.saas-base-theme .user-chip:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    transform: translateY(-2px) !important;
}

.saas-base-theme.dark-mode .user-chip:hover {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

.saas-base-theme .user-chip-text strong {
    color: var(--text) !important;
    font-size: 11px !important;
}

.saas-base-theme.dark-mode .user-chip-text strong {
    color: #ffffff !important;
    font-size: 11px !important;
}

.saas-base-theme .user-chip-text small {
    color: var(--muted) !important;
    font-size: 9px !important;
}

.saas-base-theme.dark-mode .user-chip-text small {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 9px !important;
}

.saas-base-theme .user-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    background: linear-gradient(135deg, #6366f1, #06b6d4) !important;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25) !important;
}

.saas-base-theme .user-chip-caret {
    width: 14px !important;
    height: 14px !important;
    font-size: 8px !important;
}

/* Dropdown positions adjust */
.top-dropdown {
    top: calc(100% + 8px) !important;
}

/* ==========================================================================
   COLLAPSED STATE OVERRIDES FOR INTEGRATED LAYOUT
   ========================================================================== */
@media (min-width: 1025px) {
    body.sidebar-collapsed .saas-base-theme .sidebar-brand {
        padding: 12px 0 !important;
        justify-content: center !important;
    }

    body.sidebar-collapsed .saas-base-theme .sidebar-user {
        padding: 10px 0 !important;
        margin: 8px 6px 16px !important;
        background: transparent !important;
        border-color: transparent !important;
        justify-content: center !important;
    }

    body.sidebar-collapsed .saas-base-theme .sidebar a:not(.sidebar-brand) {
        padding: 8px 0 !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    body.sidebar-collapsed .saas-base-theme .sidebar a:not(.sidebar-brand) .sidebar-icon {
        margin: 0 !important;
    }
}

/* Bulk download box visual enhancements */
.saas-base-theme .bulk-download-box {
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.saas-base-theme .bulk-download-box:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    background: rgba(6, 182, 212, 0.06) !important;
    transform: scale(1.01) !important;
}

.saas-base-theme .bulk-download-box .button-secondary {
    transition: all 0.22s ease !important;
}

.saas-base-theme .bulk-download-box .button-secondary:hover {
    background: #06b6d4 !important;
    color: #ffffff !important;
    border-color: #06b6d4 !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3) !important;
}

/* Settings Page Layout adjustments for Desktop */
@media (min-width: 1025px) {
    .saas-base-theme .settings-layout,
    .saas-base-theme .saas-split-layout {
        grid-template-columns: 1.7fr 1fr !important;
    }
}

.saas-base-theme .company-logo-preview-box {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.saas-base-theme .company-logo-preview-box:hover {
    transform: scale(1.05) rotate(2deg) !important;
    border-color: #06b6d4 !important;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5) !important;
}

/* ==========================================================================
   Obsidian Cosmic Dark - Premium Login Pages (Style Web3)
   ========================================================================== */

.saas-base-theme.login-page {
    background: #060913 !important;
    background-image: 
        radial-gradient(circle at 12% 15%, rgba(99, 102, 241, 0.13), transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(6, 182, 212, 0.12), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08), transparent 48%) !important;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.saas-base-theme.login-page::before {
    content: '';
    position: absolute;
    width: min(380px, 60vw);
    height: min(380px, 60vw);
    background: #4f46e5;
    filter: blur(130px);
    opacity: 0.14;
    top: 15%;
    left: 15%;
    z-index: 1;
    pointer-events: none;
}

.saas-base-theme.login-page::after {
    content: '';
    position: absolute;
    width: min(400px, 60vw);
    height: min(400px, 60vw);
    background: #06b6d4;
    filter: blur(150px);
    opacity: 0.12;
    bottom: 15%;
    right: 15%;
    z-index: 1;
    pointer-events: none;
}

.saas-base-theme .login-card {
    background: rgba(13, 20, 38, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 40px rgba(99, 102, 241, 0.05) !important;
    padding: 40px !important;
    width: min(100%, 460px) !important;
    position: relative;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.saas-base-theme .login-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 35px rgba(99, 102, 241, 0.14) !important;
    border-color: rgba(99, 102, 241, 0.28) !important;
}

.saas-base-theme .login-brand {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
}

.saas-base-theme .login-brand .brand-logo {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    border: 2px solid rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.saas-base-theme .login-brand h1 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.saas-base-theme .login-brand .eyebrow {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-weight: 800 !important;
    color: #818cf8 !important;
    margin: 0 0 2px 0 !important;
}

.saas-base-theme .login-card p {
    font-size: 14px !important;
    color: #94a3b8 !important;
    line-height: 1.6 !important;
    margin-bottom: 28px !important;
}

.saas-base-theme .login-card label {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    text-align: left !important;
}

.saas-base-theme .login-card input {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 12px !important;
    color: #f8fafc !important;
    padding: 12px 16px !important;
    font-size: 14.5px !important;
    transition: all 0.25s ease !important;
}

.saas-base-theme .login-card input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22) !important;
    background: rgba(15, 23, 42, 0.7) !important;
    outline: none !important;
}

.saas-base-theme .login-card .button-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3) !important;
    cursor: pointer !important;
    width: 100% !important;
    margin-top: 10px !important;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.saas-base-theme .login-card .button-primary:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45) !important;
}

.saas-base-theme .login-card a {
    color: #818cf8 !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
}

.saas-base-theme .login-card a:hover {
    color: #a5b4fc !important;
    text-decoration: underline !important;
}

.saas-base-theme .login-card .alert {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 22px !important;
    text-align: left !important;
}

.saas-base-theme .login-card .alert-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

.saas-base-theme .login-card .alert-success {
    background: rgba(34, 197, 94, 0.08) !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}

/* Custom premium animations for warning banner and modal popup */
@keyframes slideDownIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalPopUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Premium styles for System Health and metrics section */
.system-health-section {
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.health-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.health-card:hover {
    transform: translateY(-2px);
    border-color: var(--blue) !important;
    box-shadow: 0 12px 24px -10px rgba(22, 131, 247, 0.15) !important;
}

.saas-base-theme.dark-mode .health-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.saas-base-theme.dark-mode .health-card:hover {
    border-color: rgba(22, 131, 247, 0.45) !important;
    box-shadow: 0 12px 24px -10px rgba(22, 131, 247, 0.25) !important;
}

.progress-bar-fill {
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progressBarShimmer 2s infinite linear;
}

@keyframes progressBarShimmer {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Premium styles for Backup and Data Portability section */
.backup-section {
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02) !important;
}

.backup-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.backup-card:hover {
    transform: translateY(-2px);
    border-style: solid !important;
    border-color: var(--blue) !important;
    box-shadow: 0 12px 24px -10px rgba(22, 131, 247, 0.12) !important;
}

.saas-base-theme.dark-mode .backup-card {
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.saas-base-theme.dark-mode .backup-card:hover {
    border-color: rgba(22, 131, 247, 0.45) !important;
    box-shadow: 0 12px 24px -10px rgba(22, 131, 247, 0.2) !important;
}

/* Premium Autocomplete Lookups Styles */
.lookup-field {
    position: relative;
    width: 100%;
}

.lookup-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #dce2e8);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(7, 18, 29, 0.12), 0 8px 10px -6px rgba(7, 18, 29, 0.12);
    padding: 6px;
    box-sizing: border-box;
}

.lookup-results.is-open {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lookup-option {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text, #25313a);
    box-sizing: border-box;
}

.lookup-option:hover {
    background: rgba(22, 131, 247, 0.08) !important;
    color: var(--blue, #1683f7) !important;
}

.lookup-option strong {
    font-size: 13.5px;
    font-weight: 600;
    color: inherit;
    margin-bottom: 2px;
}

.lookup-option small {
    font-size: 11px;
    color: var(--muted, #6b7883);
}

.lookup-empty {
    padding: 14px;
    text-align: center;
    color: var(--muted, #6b7883);
    font-size: 13px;
    font-style: italic;
}

/* Dark mode overrides for lookups */
.dark-mode .lookup-results,
.saas-base-theme.dark-mode .lookup-results {
    background: #1e262c !important;
    border-color: #2b353d !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

.dark-mode .lookup-option,
.saas-base-theme.dark-mode .lookup-option {
    color: #e2e8f0 !important;
}

.dark-mode .lookup-option:hover,
.saas-base-theme.dark-mode .lookup-option:hover {
    background: rgba(22, 131, 247, 0.15) !important;
    color: #60a5fa !important;
}

.dark-mode .lookup-option small,
.dark-mode .lookup-empty,
.saas-base-theme.dark-mode .lookup-option small,
.saas-base-theme.dark-mode .lookup-empty {
    color: #94a3b8 !important;
}

/* Premium Select Element Styles */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100%;
    padding: 10px 12px;
    padding-right: 36px !important;
    background-color: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 14px !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7883' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
    outline: none !important;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px rgba(22, 131, 247, 0.15) !important;
}

/* Dark mode overrides for select elements */
.dark-mode select,
.saas-base-theme.dark-mode select {
    background-color: #1e262c !important;
    border-color: #2b353d !important;
    color: #e2e8f0 !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.dark-mode select option,
.saas-base-theme.dark-mode select option {
    background-color: #1e262c !important;
    color: #e2e8f0 !important;
}

/* Premium Masterpiece Financial Styles - Glassmorphism, Neon Glows & Cosmic Dark Mode */

/* Sleek Dashboard Panels (Glassmorphic Deluxe) */
.fin-panel {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 255, 255, 0.9) 100%) !important;
    border: 1px solid rgba(220, 226, 232, 0.8) !important;
    border-radius: 20px !important;
    padding: 28px !important;
    box-shadow: 0 20px 48px -10px rgba(7, 18, 29, 0.03), 0 10px 20px -5px rgba(7, 18, 29, 0.02) !important;
    backdrop-filter: blur(8px) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-base-theme.dark-mode .fin-panel,
.dark-mode .fin-panel {
    background: linear-gradient(135deg, rgba(30, 38, 44, 0.75) 0%, rgba(20, 26, 31, 0.92) 100%) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35) !important;
}

/* Premium KPI Stat Cards (Cyberpunk Deluxe) */
/* Premium KPI Stat Cards (Vertical Layout matching Pagamentos Colaboradores) */
.fin-card {
    position: relative !important;
    overflow: hidden !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    border: 1px solid var(--line) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    background: var(--surface) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease, 
                background 0.4s ease !important;
    cursor: default !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01) !important;
}

.fin-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03) !important;
}

/* Dynamic Left Borders and Inward Gradient Backgrounds */
.fin-card-inflow {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(135deg, var(--surface), rgba(16, 185, 129, 0.02)) !important;
}
.fin-card-inflow strong {
    color: #10b981 !important;
}
.fin-card-inflow .fin-icon-container {
    color: #10b981 !important;
}

.fin-card-outflow {
    border-left: 4px solid #e94b5f !important;
    background: linear-gradient(135deg, var(--surface), rgba(233, 75, 95, 0.02)) !important;
}
.fin-card-outflow strong {
    color: #e94b5f !important;
}
.fin-card-outflow .fin-icon-container {
    color: #e94b5f !important;
}

.fin-card-balance-pos {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(135deg, var(--surface), rgba(245, 158, 11, 0.02)) !important;
}
.fin-card-balance-pos strong {
    color: #f59e0b !important;
}
.fin-card-balance-pos .fin-icon-container {
    color: #f59e0b !important;
}

.fin-card-balance-neg {
    border-left: 4px solid #e94b5f !important;
    background: linear-gradient(135deg, var(--surface), rgba(233, 75, 95, 0.02)) !important;
}
.fin-card-balance-neg strong {
    color: #e94b5f !important;
}
.fin-card-balance-neg .fin-icon-container {
    color: #e94b5f !important;
}

.fin-card-month {
    border-left: 4px solid #8b5cf6 !important;
    background: linear-gradient(135deg, var(--surface), rgba(139, 92, 246, 0.02)) !important;
}
.fin-card-month strong {
    color: #8b5cf6 !important;
}
.fin-card-month .fin-icon-container {
    color: #8b5cf6 !important;
}

/* Move the Icon container to the Top-Right */
.fin-card .fin-icon-container {
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0.15 !important;
    display: inline-block !important;
}

.fin-card .fin-icon-container i,
.fin-card .fin-icon-container [data-lucide] {
    width: 48px !important;
    height: 48px !important;
}

/* Vertical text spacing & styling */
.fin-card > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.fin-card > div span {
    font-size: 13px !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    display: block !important;
}

.fin-card > div strong {
    font-size: 22px !important;
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
    margin-top: 2px !important;
    display: block !important;
}

.fin-card > div small {
    color: var(--muted) !important;
    font-size: 11px !important;
    margin-top: 4px !important;
    display: block !important;
}

/* Beautiful Inputs, Textareas & Selects */
.fin-input, .fin-textarea, .fin-select {
    width: 100% !important;
    padding: 12px 14px !important;
    background-color: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    color: var(--text) !important;
    font-size: 14px !important;
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.fin-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7883' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    cursor: pointer !important;
}

.fin-input:focus, .fin-textarea:focus, .fin-select:focus {
    outline: none !important;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 4px rgba(22, 131, 247, 0.12) !important;
}

.saas-base-theme.dark-mode .fin-input,
.saas-base-theme.dark-mode .fin-textarea,
.saas-base-theme.dark-mode .fin-select,
.dark-mode .fin-input,
.dark-mode .fin-textarea,
.dark-mode .fin-select {
    background-color: #1a2228 !important;
    border-color: #2b353d !important;
    color: #f1f5f9 !important;
}

.saas-base-theme.dark-mode .fin-select,
.dark-mode .fin-select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.saas-base-theme.dark-mode .fin-input:focus,
.saas-base-theme.dark-mode .fin-textarea:focus,
.saas-base-theme.dark-mode .fin-select:focus,
.dark-mode .fin-input:focus,
.dark-mode .fin-textarea:focus,
.dark-mode .fin-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}

/* Elegant Table Adjustments (Masterpiece Transitions) */
.fin-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.fin-table th {
    padding: 14px 12px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}

.fin-table tr {
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.fin-table tr:hover {
    background-color: rgba(22, 131, 247, 0.04) !important;
}

.saas-base-theme.dark-mode .fin-table tr:hover,
.dark-mode .fin-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* capsule Pill Badges */
.fin-badge-inflow {
    background: linear-gradient(135deg, rgba(34, 167, 90, 0.1) 0%, rgba(34, 167, 90, 0.04) 100%) !important;
    color: #22a75a !important;
    font-weight: 700;
    padding: 6px 12px !important;
    border-radius: 30px !important;
    font-size: 11px !important;
    border: 1px solid rgba(34, 167, 90, 0.2) !important;
    box-shadow: 0 4px 12px rgba(34, 167, 90, 0.04) !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fin-badge-inflow::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22a75a;
    box-shadow: 0 0 6px #22a75a;
}

.fin-badge-outflow {
    background: linear-gradient(135deg, rgba(233, 75, 95, 0.1) 0%, rgba(233, 75, 95, 0.04) 100%) !important;
    color: #e94b5f !important;
    font-weight: 700;
    padding: 6px 12px !important;
    border-radius: 30px !important;
    font-size: 11px !important;
    border: 1px solid rgba(233, 75, 95, 0.2) !important;
    box-shadow: 0 4px 12px rgba(233, 75, 95, 0.04) !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fin-badge-outflow::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e94b5f;
    box-shadow: 0 0 6px #e94b5f;
}

/* Beautiful custom icons and margins */
.fin-icon-container {
    display: grid;
    place-items: center;
    border-radius: 14px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

.fin-card:hover .fin-icon-container {
    transform: scale(1.1) rotate(3deg) !important;
}

/* Sidebar Caret contrast & transition fix (sidebar background is dark in both Light & Dark modes) */
.sidebar-caret,
.sidebar-caret i,
.sidebar-group-toggle .sidebar-caret i,
.sidebar-group-title .sidebar-caret i,
.sidebar-caret svg {
    color: rgba(255, 255, 255, 0.42) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
    display: inline-flex !important;
}

.sidebar-group-title:hover .sidebar-caret i,
.sidebar-group-title:hover .sidebar-caret svg,
.sidebar-group.is-open .sidebar-caret i,
.sidebar-group.is-open .sidebar-caret svg,
.sidebar-group-title.is-active .sidebar-caret i,
.sidebar-group-title.is-active .sidebar-caret svg {
    color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-group.is-open .sidebar-caret {
    transform: rotate(180deg) !important;
}

/* Premium Sidebar Section Box styling */
.saas-base-theme .sidebar-box {
    margin: 8px 8px !important;
    padding: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    display: grid !important;
    gap: 4px !important;
}

.saas-base-theme.dark-mode .sidebar-box {
    border-color: rgba(255, 255, 255, 0.06) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.saas-base-theme:not(.dark-mode) .sidebar-box {
    border-color: rgba(15, 23, 42, 0.06) !important;
    background: rgba(15, 23, 42, 0.02) !important;
}

/* ==========================================================================
   FINANCIAL DASHBOARD & INSIGHTS OVERHAUL STYLES
   ========================================================================== */

/* Period Selector Pills */
.period-selector-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    align-self: flex-start;
    backdrop-filter: blur(8px);
}

.period-pill {
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--muted);
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.period-pill:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.period-pill.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--blue), #0087d4) !important;
    border-color: var(--blue) !important;
    box-shadow: 0 4px 12px rgba(0, 167, 255, 0.22);
}

/* Global Premium Stat Card System (Vertical Layout matching Pagamentos Colaboradores) */
.stat-card {
    position: relative !important;
    overflow: hidden !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    border: 1px solid var(--line) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    background: var(--surface) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease, 
                background 0.4s ease !important;
    cursor: default !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01) !important;
}

.stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03) !important;
}

/* Default / Info Card Theme */
.stat-card {
    border-left: 4px solid var(--blue) !important;
    background: linear-gradient(135deg, var(--surface), rgba(22, 131, 247, 0.02)) !important;
}
.stat-card strong {
    color: var(--blue) !important;
}
.stat-card .stat-icon-container {
    color: var(--blue) !important;
}

/* Success Card Theme */
.stat-card.success-card {
    border-left: 4px solid var(--green) !important;
    background: linear-gradient(135deg, var(--surface), rgba(34, 167, 90, 0.02)) !important;
}
.stat-card.success-card strong {
    color: var(--green) !important;
}
.stat-card.success-card .stat-icon-container {
    color: var(--green) !important;
}

/* Warning Card Theme */
.stat-card.warning-card {
    border-left: 4px solid var(--orange) !important;
    background: linear-gradient(135deg, var(--surface), rgba(246, 166, 35, 0.02)) !important;
}
.stat-card.warning-card strong {
    color: var(--orange) !important;
}
.stat-card.warning-card .stat-icon-container {
    color: var(--orange) !important;
}

/* Danger Card Theme */
.stat-card.danger-card {
    border-left: 4px solid var(--red) !important;
    background: linear-gradient(135deg, var(--surface), rgba(233, 75, 95, 0.02)) !important;
}
.stat-card.danger-card strong {
    color: var(--red) !important;
}
.stat-card.danger-card .stat-icon-container {
    color: var(--red) !important;
}

/* Purple / Custom Card Theme */
.stat-card.purple-card {
    border-left: 4px solid #8b5cf6 !important;
    background: linear-gradient(135deg, var(--surface), rgba(139, 92, 246, 0.02)) !important;
}
.stat-card.purple-card strong {
    color: #8b5cf6 !important;
}
.stat-card.purple-card .stat-icon-container {
    color: #8b5cf6 !important;
}

/* Absolute positioned Icon container matching Pagamentos Colaboradores */
.stat-card .stat-icon-container {
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0.15 !important;
    display: inline-block !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.stat-card:hover .stat-icon-container {
    transform: scale(1.1) rotate(3deg) !important;
}

.stat-card .stat-icon-container i,
.stat-card .stat-icon-container [data-lucide] {
    width: 48px !important;
    height: 48px !important;
}

/* Typography styles inside stat-card */
.stat-card span {
    font-size: 13px !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    display: block !important;
}

.stat-card strong {
    font-size: 22px !important;
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
    margin-top: 2px !important;
    display: block !important;
}

.stat-card small {
    color: var(--muted) !important;
    font-size: 11px !important;
    margin-top: 4px !important;
    display: block !important;
}

/* Financial Panels */
.fin-panel {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow) !important;
    padding: 28px !important;
    transition: all 0.25s ease;
}

.fin-panel:hover {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18) !important;
}

/* Operational Efficiency KPI styling */
.efficiency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.efficiency-card {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.efficiency-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.efficiency-card span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.efficiency-card strong {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    margin-top: 8px;
    display: block;
    line-height: 1.2;
}

.efficiency-card .badge-status {
    align-self: flex-start;
    margin-top: 12px;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-status-excellent { background: rgba(35, 209, 139, 0.1); color: #23d18b; border: 1px solid rgba(35, 209, 139, 0.2); }
.badge-status-healthy { background: rgba(0, 167, 255, 0.1); color: #00a7ff; border: 1px solid rgba(0, 167, 255, 0.2); }
.badge-status-warning { background: rgba(255, 184, 77, 0.1); color: #ffb84d; border: 1px solid rgba(255, 184, 77, 0.2); }
.badge-status-deficit { background: rgba(255, 93, 108, 0.1); color: #ff5d6c; border: 1px solid rgba(255, 93, 108, 0.2); }

/* SVG Trends Graphic styles */
.svg-trend-container {
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.svg-trend-chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
}

.chart-line-inflow {
    stroke: #23d18b;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 8px rgba(35, 209, 139, 0.3));
}

.chart-line-outflow {
    stroke: #ff5d6c;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 8px rgba(255, 93, 108, 0.3));
}

.chart-dot-inflow {
    fill: #23d18b;
    stroke: var(--surface);
    stroke-width: 2.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-dot-outflow {
    fill: #ff5d6c;
    stroke: var(--surface);
    stroke-width: 2.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-dot-inflow:hover,
.chart-dot-outflow:hover {
    r: 7px !important;
    stroke-width: 3.5px !important;
}

/* Light theme support */
.saas-base-theme:not(.dark-mode) .period-selector-container {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
}

.saas-base-theme:not(.dark-mode) .period-pill:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.saas-base-theme:not(.dark-mode) .efficiency-card {
    background: rgba(15, 23, 42, 0.015);
    border-color: rgba(15, 23, 42, 0.05);
}

.saas-base-theme:not(.dark-mode) .efficiency-card:hover {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.saas-base-theme:not(.dark-mode) .efficiency-card strong {
    color: var(--text);
}

.saas-base-theme:not(.dark-mode) .chart-grid-line {
    stroke: rgba(15, 23, 42, 0.05);
}

/* SVG Chart Bar Hover Transitions */
svg rect {
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease !important;
    cursor: pointer;
}

svg rect:hover {
    opacity: 0.9 !important;
}

/* Premium Print Action Button */
.action-print {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.25) !important;
    transition: all 0.2s ease !important;
}

.action-print:hover {
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4) !important;
    transform: translateY(-1px);
}

/* Premium Contract Dashboard Redesign */
.contract-dashboard-container {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .contract-dashboard-container {
        grid-template-columns: 1fr;
    }
}

.premium-hero-card {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.premium-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 999px;
    pointer-events: none;
}

.hero-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.hero-title-area h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    color: #fff;
}

.hero-subtitle {
    font-size: 13px;
    color: #a5b4fc;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hero-stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.hero-stat-box:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.hero-stat-box span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #c7d2fe;
    margin-bottom: 6px;
    font-weight: 600;
}

.hero-stat-box strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.contract-meta-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.meta-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.meta-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}

.meta-item {
    font-size: 13px;
}

.meta-label {
    display: block;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
}

.meta-value {
    color: var(--text);
    font-weight: 500;
}

.description-box {
    background: var(--surface-soft);
    border-left: 4px solid var(--blue);
    border-radius: 4px;
    padding: 14px 18px;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.notes-box {
    background: rgba(246, 166, 35, 0.05);
    border-left: 4px solid var(--orange);
    border-radius: 4px;
    padding: 14px 18px;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.progress-premium {
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 12px 0 6px 0;
}

.progress-premium-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.financial-progress-container {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

/* Collapsed sidebar hardening: keep icon-only mode from leaking text/cards. */
body.sidebar-collapsed.saas-base-theme {
    --sidebar-width: var(--sidebar-collapsed) !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar {
    width: var(--sidebar-collapsed) !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    overflow-x: hidden !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-brand,
body.sidebar-collapsed.saas-base-theme .sidebar a:not(.sidebar-brand),
body.sidebar-collapsed.saas-base-theme .sidebar-group-title {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 0 !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-text,
body.sidebar-collapsed.saas-base-theme .brand-title,
body.sidebar-collapsed.saas-base-theme .sidebar-label,
body.sidebar-collapsed.saas-base-theme .sidebar-caret,
body.sidebar-collapsed.saas-base-theme .sidebar-user .sidebar-text {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-submenu {
    display: none !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-group {
    margin: 0 !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-group-title {
    display: flex !important;
    min-height: 42px !important;
    margin: 2px 0 !important;
    border-radius: 10px !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-icon {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-icon i,
body.sidebar-collapsed.saas-base-theme .sidebar-icon svg {
    width: 18px !important;
    height: 18px !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-separator {
    margin: 6px auto !important;
    width: 34px !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-plan-card {
    margin: 8px auto !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 10px !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-plan-card span,
body.sidebar-collapsed.saas-base-theme .sidebar-plan-card p {
    display: none !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-plan-card > div {
    margin: 0 !important;
    gap: 0 !important;
}

body.sidebar-collapsed.saas-base-theme .sidebar-plan-card i,
body.sidebar-collapsed.saas-base-theme .sidebar-plan-card svg {
    width: 18px !important;
    height: 18px !important;
}
