:root {
  --sidebar: #171b2d;
  --sidebar-deep: #101423;
  --sidebar-soft: #252b44;
  --page: #eef2f6;
  --surface: #ffffff;
  --line: #d9e0e8;
  --ink: #202833;
  --muted: #6f7d8c;
  --brand: #f28a22;
  --brand-dark: #d86f09;
  --login-bg: #101423;
  --login-accent: #f28a22;
  --login-text: #ffffff;
  --login-card-bg: #ffffff;
  --login-card-opacity: 8%;
}

* {
  letter-spacing: 0;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  text-decoration: none;
}

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

.app-sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
  bottom: 0;
  box-shadow: 10px 0 35px rgba(18, 23, 39, .18);
  color: #dce3f1;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 1.25rem .9rem;
  position: fixed;
  top: 0;
  width: 236px;
  z-index: 1030;
  overflow-y: auto;
}

.brand-lockup {
  align-items: center;
  color: #fff;
  display: flex;
  gap: .65rem;
  margin-bottom: 1.15rem;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(242, 138, 34, .28);
  color: #191d30;
  display: inline-flex;
  font-size: 1.2rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand-logo {
  display: block;
  max-height: 24px;
  max-width: 24px;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  max-height: 34px;
  max-width: 148px;
  object-fit: contain;
}

.login-wordmark {
  max-height: 42px;
  max-width: 220px;
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.sidebar-search {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  display: flex;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .55rem .65rem;
}

.sidebar-search i {
  color: #aab4c8;
}

.sidebar-search input {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: .86rem;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.sidebar-search input::placeholder {
  color: #9ea8bd;
}

.sidebar-nav {
  display: grid;
  gap: .25rem;
}

.sidebar-nav a,
.sidebar-logout button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #c5cede;
  display: flex;
  font-size: .88rem;
  gap: .72rem;
  min-height: 38px;
  padding: .55rem .65rem;
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
  width: 100%;
}

.sidebar-nav a i,
.sidebar-logout i {
  color: #95a2ba;
  font-size: 1rem;
  width: 18px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.sidebar-logout button:hover {
  background: #101423;
  color: #fff;
}

.sidebar-nav a.active i,
.sidebar-nav a:hover i,
.sidebar-logout button:hover i {
  color: var(--brand);
}

.sidebar-menu-group {
  display: grid;
  gap: .2rem;
}

.sidebar-menu-label {
  align-items: center;
  color: #c5cede;
  display: flex;
  font-size: .88rem;
  gap: .72rem;
  min-height: 38px;
  padding: .55rem .65rem;
}

.sidebar-menu-label i {
  color: #95a2ba;
  font-size: 1rem;
  width: 18px;
}

.sidebar-submenu {
  border-left: 1px solid rgba(255, 255, 255, .13);
  display: grid;
  gap: .15rem;
  margin: 0 0 .2rem 1.15rem;
  padding-left: .45rem;
}

.sidebar-submenu a {
  font-size: .8rem;
  min-height: 32px;
  padding: .4rem .55rem;
}

.sidebar-submenu a i {
  font-size: .88rem;
}

.sidebar-logout {
  margin-top: auto;
}

.app-frame {
  margin-left: 236px;
  min-height: 100vh;
}

.app-topbar {
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: .8rem 1.6rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.crumb {
  color: #8994a5;
  font-size: .78rem;
  margin-bottom: .2rem;
}

.topbar-title {
  color: #243044;
  font-size: 1.05rem;
  font-weight: 700;
}

.user-chip {
  align-items: center;
  color: #253044;
  display: flex;
  gap: .45rem;
  justify-content: flex-end;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: .8rem;
}

.notification-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #526174;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  position: relative;
  text-decoration: none;
  width: 40px;
}

.notification-button:hover,
.notification-button.has-notifications {
  border-color: var(--brand);
  color: var(--brand);
}

.notification-button span {
  align-items: center;
  background: #c92a2a;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: .65rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 .25rem;
  position: absolute;
  right: -8px;
  top: -8px;
}

.user-greeting {
  color: #7f8b9b;
  font-size: .78rem;
}

.avatar {
  align-items: center;
  background: #dbe4ef;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(25, 31, 48, .12);
  color: #203049;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin-left: .25rem;
  width: 34px;
}

.app-content {
  padding: 1.35rem 1.6rem 2rem;
}

.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 26px rgba(25, 31, 48, .06);
  padding: 1rem;
}

.panel h2,
.panel .h5 {
  color: #1e2737;
  font-weight: 800;
  margin-bottom: .9rem;
}

.metric {
  border: 0;
  color: #111827;
  min-height: 86px;
  overflow: hidden;
  position: relative;
}

.metric span {
  color: rgba(17, 24, 39, .8);
  display: block;
  font-size: .82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  margin-top: .25rem;
}

.metric i {
  bottom: .8rem;
  font-size: 1.45rem;
  opacity: .88;
  position: absolute;
  right: .9rem;
}

.metric-blue { background: linear-gradient(135deg, #4cb9f2, #348ee7); }
.metric-gold { background: linear-gradient(135deg, #ffd56a, #f2ae3f); }
.metric-teal { background: linear-gradient(135deg, #44d5c8, #28a6bb); }
.metric-rose { background: linear-gradient(135deg, #ec6c8f, #d94c70); }
.metric-indigo { background: linear-gradient(135deg, #7a8cff, #5868d9); color: #fff; }
.metric-lime { background: linear-gradient(135deg, #d9d94d, #b9c223); }
.metric-indigo span { color: rgba(255, 255, 255, .82); }

.page-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.btn-primary,
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #111827;
  font-weight: 700;
}

.btn-primary:hover,
.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #111827;
}

.btn-outline-primary {
  border-color: #2b7fa8;
  color: #236f94;
}

.btn-outline-primary:hover {
  background: #2b7fa8;
  border-color: #2b7fa8;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #f6f8fb;
  color: #58677a;
  font-size: .78rem;
  text-transform: uppercase;
}

.table tbody td {
  border-color: #edf1f5;
  vertical-align: middle;
}

.form-control,
.form-select {
  border-color: #cfd8e3;
  border-radius: 5px;
}

.form-panel {
  max-width: 900px;
}

.form-panel p {
  margin-bottom: 1rem;
}

.form-panel label {
  display: block;
  font-weight: 700;
  margin-bottom: .35rem;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
  border: 1px solid #c8d2dc;
  border-radius: 5px;
  display: block;
  padding: .55rem .7rem;
  width: 100%;
}

.form-panel .form-check-input {
  display: inline-block;
  padding: 0;
  width: 1em;
}

.report-builder-page {
  background: #fff;
  border: 1px solid #e5e9f0;
  min-height: calc(100vh - 132px);
  padding: 0 .85rem 2rem;
}

.report-builder-top {
  align-items: center;
  background: #eef2f8;
  border-bottom: 1px solid #dce3ec;
  display: flex;
  justify-content: space-between;
  margin: 0 -.85rem 1rem;
  min-height: 32px;
  padding: .25rem .65rem;
}

.report-builder-section {
  color: #53657a;
  font-size: 1rem;
}

.report-builder-new {
  color: #93a0af;
  font-size: .65rem;
  margin-left: .25rem;
}

.report-builder-date {
  align-items: center;
  background: #17acd4;
  color: #fff;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  gap: .35rem;
  min-height: 26px;
  padding: .25rem .65rem;
}

.report-builder-title {
  border-bottom: 1px solid #e5e7eb;
  color: #ef4444;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1.45rem;
  padding: .4rem 0 .85rem;
  text-transform: uppercase;
}

.report-builder-grid {
  display: grid;
  gap: clamp(2rem, 8vw, 8rem);
  grid-template-columns: minmax(260px, 420px) minmax(420px, 1fr);
}

.report-builder-filters {
  max-width: 420px;
}

.report-builder-label {
  color: #111827;
  display: block;
  font-size: .74rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.report-builder-filters .form-select,
.report-builder-filters .form-control {
  border-radius: 0;
  min-height: 34px;
}

.report-builder-small-select {
  max-width: 160px;
}

.report-builder-options {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.report-builder-fields {
  max-width: 860px;
}

.report-builder-fields h2 {
  border-bottom: 1px solid #dbe1ea;
  color: #0f2a52;
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 .8rem;
  padding-bottom: .5rem;
}

.report-field-group ul {
  columns: 1;
  margin: 0;
  padding-left: 1.45rem;
}

.report-field-group li {
  color: #111827;
  font-size: .82rem;
  margin-bottom: .45rem;
  padding-left: .1rem;
}

.report-field-group label {
  cursor: pointer;
}

.report-field-group input {
  margin-right: .3rem;
}

.report-filter-box {
  background: #ffffff;
  border: 1px solid #d8deea;
  border-radius: 12px;
  padding: .85rem;
}

.report-filter-head {
  align-items: center;
  background: transparent;
  border: 0;
  color: #2b3140;
  display: flex;
  font-size: .98rem;
  font-weight: 800;
  gap: .55rem;
  padding: 0;
  width: 100%;
}

.report-filter-head i {
  margin-left: auto;
  transition: transform .18s ease;
}

.report-filter-box.is-open .report-filter-head i {
  transform: rotate(180deg);
}

.report-filter-count {
  align-items: center;
  background: #e83d63;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 .35rem;
}

.report-filter-clear {
  background: transparent;
  border: 0;
  color: #4b5563;
  font-size: .86rem;
  font-weight: 700;
  margin-top: .8rem;
  padding: 0;
  text-decoration: underline;
}

.report-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .85rem;
}

.report-filter-chip {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd6e6;
  border-radius: 999px;
  color: #3b4150;
  display: inline-flex;
  font-weight: 700;
  gap: .5rem;
  max-width: 100%;
  padding: .48rem .75rem;
}

.report-filter-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-filter-chip i {
  color: #8b93a3;
  font-size: 1rem;
}

.report-filter-dropdown {
  border-top: 1px solid #edf0f6;
  margin-top: .9rem;
  padding-top: .9rem;
}

.report-filter-options {
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  max-height: 210px;
  overflow: auto;
}

.report-filter-option {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  gap: .55rem;
  padding: .55rem .7rem;
}

.report-filter-option + .report-filter-option {
  border-top: 1px solid #edf0f6;
}

.report-filter-option:hover {
  background: #f8fafc;
}

.report-filter-option input {
  margin-top: .18rem;
}

.rating-summary {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.rating-number {
  color: #3b82f6;
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -.08em;
  line-height: 1;
}

.rating-stars {
  color: #d5dbe5;
  display: inline-block;
  font-size: 1.55rem;
  letter-spacing: .05rem;
  line-height: 1;
  position: relative;
}

.rating-stars-fill {
  color: #2f7df6;
  left: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.rating-stars-base {
  white-space: nowrap;
}

.rating-mini {
  color: #2f7df6;
  font-weight: 800;
}

.rating-summary-table .rating-number {
  font-size: 1.6rem;
}

.rating-summary-table .rating-stars {
  font-size: 1rem;
}

.rating-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.rating-field {
  background: #f8fafc;
  border: 1px solid #e3e9f1;
  border-radius: 7px;
  padding: .85rem;
}

.rating-current {
  color: #3b82f6;
  font-size: 1.1rem;
  font-weight: 800;
}

.star-input {
  display: flex;
  gap: .25rem;
}

.star-input button {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0 .08rem;
  transition: color .14s ease, transform .14s ease;
}

.star-input button:hover,
.star-input button.active {
  color: #2f7df6;
}

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

.bulk-check-panel {
  background: #f8fafc;
  border: 1px solid #e3e9f1;
  border-radius: 7px;
  max-height: 360px;
  overflow: auto;
  padding: .85rem;
}

.bulk-check-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bulk-check-panel li {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  gap: .5rem;
  padding: .45rem 0;
}

.bulk-check-panel li:last-child {
  border-bottom: 0;
}

.bulk-check-panel label {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin: 0;
}

.bulk-check-panel input[type="checkbox"] {
  display: inline-block;
  padding: 0;
  width: 1em;
}

.xml-example {
  background: #111827;
  border-radius: 6px;
  color: #e7edf7;
  font-size: .84rem;
  margin: 1rem 0;
  max-height: 360px;
  overflow: auto;
  padding: 1rem;
}

.import-stat {
  border-radius: 6px;
  padding: .8rem;
}

.import-stat span {
  display: block;
  font-size: .78rem;
  font-weight: 700;
}

.import-stat strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.import-stat.success { background: #dcfce7; color: #166534; }
.import-stat.info { background: #dbeafe; color: #1d4ed8; }
.import-stat.muted { background: #f1f5f9; color: #475569; }
.import-stat.danger { background: #fee2e2; color: #b91c1c; }

.import-badge {
  text-transform: capitalize;
}

.import-criado { background: #16a34a; color: #fff; }
.import-atualizado { background: #2563eb; color: #fff; }
.import-ignorado { background: #64748b; color: #fff; }
.import-erro { background: #dc2626; color: #fff; }

.admin-module-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-module-header {
  align-items: center;
  display: flex;
  gap: .85rem;
}

.admin-module-icon {
  align-items: center;
  background: rgba(242, 138, 34, .14);
  border-radius: 10px;
  color: var(--brand-dark);
  display: inline-flex;
  flex: 0 0 44px;
  font-size: 1.25rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.admin-module-list {
  border: 1px solid #edf1f5;
  border-radius: 6px;
  overflow: hidden;
}

.admin-module-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .82rem .95rem;
}

.admin-module-row:last-child {
  border-bottom: 0;
}

.admin-module-row strong {
  color: #1e2737;
  display: block;
  font-size: .95rem;
}

.admin-module-row span {
  color: #7a8797;
  display: block;
  font-size: .78rem;
  margin-top: .1rem;
}

.admin-module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
}

.email-editor-grid {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(360px, 440px) minmax(520px, 1fr);
}

.email-editor-controls {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.email-editor-section {
  border-bottom: 1px solid #e8edf3;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
}

.email-editor-section h2 {
  font-size: 1rem;
  margin-bottom: .9rem;
}

.email-color-control {
  align-items: center;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  display: flex;
  min-height: 38px;
  overflow: hidden;
}

.email-color-control input {
  border: 0;
  flex: 0 0 46px;
  height: 36px;
  padding: 2px;
}

.email-color-control span {
  color: #526174;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  padding: 0 .55rem;
}

.email-logo-source {
  background: #f7f9fc;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  padding: .75rem .85rem;
}

.email-logo-source .form-check + .form-check {
  margin-top: .45rem;
}

.email-preview-tool {
  background: #dfe5ec;
  border: 1px solid #cdd5df;
  border-radius: 7px;
  min-width: 0;
  overflow: hidden;
  position: sticky;
  top: 88px;
}

.email-preview-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #cdd5df;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: .65rem .9rem;
}

.email-preview-toolbar strong,
.email-preview-toolbar span {
  display: block;
}

.email-preview-toolbar span {
  color: #7a8797;
  font-size: .75rem;
}

.email-preview-toolbar i {
  color: #526174;
  font-size: 1.2rem;
}

#email-preview-frame {
  background: #fff;
  border: 0;
  display: block;
  height: calc(100vh - 250px);
  min-height: 620px;
  width: 100%;
}

@media (max-width: 1240px) {
  .email-editor-grid {
    grid-template-columns: minmax(340px, 410px) minmax(500px, 1fr);
  }
}

.brand-preview {
  background: #f8fafc;
  border: 1px solid #e3e9f1;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr);
  padding: 1rem;
}

.brand-preview-sidebar {
  align-items: center;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  display: flex;
  gap: .65rem;
  min-height: 74px;
  padding: 1rem;
}

.brand-preview-help {
  align-self: center;
  color: #58677a;
  font-size: .9rem;
}

.brand-preview-help strong,
.brand-preview-help span {
  display: block;
}

.login-page {
  background: radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--login-accent) 22%, transparent), transparent 30%), var(--login-bg);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.login-shell {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 430px);
  min-height: 100vh;
  padding: 2rem clamp(1rem, 6vw, 5rem);
}

.login-copy {
  color: var(--login-text);
}

.login-brand {
  margin-bottom: 2rem;
}

.login-copy h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  margin-bottom: .8rem;
}

.login-copy p {
  color: color-mix(in srgb, var(--login-text) 78%, transparent);
  font-size: 1.05rem;
  max-width: 560px;
}

.login-visual {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.login-visual i {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: var(--login-accent);
  display: inline-flex;
  font-size: 2rem;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.login-panel {
  display: flex;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.login-card {
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--login-card-bg) var(--login-card-opacity), transparent);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  color: var(--login-text);
  max-width: 430px;
  padding: 2rem;
  width: 100%;
}

.login-card .form-check-label {
  overflow-wrap: anywhere;
}

.login-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.login-card p {
  color: color-mix(in srgb, var(--login-text) 74%, transparent);
  margin-bottom: 1.4rem;
}

.login-card .form-label {
  color: color-mix(in srgb, var(--login-text) 88%, transparent);
  font-weight: 700;
}

.login-card .form-control {
  background: rgba(255, 255, 255, .92);
  border: 0;
  min-height: 44px;
}

.password-link {
  color: color-mix(in srgb, var(--login-accent) 72%, #ffffff);
  font-size: .9rem;
  font-weight: 700;
}

.password-link:hover {
  color: #fff;
}

.form-help-danger {
  color: #fecaca;
  font-size: .82rem;
  margin-top: .35rem;
}

.single-panel {
  grid-template-columns: minmax(320px, 430px);
  justify-content: center;
}

@media (max-width: 991px) {
  .app-shell {
    min-width: 980px;
  }
}

@media (max-width: 767px) {
  .app-content {
    padding: 1rem;
  }

  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-chip {
    display: none;
  }

  .login-shell {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    max-width: 100vw;
    padding: 1rem;
    width: 100%;
  }

  .login-panel {
    max-width: calc(100vw - 2rem);
  }

  .login-card {
    flex: 0 1 calc(100vw - 2rem);
    max-width: 100%;
    min-width: 0;
    padding: 1.5rem;
    width: calc(100vw - 2rem);
  }

  .login-card form,
  .login-card .form-control {
    max-width: 100%;
    min-width: 0;
  }

  .login-copy {
    display: none;
  }
}

/* Clean Slate UI */
:root {
  color-scheme: light;
  --ui-bg: #f7f8fa;
  --ui-surface: #ffffff;
  --ui-sidebar: #fbfbfc;
  --ui-subtle: #f1f3f5;
  --ui-subtle-hover: #e9edf1;
  --ui-border: #e2e6ea;
  --ui-foreground: #22272e;
  --ui-muted: #6d7682;
  --ui-primary: #135fcf;
  --ui-primary-hover: #0d4eae;
  --ui-primary-soft: #e9f1fc;
  --ui-success: #18794e;
  --ui-success-soft: #e9f7ef;
  --ui-warning: #9a6700;
  --ui-warning-soft: #fff4d6;
  --ui-danger: #c83532;
  --ui-danger-soft: #fdecea;
  --ui-shadow: 0 1px 2px rgba(20, 27, 36, .04);
  --auth-image: none;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ui-bg: #0e1319;
  --ui-surface: #171d25;
  --ui-sidebar: #121820;
  --ui-subtle: #202833;
  --ui-subtle-hover: #29323e;
  --ui-border: #2b3440;
  --ui-foreground: #f2f5f8;
  --ui-muted: #9aa6b4;
  --ui-primary: #6da4f2;
  --ui-primary-hover: #8ab7f5;
  --ui-primary-soft: #1b3150;
  --ui-success: #62c58f;
  --ui-success-soft: #173629;
  --ui-warning: #e7b84b;
  --ui-warning-soft: #3c3017;
  --ui-danger: #f0807d;
  --ui-danger-soft: #432322;
  --ui-shadow: none;
}

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

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: .9rem;
}

.text-muted,
.form-text {
  color: var(--ui-muted) !important;
}

.app-shell {
  min-width: 0;
}

.app-sidebar {
  background: var(--ui-sidebar);
  border-right: 1px solid var(--ui-border);
  box-shadow: none;
  color: var(--ui-foreground);
  padding: 1.35rem 1rem 1rem;
  width: 248px;
}

.sidebar-brand {
  align-items: center;
  color: var(--ui-foreground);
  display: flex;
  gap: .7rem;
  margin-bottom: 1.75rem;
  min-height: 38px;
  padding: 0 .45rem;
}

.sidebar-brand:hover {
  color: var(--ui-foreground);
}

.sidebar-brand .brand-mark {
  background: var(--ui-primary);
  border: 0;
  box-shadow: none;
  color: #fff;
  flex: 0 0 34px;
  height: 34px;
  width: 34px;
}

.sidebar-brand-copy {
  display: block;
  min-width: 0;
}

.sidebar-brand-copy strong,
.sidebar-brand-copy small {
  display: block;
}

.sidebar-brand-copy strong {
  font-size: .95rem;
  font-weight: 650;
}

.sidebar-brand-copy small {
  color: var(--ui-muted);
  font-size: .68rem;
  margin-top: .15rem;
}

.sidebar-brand .brand-wordmark {
  max-height: 26px;
  max-width: 142px;
}

.sidebar-section-label {
  color: var(--ui-muted);
  font-size: .68rem;
  font-weight: 650;
  margin: 1.05rem .55rem .4rem;
  text-transform: uppercase;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

.sidebar-nav {
  gap: .12rem;
}

.sidebar-nav a,
.sidebar-logout button,
.sidebar-menu-label {
  border-radius: 6px;
  color: var(--ui-muted);
  font-size: .82rem;
  gap: .68rem;
  min-height: 36px;
  padding: .48rem .58rem;
}

.sidebar-nav a i,
.sidebar-logout i,
.sidebar-menu-label i {
  color: currentColor;
  font-size: .95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.sidebar-logout button:hover {
  background: var(--ui-subtle);
  color: var(--ui-foreground);
}

.sidebar-nav a.active {
  font-weight: 650;
}

.sidebar-nav a.active i,
.sidebar-nav a:hover i,
.sidebar-logout button:hover i {
  color: var(--ui-primary);
}

.sidebar-menu-label {
  min-height: 34px;
}

.sidebar-submenu {
  border-left-color: var(--ui-border);
  margin-left: 1.05rem;
}

.sidebar-submenu a {
  font-size: .76rem;
  min-height: 30px;
}

.sidebar-logout {
  border-top: 1px solid var(--ui-border);
  margin-top: auto;
  padding-top: .75rem;
}

.app-frame {
  margin-left: 248px;
}

.app-topbar {
  background: color-mix(in srgb, var(--ui-bg) 88%, transparent);
  border-bottom-color: var(--ui-border);
  min-height: 64px;
  padding: .7rem 1.5rem;
}

.topbar-search {
  align-items: center;
  background: var(--ui-subtle);
  border: 1px solid transparent;
  border-radius: 6px;
  display: flex;
  gap: .55rem;
  max-width: 430px;
  min-height: 38px;
  padding: 0 .75rem;
  width: 100%;
}

.topbar-search:focus-within {
  background: var(--ui-surface);
  border-color: var(--ui-primary);
}

.topbar-search i {
  color: var(--ui-muted);
}

.topbar-search input {
  background: transparent;
  border: 0;
  color: var(--ui-foreground);
  min-width: 0;
  outline: 0;
  width: 100%;
}

.topbar-search input::placeholder {
  color: var(--ui-muted);
}

.topbar-actions {
  gap: .45rem;
}

.topbar-icon,
.auth-theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ui-muted);
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.topbar-icon:hover,
.auth-theme-toggle:hover {
  background: var(--ui-subtle);
  color: var(--ui-foreground);
}

.notification-button {
  background: transparent;
  border-color: transparent;
  height: 38px;
  width: 38px;
}

.notification-button:hover,
.notification-button.has-notifications {
  border-color: transparent;
  color: var(--ui-primary);
}

.notification-button span {
  border-color: var(--ui-bg);
  right: -5px;
  top: -5px;
}

.topbar-separator {
  background: var(--ui-border);
  display: block;
  height: 26px;
  margin: 0 .3rem;
  width: 1px;
}

.user-chip {
  color: var(--ui-foreground);
  gap: .55rem;
}

.user-chip-copy strong,
.user-chip-copy small {
  display: block;
  line-height: 1.25;
}

.user-chip-copy strong {
  font-size: .78rem;
  font-weight: 650;
}

.user-chip-copy small {
  color: var(--ui-muted);
  font-size: .68rem;
  margin-top: .12rem;
}

.avatar {
  background: var(--ui-primary);
  border: 0;
  box-shadow: none;
  color: #fff;
  height: 34px;
  margin: 0;
  width: 34px;
}

.sidebar-mobile-toggle,
.sidebar-overlay {
  display: none;
}

.app-content {
  margin: 0 auto;
  max-width: 1440px;
  padding: 1.8rem 1.5rem 2.5rem;
}

.panel,
.metric,
.card,
.modal-content,
.dropdown-menu {
  background: var(--ui-surface);
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow);
  color: var(--ui-foreground);
}

.panel,
.metric {
  border: 1px solid var(--ui-border);
  border-radius: 7px;
}

.panel h2,
.panel .h5,
.page-actions h1,
.card-title {
  color: var(--ui-foreground);
}

.page-actions {
  margin-bottom: 1.35rem;
}

.btn {
  border-radius: 6px;
  font-size: .82rem;
}

.btn-primary,
.btn-brand {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-brand:hover,
.btn-primary:focus,
.btn-brand:focus {
  background: var(--ui-primary-hover);
  border-color: var(--ui-primary-hover);
  color: #fff;
}

.btn-outline-primary {
  border-color: var(--ui-primary);
  color: var(--ui-primary);
}

.btn-outline-primary:hover {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #fff;
}

.btn-light,
.btn-outline-secondary {
  background: var(--ui-surface);
  border-color: var(--ui-border);
  color: var(--ui-foreground);
}

.btn-light:hover,
.btn-outline-secondary:hover {
  background: var(--ui-subtle);
  border-color: var(--ui-border);
  color: var(--ui-foreground);
}

.form-control,
.form-select,
.form-check-input,
.input-group-text {
  background-color: var(--ui-surface);
  border-color: var(--ui-border);
  color: var(--ui-foreground);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  background-color: var(--ui-surface);
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--ui-primary) 18%, transparent);
  color: var(--ui-foreground);
}

.form-control::placeholder {
  color: var(--ui-muted);
}

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

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ui-foreground);
  --bs-table-border-color: var(--ui-border);
  --bs-table-hover-bg: var(--ui-subtle);
  --bs-table-hover-color: var(--ui-foreground);
  color: var(--ui-foreground);
}

.table thead th {
  background: var(--ui-subtle);
  color: var(--ui-muted);
  font-size: .68rem;
  font-weight: 650;
  text-transform: uppercase;
}

.table tbody td {
  border-color: var(--ui-border);
}

.nav-tabs {
  border-bottom-color: var(--ui-border);
}

.nav-tabs .nav-link {
  color: var(--ui-muted);
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: var(--ui-foreground);
}

.nav-tabs .nav-link.active {
  background: transparent;
  border-color: transparent transparent var(--ui-primary);
  color: var(--ui-foreground);
}

.alert {
  border-radius: 6px;
}

.alert-success { background: var(--ui-success-soft); border-color: var(--ui-success); color: var(--ui-success); }
.alert-danger { background: var(--ui-danger-soft); border-color: var(--ui-danger); color: var(--ui-danger); }
.alert-warning { background: var(--ui-warning-soft); border-color: var(--ui-warning); color: var(--ui-warning); }
.alert-info { background: var(--ui-primary-soft); border-color: var(--ui-primary); color: var(--ui-primary); }

.badge.text-bg-light,
.badge.text-bg-secondary {
  background: var(--ui-subtle) !important;
  color: var(--ui-muted) !important;
}

.metric {
  align-items: flex-start;
  background: var(--ui-surface);
  color: var(--ui-foreground);
  display: flex;
  justify-content: space-between;
  min-height: 132px;
  padding: 1.05rem;
}

.metric div {
  min-width: 0;
}

.metric span {
  color: var(--ui-muted);
  font-size: .72rem;
  font-weight: 600;
}

.metric strong {
  color: var(--ui-foreground);
  font-size: 1.65rem;
  font-weight: 650;
  margin-top: .6rem;
}

.metric small {
  color: var(--ui-muted);
  display: block;
  font-size: .68rem;
  margin-top: .45rem;
}

.metric > i {
  align-items: center;
  background: var(--ui-subtle);
  border-radius: 6px;
  bottom: auto;
  display: flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  opacity: 1;
  position: static;
  right: auto;
  width: 34px;
}

.metric-blue > i { color: #2563eb; }
.metric-teal > i { color: #0f8a82; }
.metric-indigo > i { color: #6558d3; }
.metric-gold > i { color: #b57900; }
.metric-rose > i { color: #c44967; }
.metric-lime > i { color: #668b1f; }
.metric-blue,
.metric-teal,
.metric-indigo,
.metric-gold,
.metric-rose,
.metric-lime { background: var(--ui-surface); color: var(--ui-foreground); }

.dashboard-page-header {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}

.dashboard-breadcrumb {
  color: var(--ui-muted);
  font-size: .72rem;
  margin: 0 0 .55rem;
}

.dashboard-breadcrumb i {
  font-size: .58rem;
  margin: 0 .25rem;
}

.dashboard-page-header h1 {
  color: var(--ui-foreground);
  font-size: 1.65rem;
  font-weight: 650;
  margin: 0;
}

.dashboard-page-header > div > p:last-child {
  color: var(--ui-muted);
  font-size: .82rem;
  margin: .45rem 0 0;
}

.dashboard-header-actions {
  display: flex;
  gap: .55rem;
}

.dashboard-metric-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.dashboard-content-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr);
}

.dashboard-ranking-panel,
.dashboard-operation-panel {
  padding: 0;
  overflow: hidden;
}

.panel-heading-row {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
}

.panel-heading-row h2 {
  font-size: .88rem;
  font-weight: 650;
  margin: 0;
}

.panel-heading-row p {
  color: var(--ui-muted);
  font-size: .72rem;
  margin: .28rem 0 0;
}

.panel-heading-row > a {
  color: var(--ui-muted);
  font-size: .72rem;
}

.panel-heading-row > a:hover {
  color: var(--ui-primary);
}

.dashboard-table thead th,
.dashboard-table tbody td {
  padding: .72rem 1.2rem;
}

.table-person {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.table-person > span {
  align-items: center;
  background: var(--ui-subtle);
  border-radius: 50%;
  color: var(--ui-muted);
  display: flex;
  flex: 0 0 32px;
  font-size: .7rem;
  font-weight: 700;
  height: 32px;
  justify-content: center;
}

.table-person strong {
  font-size: .8rem;
  font-weight: 600;
}

.rating-mini {
  color: var(--ui-primary);
  font-size: .78rem;
}

.status-badge {
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  font-size: .66rem;
  font-weight: 650;
  padding: .25rem .5rem;
}

.status-positive { background: var(--ui-success-soft); border-color: color-mix(in srgb, var(--ui-success) 24%, transparent); color: var(--ui-success); }
.status-attention { background: var(--ui-warning-soft); border-color: color-mix(in srgb, var(--ui-warning) 24%, transparent); color: var(--ui-warning); }

.empty-state {
  color: var(--ui-muted) !important;
  padding: 2.5rem !important;
  text-align: center;
}

.operation-summary-list {
  border-top: 1px solid var(--ui-border);
  display: grid;
}

.operation-summary-list > div {
  align-items: center;
  border-bottom: 1px solid var(--ui-border);
  display: flex;
  justify-content: space-between;
  min-height: 60px;
  padding: .75rem 1.1rem;
}

.operation-summary-list > div:last-child {
  border-bottom: 0;
}

.operation-summary-list span {
  color: var(--ui-muted);
  font-size: .76rem;
}

.operation-summary-list span i {
  color: var(--ui-primary);
  margin-right: .55rem;
}

.operation-summary-list strong {
  font-size: 1rem;
  font-weight: 650;
}

.admin-module-list,
.admin-module-row,
.report-builder-page,
.report-filter-box,
.report-filter-chip,
.report-filter-options,
.rating-field,
.bulk-check-panel,
.brand-preview,
.email-editor-controls,
.email-logo-source,
.email-preview-toolbar {
  background: var(--ui-surface);
  border-color: var(--ui-border);
  color: var(--ui-foreground);
}

.admin-module-row strong,
.report-builder-label,
.report-filter-head,
.report-field-group li,
.email-editor-section h2,
.admin-module-card h2 {
  color: var(--ui-foreground);
}

.admin-module-row span,
.email-color-control span,
.email-preview-toolbar span {
  color: var(--ui-muted);
}

.report-builder-top,
.table thead,
.import-stat.muted {
  background: var(--ui-subtle);
  border-color: var(--ui-border);
}

.report-filter-option:hover,
.admin-module-row:hover {
  background: var(--ui-subtle);
}

.email-preview-tool {
  background: var(--ui-subtle);
  border-color: var(--ui-border);
}

.brand-preview-sidebar {
  background: var(--ui-sidebar);
  border: 1px solid var(--ui-border);
  box-shadow: none;
}

.auth-theme-toggle {
  position: fixed;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 20;
}

.clean-login-page {
  background: var(--ui-bg) !important;
  color: var(--ui-foreground);
  min-height: 100vh;
}

.clean-login-shell {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(500px, 1.1fr);
  min-height: 100vh;
}

.clean-login-form-pane {
  background: var(--ui-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 2rem clamp(2rem, 5vw, 5rem);
  position: relative;
}

.clean-login-brand {
  align-items: center;
  display: flex;
  gap: .65rem;
  min-height: 38px;
}

.clean-login-brand .brand-mark {
  background: var(--ui-primary);
  box-shadow: none;
  color: #fff;
}

.clean-login-brand .brand-wordmark {
  max-height: 38px;
  max-width: 190px;
}

html:not([data-theme="dark"]) .sidebar-brand .brand-wordmark,
html:not([data-theme="dark"]) .clean-login-brand .brand-wordmark {
  filter: brightness(0) saturate(100%) invert(16%) sepia(32%) saturate(1948%) hue-rotate(182deg) brightness(86%) contrast(101%);
}

html[data-theme="dark"] .sidebar-brand .brand-wordmark,
html[data-theme="dark"] .clean-login-brand .brand-wordmark {
  filter: none;
}

.clean-login-form-wrap {
  margin: 3rem auto;
  max-width: 390px;
  width: 100%;
}

.clean-login-heading {
  margin-bottom: 2rem;
}

.clean-login-heading h1 {
  color: var(--ui-foreground);
  font-size: 1.75rem;
  font-weight: 650;
  margin: 0;
}

.clean-login-heading p {
  color: var(--ui-muted);
  font-size: .86rem;
  margin: .6rem 0 0;
}

.clean-login-form {
  display: grid;
  gap: 1.25rem;
}

.clean-login-form .form-label {
  color: var(--ui-foreground);
  font-size: .76rem;
  font-weight: 600;
  margin-bottom: .45rem;
}

.clean-login-form .form-control {
  min-height: 44px;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  padding-right: 2.8rem;
}

.password-input-wrap button {
  background: transparent;
  border: 0;
  color: var(--ui-muted);
  height: 38px;
  position: absolute;
  right: .25rem;
  top: 3px;
  width: 38px;
}

.auth-link,
.auth-support-link {
  color: var(--ui-muted);
  font-size: .74rem;
}

.auth-link:hover,
.auth-support-link:hover {
  color: var(--ui-primary);
}

.clean-login-submit {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.clean-login-submit i {
  margin-left: auto;
}

.auth-divider {
  border-top: 1px solid var(--ui-border);
  margin: 1.75rem 0;
  position: relative;
  text-align: center;
}

.auth-divider span {
  background: var(--ui-bg);
  color: var(--ui-muted);
  font-size: .68rem;
  left: 50%;
  padding: 0 .75rem;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
}

.clean-login-register {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.auth-support-link {
  display: block;
  margin-top: 1rem;
  text-align: center;
}

.clean-login-footer {
  color: var(--ui-muted);
  font-size: .7rem;
}

.clean-login-visual {
  background-color: #d9e5f2;
  background-image: var(--auth-image);
  background-position: center;
  background-size: cover;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.clean-login-visual::before {
  background: rgba(8, 24, 48, .5);
  content: "";
  inset: 0;
  position: absolute;
}

html[data-theme="dark"] .clean-login-visual::before {
  background: rgba(4, 10, 20, .66);
}

.clean-login-visual-content {
  bottom: clamp(2.5rem, 7vw, 6rem);
  color: #fff;
  left: clamp(2.5rem, 6vw, 5rem);
  max-width: 500px;
  position: absolute;
  right: 2.5rem;
  z-index: 1;
}

.clean-login-kicker {
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  display: inline-block;
  font-size: .68rem;
  font-weight: 650;
  padding: .35rem .65rem;
  text-transform: uppercase;
}

.clean-login-visual-content h2 {
  font-size: 2.2rem;
  font-weight: 650;
  margin: 1.1rem 0 0;
  max-width: 440px;
}

.clean-login-visual-content p {
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  line-height: 1.6;
  margin: .85rem 0 0;
  max-width: 440px;
}

.login-page:not(.clean-login-page) {
  background: var(--ui-bg) !important;
  color: var(--ui-foreground);
}

.login-page:not(.clean-login-page) .login-shell {
  background: var(--ui-bg);
  gap: 0;
  padding: 0;
}

.login-page:not(.clean-login-page) .login-copy {
  background: var(--ui-subtle);
  color: var(--ui-foreground);
  min-height: 100vh;
  padding: clamp(2rem, 7vw, 6rem);
}

.login-page:not(.clean-login-page) .login-copy p {
  color: var(--ui-muted);
}

.login-page:not(.clean-login-page) .login-panel {
  background: var(--ui-bg);
  padding: 2rem;
}

.login-page:not(.clean-login-page) .login-card {
  backdrop-filter: none;
  background: var(--ui-surface);
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow);
  color: var(--ui-foreground);
}

.login-page:not(.clean-login-page) .login-card p,
.login-page:not(.clean-login-page) .login-card .form-label {
  color: var(--ui-muted);
}

.login-page:not(.clean-login-page) .login-card .form-control {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  color: var(--ui-foreground);
}

.password-link {
  color: var(--ui-primary);
}

.password-link:hover {
  color: var(--ui-primary-hover);
}

.form-help-danger {
  color: var(--ui-danger);
}

@media (max-width: 1199px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .email-editor-grid {
    grid-template-columns: 1fr;
  }

  .email-editor-controls {
    max-height: none;
  }

  .email-preview-tool {
    position: static;
  }
}

@media (max-width: 991px) {
  .app-shell {
    min-width: 0;
  }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    background: rgba(6, 12, 20, .48);
    border: 0;
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    z-index: 1020;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .app-frame {
    margin-left: 0;
  }

  .sidebar-mobile-toggle {
    display: inline-flex;
  }

  .app-topbar {
    gap: .55rem;
    padding: .65rem 1rem;
  }

  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }

  .clean-login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .clean-login-visual {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-content {
    padding: 1.25rem 1rem 2rem;
  }

  .topbar-search {
    max-width: none;
  }

  .topbar-separator,
  .user-chip-copy {
    display: none;
  }

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

  .dashboard-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .metric {
    min-height: 122px;
  }

  .clean-login-form-pane {
    min-height: 100vh;
    padding: 1.25rem;
  }

  .clean-login-form-wrap {
    margin: 3rem auto;
  }

  .auth-theme-toggle {
    right: 1rem;
    top: 1rem;
  }

  .login-page:not(.clean-login-page) .login-panel {
    max-width: none;
    padding: 1rem;
  }

  .login-page:not(.clean-login-page) .login-card {
    width: calc(100vw - 2rem);
  }
}

@media (max-width: 480px) {
  .dashboard-metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar-search input::placeholder {
    color: transparent;
  }
}
