/* ===== Base ===== */
:root{
  --bg: #070A13;
  --border: rgba(255,255,255,0.14);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);

  --primary: #6D5BFF;
  --primary-2: #2F7BFF;
  --accent: #00D4FF;

  --success: #38D996;
  --danger: #FF4D6D;

  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html{
  min-height: 100%;
  background: var(--bg);
}

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(109,91,255,0.22), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(47,123,255,0.20), transparent 55%),
    radial-gradient(700px 500px at 55% 95%, rgba(0,212,255,0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a{ color: rgba(255,255,255,0.86); text-decoration: none; }
a:hover{ text-decoration: underline; }

.fesi-logo{
  display: block;
  color: #fff;
}

.brand-logo{
  width: min(360px, 100%);
  height: auto;
  margin-bottom: 28px;
}

.sidebar-logo{
  width: 100%;
  max-width: 210px;
  height: auto;
  margin: 0 0 22px;
}

.landing-logo-image{
  width: 184px;
  height: auto;
}

/* Layout */
.container{
  min-height: 100vh;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 16px 12px; /* iets kleiner dan eerder */
}

.shell{
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

@media (max-width: 920px){
  .shell{ grid-template-columns: 1fr; }
}

/* Auth / form layout */
.brand{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.brand::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(600px 220px at 20% 10%, rgba(109,91,255,0.30), transparent 60%),
    radial-gradient(600px 220px at 80% 30%, rgba(47,123,255,0.22), transparent 60%);
  filter: blur(8px);
  opacity: 0.9;
  pointer-events:none;
}

.brand > *{ position: relative; z-index: 1; }

.h1{
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1.08;
}

.p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.pills{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
}

.footer{
  margin-top: 14px;
  color: rgba(255,255,255,0.60);
  font-size: 13px;
}

.app-copyright{
  flex: 0 0 auto;
  width: 100%;
  padding: 18px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  text-align: center;
  color: rgba(255,255,255,0.74);
  font-size: 12px;
  line-height: 1.4;
}

.legal-links{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.legal-links a{
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-page .app-copyright{
  color: var(--muted-2, rgba(255,255,255,0.74));
}

.auth-page .app-copyright{
  color: rgba(71,84,103,0.78);
  padding-top: 0;
}

.card,
.sidebar-card,
.panel{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card{
  padding: 22px;
  min-width: 0; /* voorkomt overflow issues */
}

.card h2{
  margin: 0 0 18px;
  font-size: 20px;
}

.brand .footer{
  display: none;
}

/* Form controls (login/register/filter) */
.row{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.label{
  display:grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
}

.input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}

.input:focus{
  border-color: rgba(109,91,255,0.70);
  box-shadow: 0 0 0 4px rgba(109,91,255,0.16);
}

/* Buttons */
.btn{
  border: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 30px rgba(47,123,255,0.18);
}

.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

.btn-ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.86);
  box-shadow: none;
}

/* Alerts (login/register messages) */
.alert{
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  margin-bottom: 12px;
}
.alert-danger{
  border-color: rgba(255,77,109,0.35);
  background: rgba(255,77,109,0.10);
}
.alert-success{
  border-color: rgba(56,217,150,0.35);
  background: rgba(56,217,150,0.10);
}

/* Landing */
.landing-page{
  min-height: 100vh;
}

.landing-topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
}

.landing-logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.landing-logo:hover{
  text-decoration: none;
}

.landing-main{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 24px 48px;
}

.landing-content{
  width: min(720px, 100%);
  text-align: center;
}

.landing-kicker{
  margin-bottom: 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.landing-content h1{
  margin: 0;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1;
}

.landing-content p{
  width: min(560px, 100%);
  margin: 20px auto 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

/* Badges (status) */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  font-size: 12px;
  color: rgba(255,255,255,0.86);
  white-space: nowrap;
}
.dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.40);
}
.badge-open .dot{ background: var(--accent); }
.badge-review .dot{ background: rgba(109,91,255,0.95); }
.badge-approved .dot{ background: var(--success); }
.badge-rejected .dot{ background: var(--danger); }
.badge-closed .dot{ background: rgba(93, 211, 158, 0.95); }
.badge-info .dot{ background: rgba(255,255,255,0.55); }

.mono{ font-variant-numeric: tabular-nums; }

.mini{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Dashboard */

.dashboard-page{
  min-height: 100vh;
}

.dashboard-wrapper{
  flex: 1;
  max-width: 1450px;
  width: 100%;
  margin: 0 auto;
  padding: 108px 20px 24px;
}

@media (max-width: 980px){
  .dashboard-wrapper{
    padding-top: 132px;
  }
}

.sidebar-card{
  padding: 22px;
}

.sidebar-title{
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 800;
}

.sidebar-menu{
  display: grid;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.demo-mode-badge{
  margin-top: 18px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 193, 92, 0.4);
  border-radius: 10px;
  background: rgba(255, 193, 92, 0.1);
  color: #ffd38a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.sidebar-section-label{
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.sidebar-link{
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  text-decoration: none;
}

.sidebar-link:hover{
  text-decoration: none;
  background: rgba(255,255,255,0.08);
}

.sidebar-link.active{
  background: linear-gradient(135deg, rgba(109,91,255,0.25), rgba(47,123,255,0.20));
  border-color: rgba(109,91,255,0.45);
}

.sidebar-info-card{
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.sidebar-info-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.sidebar-info-value{
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.sidebar-logout{
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sidebar-action-btn{
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.sidebar-switch{
  padding-top: 4px;
  margin-bottom: 20px;
}

.dashboard-main{
  min-width: 0;
}

.dashboard-header{
  margin-bottom: 18px;
  padding-top: 8px;
}

.dashboard-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px){
  .dashboard-layout{
    grid-template-columns: 1fr;
  }
}

.dashboard-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
}

.dashboard-content{
  min-width: 0;
}

.app-topbar{
  padding: 14px 0;
  background: rgba(7,10,19,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(18px);
}

.app-topbar .sidebar-card,
.app-topbar-inner{
  width: min(1450px, 100%);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-topbar-inner{
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.app-topbar-brand{
  display: inline-flex;
  align-items: center;
  justify-self: start;
  color: inherit;
  text-decoration: none;
}

.app-topbar-brand:hover{
  text-decoration: none;
}

.app-topbar .sidebar-logo{
  width: 174px;
  max-width: 100%;
  margin: 0;
}

.app-topbar-nav{
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  margin: 0;
  min-width: 0;
}

.app-topbar .sidebar-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,0.76);
  font-weight: 700;
  white-space: nowrap;
}

.app-topbar .sidebar-link:hover{
  background: transparent;
  color: #fff;
}

.app-topbar .sidebar-link.active{
  background: transparent;
  border-color: transparent;
  color: #fff;
}

.app-topbar .sidebar-link.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.app-topbar-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.app-topbar .sidebar-switch,
.app-topbar .sidebar-logout{
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.app-topbar .sidebar-action-btn,
.app-topbar .detail-action-btn{
  flex: initial;
  min-height: 40px;
  padding: 10px 12px;
}

.app-icon-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  cursor: pointer;
  text-decoration: none;
}

.app-icon-btn:hover{
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.app-icon-btn.active{
  border-color: rgba(109,91,255,0.45);
  background: linear-gradient(135deg, rgba(109,91,255,0.20), rgba(47,123,255,0.16));
  color: #fff;
}

.app-icon-btn svg{
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-profile-menu{
  position: relative;
}

.app-profile-menu summary{
  list-style: none;
}

.app-profile-menu summary::-webkit-details-marker{
  display: none;
}

.app-profile-avatar{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.app-profile-dropdown{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(260px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(12,16,30,0.98);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.app-profile-email{
  overflow: hidden;
  padding: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-profile-dropdown a{
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(255,255,255,0.88);
  font-weight: 700;
  text-decoration: none;
}

.app-profile-dropdown a:hover{
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

@media (max-width: 900px){
  .app-topbar-inner{
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .app-topbar-nav{
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-topbar .sidebar-link{
    min-height: 42px;
  }
}

@media (max-width: 620px){
  .dashboard-wrapper{
    padding-top: 164px;
  }

  .app-topbar{
    padding: 12px 0;
  }

  .app-topbar-inner{
    grid-template-columns: 1fr;
  }

  .app-topbar-actions{
    justify-content: flex-start;
    overflow-x: auto;
  }

  .app-topbar .sidebar-logo{
    width: 152px;
  }
}

.app-grid{
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.app-grid-two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px){
  .app-grid-two{
    grid-template-columns: 1fr;
  }
}

.dashboard-title-main{
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.kpi-card,
.detail-stat-card,
.timeline-card,
.attachment-card{
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
}

.kpi-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1280px){
  .kpi-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .kpi-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px){
  .kpi-grid{
    grid-template-columns: 1fr;
  }
}

.kpi-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  padding: 18px;
  min-height: 110px;
  box-shadow: var(--shadow);
}

.kpi-label{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.kpi-value{
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.panel{
  padding: 20px;
  margin-bottom: 20px;
}

.panel-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2{
  margin: 0 0 4px;
}

.inline-action-form{
  margin: 0;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.analytics-filter-form{
  margin: 0;
}

.analytics-month-select{
  min-width: 150px;
}

.dashboard-filters{
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.dashboard-filters-extended{
  grid-template-columns: minmax(0, 1.4fr) 220px 220px auto;
}

.admin-users-filters{
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 900px){
  .dashboard-filters{
    grid-template-columns: 1fr;
  }
}

.filter-item{
  min-width: 0;
}

.filter-grow{
  min-width: 0;
}

.filter-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.success-actions{
  margin-top: 12px;
}

.claims-table-wrap{
  overflow-x: auto;
}

.claims-table{
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.claims-table thead th{
  text-align: left;
  padding: 12px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.claims-table tbody td{
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
  font-size: 14px;
}

.claims-table tbody tr:hover{
  background: rgba(255,255,255,0.04);
}

.table-main{
  font-weight: 800;
}

.table-link{
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.table-link:hover{
  text-decoration: none;
}

.empty-state{
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

.quick-links{
  display: grid;
  gap: 12px;
}

.quick-link-card{
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: inherit;
  text-decoration: none;
}

.quick-link-card:hover{
  text-decoration: none;
  border-color: rgba(109,91,255,0.34);
  background: rgba(255,255,255,0.06);
}

.quick-link-title{
  font-weight: 700;
}

.metric-list{
  display: grid;
  gap: 12px;
}

.metric-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.metric-label{
  color: rgba(255,255,255,0.84);
}

.metric-value{
  font-size: 20px;
  font-weight: 800;
}

.analytics-kpi-small{
  font-size: 24px;
}

.analytics-stack{
  display: grid;
  gap: 14px;
}

.analytics-row{
  display: grid;
  gap: 8px;
}

.analytics-row-head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.analytics-bar-track{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.analytics-bar-fill{
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.analytics-table-wrap{
  overflow-x: auto;
}

.analytics-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.analytics-table th,
.analytics-table td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}

.analytics-table th{
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-table tr:last-child td{
  border-bottom: 0;
}

.btn-danger{
  background: linear-gradient(135deg, #d94b6a, #c52750);
  box-shadow: 0 12px 30px rgba(201, 39, 80, 0.24);
}

.detail-header-row{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-back{
  margin-bottom: 10px;
  font-size: 13px;
}

.detail-alert{
  margin-top: 18px;
  margin-bottom: 0;
}

.detail-actions{
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-actions-panel{
  min-width: 0;
}

.detail-action-btn{
  width: 100%;
}

.detail-overview-status-form{
  display: grid;
  gap: 8px;
  min-width: min(100%, 360px);
}

.detail-overview-status-controls{
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.detail-case-controls-form{
  display: grid;
  grid-template-columns: minmax(160px, 180px) minmax(220px, 260px) auto;
  gap: 10px;
  align-items: end;
  min-width: min(100%, 560px);
}

.detail-status-form{
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.detail-mail-form{
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.detail-mail-textarea{
  min-height: 140px;
  resize: vertical;
}

.detail-mail-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-note-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.resolution-actions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resolution-open-btn,
.resolution-option-btn{
  min-height: 44px;
}

.resolution-open-btn:disabled,
.resolution-option-btn:disabled,
.resolution-dialog-actions .btn:disabled{
  cursor: wait;
  opacity: 0.62;
}

.resolution-modal{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.resolution-modal.open{
  display: flex;
}

.resolution-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 22, 0.74);
  backdrop-filter: blur(10px);
}

.resolution-dialog{
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(125, 211, 252, 0.14), transparent 64%),
    linear-gradient(180deg, rgba(28, 36, 58, 0.98), rgba(14, 20, 34, 0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.resolution-dialog-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.resolution-dialog-head h3{
  margin: 3px 0 0;
  font-size: 20px;
}

.resolution-icon-btn{
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.resolution-icon-btn:hover{
  background: rgba(255,255,255,0.10);
}

.resolution-status{
  min-height: 22px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.45;
}

.resolution-textarea{
  min-height: 260px;
  resize: vertical;
}

.resolution-dialog-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.modal-open{
  overflow: hidden;
}

@media (max-width: 760px){
  .resolution-actions{
    grid-template-columns: 1fr;
  }

  .resolution-dialog-actions{
    display: grid;
    grid-template-columns: 1fr;
  }
}

.settings-form{
  display: grid;
  gap: 12px;
}

.settings-submit{
  margin-top: 6px;
}

.settings-static-value{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  font-weight: 700;
}

.admin-kpi-grid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.users-table{
  min-width: 980px;
}

.admin-activity-table{
  min-width: 820px;
}

.inline-role-form{
  display: grid;
  grid-template-columns: minmax(140px, 180px) auto auto;
  gap: 10px;
  align-items: center;
}

.admin-user-name-fields{
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.admin-user-dialog{
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background:
    radial-gradient(460px 180px at 100% 0%, rgba(109,91,255,0.16), transparent 64%),
    linear-gradient(180deg, rgba(24,31,52,0.98), rgba(12,17,31,0.98));
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0,0,0,0.48);
  padding: 20px;
}

.admin-user-dialog::backdrop{
  background: rgba(4,8,18,0.76);
  backdrop-filter: blur(10px);
}

.admin-user-dialog-close{
  position: absolute;
  top: 14px;
  right: 14px;
}

.admin-user-dialog-head{
  padding-right: 48px;
  margin-bottom: 18px;
}

.admin-user-dialog-head h3{
  margin: 0 0 4px;
  font-size: 20px;
}

.admin-user-edit-form{
  gap: 10px;
}

.admin-user-dialog-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

@media (max-width: 700px){
  .admin-kpi-grid{
    grid-template-columns: 1fr;
  }

  .inline-role-form{
    grid-template-columns: 1fr;
  }
}

.detail-overview-shell{
  display: grid;
  gap: 18px;
}

.detail-overview-tabset{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-tab-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.detail-tab-chip:hover{
  text-decoration: none;
  background: rgba(255,255,255,0.08);
}

.detail-tab-chip.active{
  background: linear-gradient(135deg, #1f66ff, #0f4ed8);
  border-color: rgba(31,102,255,0.8);
}

.detail-overview-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.detail-overview-mini-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.detail-overview-mini-card,
.detail-overview-summary-card,
.detail-overview-wide-card{
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  padding: 18px;
}

.detail-overview-mini-card{
  min-height: 104px;
}

.detail-overview-summary-card{
  min-height: 0;
}

.detail-overview-box-title{
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.detail-overview-bottom{
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.detail-overview-actions{
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-tabs{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-tabs-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-delete-form{
  margin-left: auto;
}

.detail-tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-weight: 700;
}

.detail-tab:hover{
  text-decoration: none;
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
}

.detail-tab.active{
  border-color: rgba(109,91,255,0.36);
  background: linear-gradient(135deg, rgba(109,91,255,0.22), rgba(47,123,255,0.18));
  color: #fff;
}

.detail-overview-top{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 980px){
  .panel-head{
    flex-direction: column;
  }

  .detail-overview-status-form{
    width: 100%;
  }

  .detail-overview-top{
    grid-template-columns: 1fr;
  }

  .detail-case-controls-form{
    grid-template-columns: 1fr;
  }

  .detail-tabs-row{
    flex-direction: column;
  }

  .detail-delete-form{
    margin-left: 0;
    width: 100%;
  }

  .detail-delete-form .btn{
    width: 100%;
  }

  .detail-overview-grid,
  .detail-overview-bottom{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px){
  .detail-overview-status-controls{
    grid-template-columns: 1fr;
  }

  .detail-overview-mini-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px){
  .detail-overview-mini-grid{
    grid-template-columns: 1fr;
  }

}

.detail-hero-card{
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(420px 180px at 12% 8%, rgba(109,91,255,0.22), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-radius: 18px;
  padding: 20px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-hero-label{
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-hero-value{
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  word-break: break-word;
}

.detail-hero-meta{
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-stat-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-side-stack{
  display: grid;
  gap: 14px;
}

@media (max-width: 620px){
  .detail-stat-grid{
    grid-template-columns: 1fr;
  }
}

.detail-stat-card{
  background: rgba(255,255,255,0.04);
  padding: 16px;
  min-height: 110px;
}

.detail-card-form{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.detail-status-pill{
  margin-top: 8px;
}

.ai-screening-status{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(46,144,250,0.25);
  border-radius: 8px;
  background: rgba(46,144,250,0.08);
  color: var(--text);
}

.ai-screening-status-dot{
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #2e90fa;
}

.ai-screening-status strong{
  display: block;
}

.ai-screening-status p{
  margin: 5px 0 0;
  color: var(--muted);
}

.ai-screening-status-processing .ai-screening-status-dot{
  animation: ai-screening-pulse 1.4s ease-in-out infinite;
}

.ai-screening-status-failed{
  border-color: rgba(217,45,32,0.28);
  background: rgba(217,45,32,0.08);
}

.ai-screening-status-failed .ai-screening-status-dot{
  background: #d92d20;
}

.ai-screening-status-missing{
  border-color: rgba(247,144,9,0.3);
  background: rgba(247,144,9,0.09);
}

.ai-screening-status-missing .ai-screening-status-dot{
  background: #f79009;
}

@keyframes ai-screening-pulse{
  50%{ opacity: 0.35; }
}

.detail-stat-value{
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.detail-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid-two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px){
  .detail-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px){
  .detail-grid{
    grid-template-columns: 1fr;
  }
}

.detail-item{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 14px;
}

.detail-ai-summary{
  border-color: rgba(125, 211, 252, 0.22);
  background: rgba(125, 211, 252, 0.06);
}

.detail-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-value{
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.detail-summary{
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
}

.ai-summary-list{
  display: grid;
  gap: 10px;
}

.ai-summary-list h4{
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.ai-summary-list ul{
  display: grid;
  gap: 6px;
  margin: -4px 0 4px;
  padding-left: 18px;
}

.ai-summary-list li{
  padding-left: 2px;
}

.detail-summary-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-summary-head-inline{
  margin-top: 18px;
}

.detail-summary-head h3{
  margin: 0 0 4px;
  font-size: 16px;
}

.detail-inline-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.timeline{
  display: grid;
  gap: 14px;
}

.timeline-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  padding: 16px;
  border-left: 4px solid rgba(255,255,255,0.14);
}

.timeline-card-inbound{
  border-left-color: #2e90fa;
}

.timeline-card-note{
  border-left-color: #f79009;
}

.timeline-meta{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.message-sender{
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 700;
}

.timeline-title{
  margin: 0 0 10px;
  font-size: 16px;
}

.timeline-body{
  color: rgba(255,255,255,0.84);
  line-height: 1.7;
  min-height: 8.5em;
}

.message-collapse summary{
  display: grid;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.message-collapse summary::-webkit-details-marker{
  display: none;
}

.message-preview{
  display: -webkit-box;
  min-height: 8.5em;
  overflow: hidden;
  color: rgba(255,255,255,0.84);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.message-toggle{
  justify-self: start;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
}

.message-toggle-open{
  display: none;
}

.message-collapse[open] .message-preview,
.message-collapse[open] .message-toggle-closed{
  display: none;
}

.message-collapse[open] .message-toggle-open{
  display: inline;
}

.message-collapse[open] .message-toggle{
  margin-bottom: 10px;
}

.message-full{
  margin-top: 0;
}

.attachment-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.attachment-list-inline{
  margin-top: 4px;
}

.attachment-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  padding: 12px;
}

.attachment-card-compact{
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 74px;
  color: inherit;
  text-decoration: none;
}

.attachment-card-compact:hover{
  text-decoration: none;
  border-color: rgba(109,91,255,0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.attachment-preview-link{
  cursor: zoom-in;
}

.image-preview-modal{
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-preview-modal.open{
  display: flex;
}

.image-preview-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(10px);
}

.image-preview-dialog{
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 29, 48, 0.98), rgba(10, 15, 28, 0.98));
  box-shadow: 0 30px 90px rgba(0,0,0,0.52);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.image-preview-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.image-preview-head h3{
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  word-break: break-word;
}

.image-preview-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.image-preview-stage{
  min-height: 260px;
  max-height: calc(100vh - 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.22);
}

.image-preview-stage img{
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.image-preview-stage iframe{
  width: 100%;
  height: calc(100vh - 160px);
  min-height: 420px;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.image-preview-stage img[hidden],
.image-preview-stage iframe[hidden]{
  display: none;
}

@media (max-width: 620px){
  .image-preview-modal{
    padding: 10px;
  }

  .image-preview-head{
    align-items: flex-start;
    flex-direction: column;
  }

  .image-preview-actions{
    width: 100%;
    justify-content: space-between;
  }
}

.attachment-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(109,91,255,0.26), rgba(47,123,255,0.24));
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  grid-row: span 2;
}

.attachment-name{
  font-weight: 700;
  word-break: break-word;
  line-height: 1.25;
  font-size: 13px;
}

.attachment-meta{
  color: var(--muted);
  line-height: 1.25;
}

/* ===== SaaS landing page ===== */
.saas-page{
  --saas-bg: #f7f8fb;
  --saas-surface: rgba(255,255,255,0.82);
  --saas-surface-strong: #ffffff;
  --saas-ink: #111827;
  --saas-muted: #5f6778;
  --saas-soft: #eef1f7;
  --saas-line: rgba(17,24,39,0.10);
  --saas-primary: #5b4dff;
  --saas-primary-dark: #3426d9;
  --saas-cyan: #02b8d8;
  --saas-green: #18a676;
  --saas-radius: 18px;
  --saas-shadow: 0 24px 80px rgba(35,42,68,0.12);
  min-height: 100vh;
  color: var(--saas-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,248,251,0.94) 36%, #f7f8fb 100%),
    radial-gradient(780px 460px at 16% 4%, rgba(91,77,255,0.18), transparent 64%),
    radial-gradient(760px 520px at 92% 10%, rgba(2,184,216,0.12), transparent 58%);
}

.saas-page a{
  color: inherit;
}

.saas-page a:focus-visible,
.saas-page button:focus-visible,
.saas-page summary:focus-visible{
  outline: 3px solid rgba(91,77,255,0.35);
  outline-offset: 4px;
}

.saas-container{
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.saas-nav{
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(1240px, calc(100% - 32px));
  min-height: 68px;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 18px 52px rgba(27,36,65,0.10);
  backdrop-filter: blur(18px);
}

.saas-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--saas-ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.saas-brand:hover,
.saas-menu a:hover,
.saas-login:hover,
.saas-footer a:hover{
  text-decoration: none;
}

.saas-brand-mark{
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--saas-primary), var(--saas-cyan));
  box-shadow: 0 12px 28px rgba(91,77,255,0.22);
  font-size: 13px;
  line-height: 1;
}

.platform-management-grid{
  align-items: start;
}

.platform-copy-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.platform-copy-row .input{
  min-width: 0;
}

.platform-action-stack{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.platform-action-stack form{
  margin: 0;
}

.settings-branding-panel{
  margin-bottom: 18px;
}

.settings-section{
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.settings-section-head h2{
  margin: 0 0 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.settings-account-panel{
  max-width: 1400px;
}

.settings-account-layout{
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: 0;
}

.settings-account-block{
  min-width: 0;
  padding: 0 28px 28px 0;
}

.settings-account-block > .label,
.settings-password-form .label{
  margin-top: 12px;
  margin-bottom: 8px;
}

.settings-account-block > .panel-head:first-child,
.settings-account-block > .label:first-child,
.settings-password-form .label:first-child{
  margin-top: 0;
}

.settings-account-block:nth-child(2){
  padding-left: 28px;
  border-left: 1px solid rgba(17,24,39,0.10);
}

.settings-account-block-password{
  grid-column: 1 / -1;
  padding: 28px 0 0;
  border-top: 1px solid rgba(17,24,39,0.10);
}

.settings-password-form{
  display: grid;
  max-width: 640px;
}

.settings-account-actions{
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(17,24,39,0.10);
}

.settings-account-actions .settings-submit{
  width: min(100%, 640px);
}

.settings-submission-link{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.settings-submission-link .input{
  min-width: 0;
}

.settings-branding-form{
  max-width: 720px;
}

.settings-branding-preview{
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(17,24,39,0.10);
  border-left: 5px solid var(--preview-brand-color);
  border-radius: 8px;
  background: #fff;
}

.settings-branding-preview.dark{
  background: #141824;
  color: #f8fafc;
  border-color: rgba(255,255,255,0.12);
}

.settings-branding-preview.dark .mini{
  color: rgba(248,250,252,0.68);
}

.settings-logo-preview{
  display: grid;
  place-items: center;
  width: 74px;
  height: 54px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 8px;
  background: rgba(17,24,39,0.03);
  overflow: hidden;
}

.settings-logo-preview img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.settings-logo-preview span{
  color: var(--preview-brand-color);
  font-weight: 900;
}

.settings-color-row{
  display: grid;
  grid-template-columns: 54px minmax(0, 180px);
  gap: 10px;
  align-items: center;
}

.settings-color-input{
  width: 54px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(17,24,39,0.14);
  border-radius: 8px;
  background: #fff;
}

.settings-toggle-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.settings-toggle-title{
  display: block;
  margin-bottom: 3px;
  color: #172033;
  font-weight: 900;
}

.settings-toggle-row input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-slider{
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #d8dee9;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,0.08);
  transition: background 180ms ease;
}

.settings-toggle-slider::after{
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(17,24,39,0.22);
  transition: transform 180ms ease;
}

.settings-toggle-row input:checked + .settings-toggle-slider{
  background: #172033;
}

.settings-toggle-row input:checked + .settings-toggle-slider::after{
  transform: translateX(24px);
}

.settings-toggle-row:focus-within{
  outline: 3px solid rgba(91,77,255,0.22);
  outline-offset: 3px;
}

@media (max-width: 680px){
  .platform-copy-row{
    grid-template-columns: 1fr;
  }

  .settings-submission-link{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px){
  .settings-account-layout{
    grid-template-columns: 1fr;
  }

  .settings-account-block,
  .settings-account-block:nth-child(2),
  .settings-account-block-password{
    padding: 0;
    border-left: 0;
    border-top: 1px solid rgba(17,24,39,0.10);
  }

  .settings-account-block:first-child{
    border-top: 0;
  }

  .settings-account-block + .settings-account-block{
    margin-top: 24px;
    padding-top: 24px;
  }
}

.saas-brand-logo{
  display: block;
  width: 156px;
  height: 35px;
  object-fit: contain;
  object-position: left center;
}

.saas-menu{
  display: flex;
  justify-content: center;
  gap: 8px;
}

.saas-menu a,
.saas-login{
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--saas-muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.saas-menu a:hover,
.saas-login:hover{
  color: var(--saas-ink);
  background: rgba(91,77,255,0.07);
}

.saas-nav-actions,
.saas-hero-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.saas-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.saas-btn:hover{
  text-decoration: none;
  transform: translateY(-1px);
}

.saas-btn-primary{
  color: #fff;
  background: linear-gradient(135deg, var(--saas-primary), var(--saas-primary-dark));
  box-shadow: 0 16px 36px rgba(91,77,255,0.24);
}

.saas-btn-primary:hover{
  box-shadow: 0 20px 44px rgba(91,77,255,0.30);
}

.saas-btn-secondary{
  color: var(--saas-ink);
  background: rgba(255,255,255,0.78);
  border-color: var(--saas-line);
  box-shadow: 0 10px 24px rgba(35,42,68,0.07);
}

.saas-menu-toggle{
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--saas-line);
  border-radius: 12px;
  background: #fff;
}

.saas-menu-toggle span{
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--saas-ink);
}

.saas-hero{
  position: relative;
  overflow: hidden;
  padding: 110px 0 78px;
}

.saas-hero::before{
  content: "";
  position: absolute;
  inset: 72px 0 auto;
  height: 520px;
  background-image:
    linear-gradient(rgba(17,24,39,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 10%, black, transparent 72%);
  pointer-events: none;
}

.saas-hero-grid{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 52px;
}

.saas-hero-copy h1,
.section-heading h2,
.spotlight-copy h2,
.faq-intro h2,
.final-cta-panel h2{
  margin: 0;
  color: var(--saas-ink);
  letter-spacing: 0;
  line-height: 1.04;
}

.saas-hero-copy h1{
  max-width: 660px;
  font-size: clamp(48px, 6vw, 82px);
}

.saas-hero-copy p{
  max-width: 610px;
  margin: 22px 0 0;
  color: var(--saas-muted);
  font-size: 18px;
  line-height: 1.7;
}

.saas-badge,
.saas-section-kicker{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  color: var(--saas-primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.saas-badge{
  padding: 8px 12px;
  border: 1px solid rgba(91,77,255,0.16);
  border-radius: 999px;
  background: rgba(91,77,255,0.08);
}

.saas-hero-actions{
  margin-top: 30px;
  flex-wrap: wrap;
}

.saas-trust-list{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 0;
  margin: 22px 0 0;
  color: var(--saas-muted);
  list-style: none;
  font-size: 14px;
  font-weight: 700;
}

.saas-trust-list li,
.check-list li,
.plan-features li,
.pricing-benefits span{
  position: relative;
  padding-left: 24px;
}

.saas-trust-list li::before,
.check-list li::before,
.plan-features li::before,
.pricing-benefits span::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(24,166,118,0.12);
}

.saas-trust-list li::after,
.check-list li::after,
.plan-features li::after,
.pricing-benefits span::after{
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.35em + 3px);
  width: 5px;
  height: 8px;
  border: solid var(--saas-green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.product-frame{
  overflow: hidden;
  border: 1px solid rgba(17,24,39,0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8f9fd);
  box-shadow: 0 34px 90px rgba(28,36,67,0.18);
}

.hero-product{
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}

.product-topbar{
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid var(--saas-line);
  color: var(--saas-muted);
  font-size: 13px;
}

.product-topbar span{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9deea;
}

.product-topbar strong{
  margin-left: 10px;
  color: var(--saas-ink);
}

.product-body{
  display: grid;
  grid-template-columns: 156px 1fr;
  min-height: 420px;
}

.product-sidebar{
  padding: 22px 16px;
  border-right: 1px solid var(--saas-line);
  background: #fbfcff;
}

.product-logo-line,
.product-nav-line{
  height: 12px;
  border-radius: 999px;
  background: #dfe4f0;
}

.product-logo-line{
  width: 72px;
  margin-bottom: 28px;
  background: linear-gradient(90deg, var(--saas-primary), var(--saas-cyan));
}

.product-nav-line{
  width: 100%;
  margin-bottom: 14px;
}

.product-nav-line.short{
  width: 70%;
}

.product-nav-line.active{
  height: 34px;
  background: rgba(91,77,255,0.10);
  border: 1px solid rgba(91,77,255,0.16);
}

.product-content{
  display: grid;
  gap: 18px;
  padding: 22px;
}

.product-metrics{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.product-metrics div,
.product-panel,
.product-table{
  border: 1px solid var(--saas-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(35,42,68,0.06);
}

.product-metrics div{
  padding: 16px;
}

.product-metrics span,
.product-table span,
.insight-header span{
  display: block;
  color: var(--saas-muted);
  font-size: 12px;
  font-weight: 700;
}

.product-metrics strong{
  display: block;
  margin-top: 8px;
  color: var(--saas-ink);
  font-size: 26px;
}

.product-panel{
  padding: 18px;
}

.product-panel .panel-head,
.insight-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.product-panel .panel-head span,
.insight-header strong{
  font-weight: 800;
}

.product-panel .panel-head b{
  padding: 5px 9px;
  border-radius: 999px;
  color: #0b7b56;
  background: rgba(24,166,118,0.10);
  font-size: 12px;
}

.bar-row{
  height: 12px;
  margin: 15px 0;
  border-radius: 999px;
  background: #edf0f7;
}

.bar-row i{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--saas-primary), var(--saas-cyan));
}

.product-table{
  display: grid;
  gap: 0;
  overflow: hidden;
}

.product-table div{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--saas-line);
}

.product-table div:last-child{
  border-bottom: 0;
}

.product-table b{
  color: var(--saas-ink);
  font-size: 13px;
}

.saas-section{
  padding: 86px 0;
}

.section-heading{
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2,
.spotlight-copy h2,
.faq-intro h2,
.final-cta-panel h2{
  font-size: clamp(34px, 4vw, 54px);
}

.section-heading p,
.spotlight-copy p,
.faq-intro p,
.final-cta-panel p{
  margin: 16px 0 0;
  color: var(--saas-muted);
  font-size: 17px;
  line-height: 1.7;
}

.saas-proof{
  padding: 24px 0 72px;
}

.saas-proof .saas-section-kicker{
  display: flex;
  justify-content: center;
  margin: 0 auto 22px;
  color: var(--saas-muted);
}

.proof-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.proof-grid div{
  padding: 22px;
  border: 1px solid var(--saas-line);
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  text-align: center;
}

.proof-grid strong{
  display: block;
  color: var(--saas-ink);
  font-size: 28px;
}

.proof-grid span{
  display: block;
  margin-top: 6px;
  color: var(--saas-muted);
  font-size: 14px;
  font-weight: 700;
}

.bento-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card,
.pricing-card,
.step-card,
.insight-card,
.workflow-preview,
.final-cta-panel,
.faq-item{
  border: 1px solid var(--saas-line);
  border-radius: var(--saas-radius);
  background: var(--saas-surface-strong);
  box-shadow: 0 16px 42px rgba(35,42,68,0.07);
}

.feature-card{
  min-height: 260px;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-card:hover,
.pricing-card:hover,
.step-card:hover{
  transform: translateY(-3px);
  border-color: rgba(91,77,255,0.24);
  box-shadow: var(--saas-shadow);
}

.feature-card-large{
  grid-column: span 2;
}

.feature-icon{
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--saas-primary);
  background: rgba(91,77,255,0.09);
}

.feature-icon svg{
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3,
.pricing-card h3,
.step-card h3{
  margin: 22px 0 10px;
  color: var(--saas-ink);
  font-size: 21px;
  line-height: 1.2;
}

.feature-card p,
.pricing-card p,
.step-card p{
  margin: 0;
  color: var(--saas-muted);
  line-height: 1.65;
}

.mini-ui{
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.mini-ui span{
  height: 10px;
  border-radius: 999px;
  background: #edf0f7;
}

.mini-ui span:nth-child(1){
  width: 78%;
}

.mini-ui span:nth-child(2){
  width: 52%;
}

.mini-ui span:nth-child(3){
  width: 64%;
  background: rgba(91,77,255,0.16);
}

.feature-spotlight{
  overflow: hidden;
}

.feature-spotlight.alt{
  padding-top: 26px;
}

.spotlight-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.spotlight-copy{
  max-width: 560px;
}

.check-list,
.plan-features{
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  color: var(--saas-ink);
  list-style: none;
  line-height: 1.5;
}

.insight-card,
.workflow-preview{
  padding: 24px;
}

.insight-chart{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  height: 240px;
  padding: 18px;
  border-radius: 16px;
  background:
    linear-gradient(rgba(17,24,39,0.06) 1px, transparent 1px),
    #f8f9fd;
  background-size: 100% 48px;
}

.insight-chart span{
  min-height: 28px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--saas-primary), var(--saas-cyan));
}

.insight-footer{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.insight-footer div{
  padding: 16px;
  border: 1px solid var(--saas-line);
  border-radius: 14px;
  background: #fff;
}

.insight-footer b,
.insight-footer small{
  display: block;
}

.insight-footer b{
  font-size: 24px;
}

.insight-footer small{
  margin-top: 4px;
  color: var(--saas-muted);
  font-weight: 700;
}

.workflow-preview{
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(91,77,255,0.07), rgba(2,184,216,0.06)),
    #fff;
}

.workflow-step{
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 14px;
  border: 1px solid var(--saas-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
}

.workflow-step span{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cfd5e4;
}

.workflow-step.done span{
  background: var(--saas-green);
}

.workflow-step.active{
  border-color: rgba(91,77,255,0.28);
  box-shadow: 0 14px 32px rgba(91,77,255,0.12);
}

.workflow-step.active span{
  background: var(--saas-primary);
}

.workflow-step b{
  color: var(--saas-ink);
}

.steps-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
}

.step-card{
  position: relative;
  min-height: 220px;
  padding: 28px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.step-card span{
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--saas-ink);
  font-size: 13px;
  font-weight: 800;
}

.pricing-section{
  background:
    linear-gradient(180deg, rgba(238,241,247,0), rgba(238,241,247,0.75) 18%, rgba(238,241,247,0.75) 82%, rgba(238,241,247,0));
}

.billing-toggle{
  display: inline-flex;
  gap: 4px;
  margin-top: 26px;
  padding: 5px;
  border: 1px solid var(--saas-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(35,42,68,0.07);
}

.billing-toggle button{
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  color: var(--saas-muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.billing-toggle button.active{
  color: #fff;
  background: var(--saas-ink);
}

.billing-toggle span{
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
}

.pricing-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 18px;
}

.pricing-card{
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 28px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pricing-card.featured{
  border-color: rgba(91,77,255,0.42);
  box-shadow: 0 28px 74px rgba(91,77,255,0.18);
}

.plan-badge{
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--saas-primary-dark);
  background: rgba(91,77,255,0.10);
  font-size: 12px;
  font-weight: 800;
}

.price{
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 26px 0 22px;
  color: var(--saas-ink);
}

.price span{
  font-size: 23px;
  font-weight: 800;
}

.price strong{
  font-size: 54px;
  line-height: 1;
}

.price small{
  color: var(--saas-muted);
  font-weight: 800;
}

.plan-features{
  margin-bottom: 28px;
}

.pricing-card .saas-btn{
  width: 100%;
  margin-top: auto;
}

.pricing-note{
  margin: 26px auto 0;
  color: var(--saas-muted);
  text-align: center;
  line-height: 1.6;
}

.pricing-note a{
  color: var(--saas-primary-dark);
  font-weight: 800;
}

.pricing-benefits{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--saas-line);
  border-radius: 16px;
  background: rgba(255,255,255,0.68);
  color: var(--saas-muted);
  font-weight: 800;
}

.faq-layout{
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 50px;
  align-items: start;
}

.faq-list{
  display: grid;
  gap: 12px;
}

.faq-item{
  overflow: hidden;
}

.faq-item summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  color: var(--saas-ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-item summary::-webkit-details-marker{
  display: none;
}

.faq-item summary span{
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.faq-item summary span::before,
.faq-item summary span::after{
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--saas-primary);
}

.faq-item summary span::after{
  transform: rotate(90deg);
  transition: transform 180ms ease;
}

.faq-item[open] summary span::after{
  transform: rotate(0deg);
}

.faq-item p{
  margin: 0;
  padding: 0 22px 22px;
  color: var(--saas-muted);
  line-height: 1.7;
}

.final-cta{
  padding-top: 42px;
}

.final-cta-panel{
  overflow: hidden;
  padding: 58px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17,24,39,0.96), rgba(34,30,92,0.94)),
    radial-gradient(520px 240px at 75% 25%, rgba(2,184,216,0.35), transparent 70%);
}

.final-cta-panel .saas-section-kicker,
.final-cta-panel h2,
.final-cta-panel p{
  color: #fff;
}

.final-cta-panel p{
  max-width: 620px;
  color: rgba(255,255,255,0.76);
}

.final-cta-panel .saas-btn-secondary{
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

.saas-footer{
  padding: 54px 0 30px;
  color: var(--saas-muted);
}

.footer-grid{
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, 1fr);
  gap: 28px;
  padding-top: 34px;
  border-top: 1px solid var(--saas-line);
}

.saas-footer p{
  max-width: 340px;
  margin: 16px 0 0;
  line-height: 1.6;
}

.saas-footer nav{
  display: grid;
  align-content: start;
  gap: 10px;
}

.saas-footer h2{
  margin: 0 0 6px;
  color: var(--saas-ink);
  font-size: 14px;
}

.saas-footer a{
  color: var(--saas-muted);
  font-size: 14px;
  font-weight: 700;
}

.footer-bottom{
  margin-top: 34px;
  font-size: 14px;
}

.reveal{
  opacity: 1;
  transform: none;
}

.saas-page.motion-ready .reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.saas-page.motion-ready .reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .saas-page *,
  .saas-page *::before,
  .saas-page *::after{
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal{
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1100px){
  .saas-hero-grid{
    grid-template-columns: 1fr;
  }

  .hero-product{
    transform: none;
  }

  .pricing-card{
    padding: 24px;
  }
}

@media (max-width: 1024px){
  .proof-grid,
  .pricing-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-card.featured{
    order: -1;
  }

  .bento-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-large{
    grid-column: span 1;
  }
}

@media (max-width: 860px){
  .saas-nav{
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .saas-menu-toggle{
    display: block;
  }

  .saas-menu,
  .saas-nav-actions{
    display: none;
    grid-column: 1 / -1;
  }

  .saas-nav.is-open .saas-menu,
  .saas-nav.is-open .saas-nav-actions{
    display: grid;
  }

  .saas-menu{
    justify-content: stretch;
    gap: 4px;
    padding-top: 10px;
  }

  .saas-menu a{
    padding: 12px;
  }

  .saas-nav-actions{
    gap: 8px;
    padding: 4px 0 6px;
  }

  .saas-nav-actions .saas-btn,
  .saas-nav-actions .saas-login{
    width: 100%;
  }

  .spotlight-grid,
  .faq-layout{
    grid-template-columns: 1fr;
  }

  .feature-spotlight.alt .workflow-preview{
    order: 2;
  }

  .feature-spotlight.alt .spotlight-copy{
    order: 1;
  }

  .footer-grid{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px){
  .saas-container{
    width: min(100% - 34px, 1240px);
  }

  .saas-hero{
    padding-top: 78px;
  }

  .saas-section{
    padding: 64px 0;
  }

  .saas-hero-copy h1{
    font-size: clamp(42px, 12vw, 62px);
  }

  .proof-grid,
  .bento-grid,
  .pricing-grid,
  .steps-grid{
    grid-template-columns: 1fr;
  }

  .product-body{
    grid-template-columns: 1fr;
  }

  .product-sidebar{
    display: none;
  }

  .pricing-card{
    min-height: auto;
  }
}

@media (max-width: 520px){
  .saas-nav{
    top: 8px;
    width: min(100% - 20px, 1240px);
    margin-top: 8px;
    border-radius: 16px;
  }

  .saas-brand{
    font-size: 14px;
  }

  .saas-brand-mark{
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .saas-hero-actions,
  .final-cta-panel .saas-hero-actions{
    align-items: stretch;
    flex-direction: column;
  }

  .saas-hero-actions .saas-btn{
    width: 100%;
  }

  .saas-trust-list{
    display: grid;
  }

  .product-metrics{
    grid-template-columns: 1fr;
  }

  .product-content,
  .insight-card,
  .workflow-preview,
  .feature-card,
  .pricing-card,
  .step-card{
    padding: 18px;
  }

  .product-body{
    min-height: auto;
  }

  .insight-chart{
    height: 190px;
    gap: 8px;
    padding: 14px;
  }

  .insight-footer,
  .footer-grid{
    grid-template-columns: 1fr;
  }

  .billing-toggle{
    display: grid;
    width: 100%;
  }

  .billing-toggle button{
    width: 100%;
  }

  .price strong{
    font-size: 46px;
  }

  .final-cta-panel{
    padding: 34px 22px;
  }
}

@media (max-width: 390px){
  .saas-container{
    width: min(100% - 26px, 1240px);
  }

  .saas-hero-copy h1{
    font-size: 38px;
  }

  .section-heading h2,
  .spotlight-copy h2,
  .faq-intro h2,
  .final-cta-panel h2{
    font-size: 31px;
  }
}

/* ===== Light SaaS app theme ===== */
.dashboard-page{
  --bg: #f7f8fb;
  --border: rgba(17,24,39,0.10);
  --text: #101827;
  --muted: #667085;
  --primary: #5b4dff;
  --primary-2: #11b8d6;
  --accent: #11b8d6;
  --success: #18a676;
  --danger: #d92d20;
  --shadow: 0 18px 52px rgba(35,42,68,0.08);
  --radius: 18px;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,248,251,0.96) 38%, #f7f8fb 100%),
    radial-gradient(760px 480px at 16% 0%, rgba(91,77,255,0.14), transparent 62%),
    radial-gradient(760px 480px at 92% 10%, rgba(17,184,214,0.11), transparent 60%);
  background-attachment: fixed;
}

.dashboard-page a{
  color: var(--text);
}

.dashboard-page a:focus-visible,
.dashboard-page button:focus-visible,
.dashboard-page input:focus-visible,
.dashboard-page select:focus-visible,
.dashboard-page textarea:focus-visible,
.dashboard-page summary:focus-visible{
  outline: 3px solid rgba(91,77,255,0.26);
  outline-offset: 3px;
}

.dashboard-wrapper{
  width: min(1450px, 100%);
  padding: 112px 24px 34px;
}

.dashboard-header{
  margin-bottom: 22px;
}

.dashboard-title-main{
  color: var(--text);
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: 0;
}

.app-topbar{
  padding: 14px 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.app-topbar .sidebar-card,
.app-topbar-inner{
  width: min(1450px, calc(100% - 32px));
  min-height: 70px;
  padding: 10px 14px 10px 18px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 18px 52px rgba(27,36,65,0.10);
  backdrop-filter: blur(18px);
}

.app-topbar-inner{
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) auto;
  gap: 20px;
}

.app-topbar-brand{
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.app-brand-mark{
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(91,77,255,0.22);
  font-size: 13px;
  line-height: 1;
}

.app-brand-name{
  white-space: nowrap;
}

.app-brand-logo{
  display: block;
  width: 168px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}

.app-topbar-nav{
  gap: 8px;
}

.app-topbar .sidebar-link{
  min-height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--muted);
  transition: color 180ms ease, background 180ms ease;
}

.app-topbar .sidebar-link:hover{
  color: var(--text);
  background: rgba(91,77,255,0.07);
}

.app-topbar .sidebar-link.active{
  color: var(--text);
  background: rgba(91,77,255,0.10);
}

.app-topbar .sidebar-link.active::after{
  display: none;
}

.app-icon-btn,
.app-topbar .btn-ghost{
  border-color: rgba(17,24,39,0.10);
  background: rgba(255,255,255,0.72);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(35,42,68,0.05);
}

.app-icon-btn:hover,
.app-topbar .btn-ghost:hover{
  color: var(--text);
  background: #fff;
}

.app-icon-btn.active{
  border-color: rgba(91,77,255,0.26);
  background: rgba(91,77,255,0.10);
  color: var(--primary);
}

.app-profile-avatar{
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.app-profile-dropdown{
  border-color: rgba(17,24,39,0.10);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 22px 58px rgba(35,42,68,0.14);
}

.app-profile-email{
  color: var(--muted);
}

.app-profile-dropdown a{
  color: var(--text);
}

.app-profile-dropdown a:hover{
  background: rgba(91,77,255,0.07);
}

.dashboard-page .card,
.dashboard-page .sidebar-card,
.dashboard-page .panel,
.dashboard-page .kpi-card,
.dashboard-page .detail-stat-card,
.dashboard-page .timeline-card,
.dashboard-page .attachment-card,
.dashboard-page .quick-link-card,
.dashboard-page .metric-row,
.dashboard-page .empty-state,
.dashboard-page .detail-header-card,
.dashboard-page .detail-section-card{
  border-color: rgba(17,24,39,0.10);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 16px 42px rgba(35,42,68,0.07);
}

.dashboard-page .panel,
.dashboard-page .card{
  padding: 24px;
  border-radius: 18px;
}

.dashboard-page .panel-head{
  align-items: center;
  margin-bottom: 18px;
}

.dashboard-page .panel-head h2,
.dashboard-page .card h2{
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-page .kpi-grid{
  gap: 14px;
}

.dashboard-page .kpi-card{
  min-height: 112px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
}

.dashboard-page .kpi-label,
.dashboard-page .metric-label,
.dashboard-page .mini,
.dashboard-page .p,
.dashboard-page .footer{
  color: var(--muted);
}

.dashboard-page .kpi-value{
  color: var(--text);
  font-size: 34px;
}

.dashboard-page .quick-link-card{
  background: #fff;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dashboard-page .quick-link-card:hover{
  transform: translateY(-2px);
  border-color: rgba(91,77,255,0.24);
  background: #fff;
  box-shadow: 0 18px 45px rgba(35,42,68,0.10);
}

.dashboard-page .metric-row{
  background: #fff;
}

.dashboard-page .metric-value,
.dashboard-page .metric-label,
.dashboard-page .quick-link-title,
.dashboard-page .table-main,
.dashboard-page .analytics-table td{
  color: var(--text);
}

.dashboard-page .analytics-table th{
  color: var(--muted);
}

.dashboard-page .analytics-table td{
  border-bottom-color: rgba(17,24,39,0.08);
}

.dashboard-page .input{
  border-color: rgba(17,24,39,0.12);
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(35,42,68,0.04);
}

.dashboard-page .input::placeholder{
  color: #98a2b3;
}

.dashboard-page .input:focus{
  border-color: rgba(91,77,255,0.52);
  box-shadow: 0 0 0 4px rgba(91,77,255,0.13);
}

.dashboard-page .label{
  color: #475467;
  font-weight: 700;
}

.dashboard-page .btn{
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #3426d9);
  box-shadow: 0 14px 32px rgba(91,77,255,0.20);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dashboard-page .btn:hover{
  filter: none;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(91,77,255,0.26);
}

.dashboard-page .btn-ghost{
  color: var(--text);
  background: rgba(255,255,255,0.78);
  border-color: rgba(17,24,39,0.10);
  box-shadow: 0 10px 24px rgba(35,42,68,0.06);
}

.dashboard-page .btn-ghost:hover{
  background: #fff;
}

.dashboard-page .btn-danger{
  background: linear-gradient(135deg, #e5484d, #c9184a);
  box-shadow: 0 14px 32px rgba(201,24,74,0.18);
}

.dashboard-page .claims-table-wrap{
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 16px;
  background: #fff;
}

.dashboard-page .claims-table{
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-page .claims-table thead th{
  padding: 14px 16px;
  color: #667085;
  background: #fbfcff;
  border-bottom: 1px solid rgba(17,24,39,0.10);
  font-size: 12px;
}

.dashboard-page .claims-table tbody td{
  padding: 15px 16px;
  color: #475467;
  border-bottom: 1px solid rgba(17,24,39,0.08);
}

.dashboard-page .claims-table tbody tr:last-child td{
  border-bottom: 0;
}

.dashboard-page .claims-table tbody tr:hover{
  background: rgba(91,77,255,0.035);
}

.dashboard-page .table-link{
  color: var(--text);
}

.dashboard-page .empty-state{
  border-style: dashed;
  color: var(--muted);
  background: rgba(255,255,255,0.72);
}

.dashboard-page .badge{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: #344054;
  box-shadow: 0 8px 18px rgba(35,42,68,0.04);
}

.dashboard-page .badge-open{
  color: #175cd3;
  background: #eff8ff;
}

.dashboard-page .badge-open .dot{
  background: #2e90fa;
}

.dashboard-page .badge-review{
  color: #5925dc;
  background: #f4f3ff;
}

.dashboard-page .badge-review .dot{
  background: var(--primary);
}

.dashboard-page .badge-approved{
  color: #067647;
  background: #ecfdf3;
}

.dashboard-page .badge-approved .dot{
  background: var(--success);
}

.dashboard-page .badge-rejected{
  color: #b42318;
  background: #fef3f2;
}

.dashboard-page .badge-rejected .dot{
  background: var(--danger);
}

.dashboard-page .badge-closed{
  color: #176c48;
  background: rgba(42,157,109,0.12);
}

.dashboard-page .badge-closed .dot{
  background: #2a9d6d;
}

.dashboard-page .badge-info{
  color: #475467;
  background: #f2f4f7;
}

.dashboard-page .badge-info .dot{
  background: #98a2b3;
}

.dashboard-page .alert{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--text);
}

.dashboard-page .alert-danger{
  border-color: rgba(217,45,32,0.26);
  background: #fef3f2;
  color: #b42318;
}

.dashboard-page .alert-success{
  border-color: rgba(24,166,118,0.24);
  background: #ecfdf3;
  color: #067647;
}

.dashboard-page .sidebar-info-card,
.dashboard-page .demo-mode-badge{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--text);
}

.dashboard-page .attachment-icon{
  color: var(--primary);
  background: rgba(91,77,255,0.10);
  border-color: rgba(91,77,255,0.18);
}

.dashboard-page .image-preview-modal{
  background: rgba(17,24,39,0.42);
}

.dashboard-page .image-preview-panel,
.dashboard-page .image-preview-head,
.dashboard-page .image-preview-stage{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--text);
}

.dashboard-page .analytics-bar-track{
  background: #edf0f7;
}

.dashboard-page .detail-mail-form{
  border-top-color: rgba(17,24,39,0.10);
}

.dashboard-page .settings-static-value,
.dashboard-page .detail-overview-mini-card,
.dashboard-page .detail-overview-summary-card,
.dashboard-page .detail-overview-wide-card,
.dashboard-page .detail-hero-card,
.dashboard-page .detail-stat-card,
.dashboard-page .detail-item,
.dashboard-page .timeline-card,
.dashboard-page .attachment-card{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  box-shadow: 0 14px 34px rgba(35,42,68,0.06);
}

.dashboard-page .timeline-card-inbound{
  border-left-color: rgba(46,144,250,0.72);
  background: #eff8ff;
}

.dashboard-page .timeline-card-note{
  border-left-color: rgba(247,144,9,0.78);
  background: #fffaeb;
}

.dashboard-page .message-sender{
  color: #344054;
}

.dashboard-page .detail-hero-card{
  background:
    radial-gradient(420px 180px at 12% 8%, rgba(91,77,255,0.10), transparent 60%),
    #fff;
}

.dashboard-page .detail-tab-chip,
.dashboard-page .detail-tab,
.dashboard-page .message-toggle{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(35,42,68,0.04);
}

.dashboard-page .detail-tab-chip:hover,
.dashboard-page .detail-tab:hover,
.dashboard-page .message-toggle:hover{
  color: var(--text);
  border-color: rgba(91,77,255,0.20);
  background: rgba(91,77,255,0.06);
}

.dashboard-page .detail-tab-chip.active,
.dashboard-page .detail-tab.active{
  color: var(--primary);
  border-color: rgba(91,77,255,0.24);
  background: rgba(91,77,255,0.10);
}

.dashboard-page .detail-summary,
.dashboard-page .timeline-body,
.dashboard-page .message-preview{
  color: #475467;
}

.dashboard-page .detail-value,
.dashboard-page .detail-stat-value,
.dashboard-page .detail-hero-value,
.dashboard-page .timeline-title,
.dashboard-page .detail-summary-head h3,
.dashboard-page .detail-overview-box-title{
  color: var(--text);
}

.dashboard-page .detail-ai-summary{
  border-color: rgba(17,184,214,0.20);
  background: rgba(17,184,214,0.07);
}

.dashboard-page .resolution-modal-backdrop,
.dashboard-page .admin-user-dialog::backdrop,
.dashboard-page .image-preview-backdrop{
  background: rgba(17,24,39,0.42);
  backdrop-filter: blur(10px);
}

.dashboard-page .resolution-dialog,
.dashboard-page .admin-user-dialog,
.dashboard-page .image-preview-dialog{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(35,42,68,0.18);
}

.dashboard-page .resolution-icon-btn,
.dashboard-page .admin-user-dialog-close{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--muted);
}

.dashboard-page .resolution-icon-btn:hover,
.dashboard-page .admin-user-dialog-close:hover{
  background: rgba(91,77,255,0.07);
  color: var(--text);
}

.dashboard-page .resolution-status{
  color: var(--muted);
}

.dashboard-page .attachment-card-compact:hover{
  border-color: rgba(91,77,255,0.24);
  background: rgba(91,77,255,0.05);
}

.dashboard-page .image-preview-stage{
  background: #f7f8fb;
}

.dashboard-page.app-dark{
  --bg: #0b101a;
  --border: rgba(226,232,240,0.13);
  --text: #f8fafc;
  --muted: #9aa7ba;
  --primary: #8b7cff;
  --primary-2: #22c4dc;
  --accent: #22c4dc;
  --success: #35d49b;
  --danger: #ff6b75;
  --shadow: 0 18px 52px rgba(0,0,0,0.28);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(13,18,29,0.98), rgba(8,12,20,0.98) 42%, #070a11 100%),
    radial-gradient(760px 480px at 16% 0%, rgba(139,124,255,0.18), transparent 62%),
    radial-gradient(760px 480px at 92% 10%, rgba(34,196,220,0.10), transparent 60%);
  background-attachment: fixed;
}

.dashboard-page.app-dark .app-topbar .sidebar-card,
.dashboard-page.app-dark .app-topbar-inner,
.dashboard-page.app-dark .card,
.dashboard-page.app-dark .sidebar-card,
.dashboard-page.app-dark .panel,
.dashboard-page.app-dark .kpi-card,
.dashboard-page.app-dark .detail-stat-card,
.dashboard-page.app-dark .timeline-card,
.dashboard-page.app-dark .attachment-card,
.dashboard-page.app-dark .quick-link-card,
.dashboard-page.app-dark .metric-row,
.dashboard-page.app-dark .empty-state,
.dashboard-page.app-dark .detail-header-card,
.dashboard-page.app-dark .detail-section-card,
.dashboard-page.app-dark .settings-static-value,
.dashboard-page.app-dark .detail-overview-mini-card,
.dashboard-page.app-dark .detail-overview-summary-card,
.dashboard-page.app-dark .detail-overview-wide-card,
.dashboard-page.app-dark .detail-hero-card,
.dashboard-page.app-dark .detail-item{
  border-color: var(--border);
  background: rgba(18,24,38,0.88);
  box-shadow: var(--shadow);
}

.dashboard-page.app-dark .timeline-card-inbound{
  border-left-color: rgba(46,144,250,0.72);
  background: rgba(46,144,250,0.12);
}

.dashboard-page.app-dark .timeline-card-note{
  border-left-color: rgba(247,144,9,0.74);
  background: rgba(247,144,9,0.12);
}

.dashboard-page.app-dark .message-sender{
  color: #f2f4f7;
}

.dashboard-page.app-dark .claims-table-wrap,
.dashboard-page.app-dark .sidebar-info-card,
.dashboard-page.app-dark .demo-mode-badge,
.dashboard-page.app-dark .image-preview-panel,
.dashboard-page.app-dark .image-preview-head,
.dashboard-page.app-dark .image-preview-stage{
  border-color: var(--border);
  background: rgba(18,24,38,0.92);
}

.dashboard-page.app-dark .app-topbar .sidebar-link,
.dashboard-page.app-dark .app-icon-btn,
.dashboard-page.app-dark .app-topbar .btn-ghost,
.dashboard-page.app-dark .app-profile-email,
.dashboard-page.app-dark .mini,
.dashboard-page.app-dark .p,
.dashboard-page.app-dark .footer,
.dashboard-page.app-dark .kpi-label,
.dashboard-page.app-dark .metric-label,
.dashboard-page.app-dark .claims-table tbody td,
.dashboard-page.app-dark .detail-summary,
.dashboard-page.app-dark .timeline-body,
.dashboard-page.app-dark .message-preview{
  color: var(--muted);
}

.dashboard-page.app-dark .app-topbar .sidebar-link:hover,
.dashboard-page.app-dark .app-topbar .sidebar-link.active,
.dashboard-page.app-dark .app-icon-btn:hover,
.dashboard-page.app-dark .app-topbar .btn-ghost:hover,
.dashboard-page.app-dark .dashboard-title-main,
.dashboard-page.app-dark .panel-head h2,
.dashboard-page.app-dark .card h2,
.dashboard-page.app-dark .kpi-value,
.dashboard-page.app-dark .metric-value,
.dashboard-page.app-dark .quick-link-title,
.dashboard-page.app-dark .table-main,
.dashboard-page.app-dark .table-link,
.dashboard-page.app-dark .detail-value,
.dashboard-page.app-dark .detail-stat-value,
.dashboard-page.app-dark .detail-hero-value,
.dashboard-page.app-dark .timeline-title,
.dashboard-page.app-dark .detail-summary-head h3,
.dashboard-page.app-dark .detail-overview-box-title,
.dashboard-page.app-dark .settings-section-head h2,
.dashboard-page.app-dark .settings-toggle-title,
.dashboard-page.app-dark .app-profile-dropdown a{
  color: var(--text);
}

.dashboard-page.app-dark .app-topbar .sidebar-link:hover,
.dashboard-page.app-dark .app-topbar .sidebar-link.active,
.dashboard-page.app-dark .app-icon-btn.active,
.dashboard-page.app-dark .detail-tab-chip.active,
.dashboard-page.app-dark .detail-tab.active{
  background: rgba(139,124,255,0.16);
}

.dashboard-page.app-dark .app-icon-btn,
.dashboard-page.app-dark .app-topbar .btn-ghost,
.dashboard-page.app-dark .btn-ghost,
.dashboard-page.app-dark .detail-tab-chip,
.dashboard-page.app-dark .detail-tab,
.dashboard-page.app-dark .message-toggle,
.dashboard-page.app-dark .resolution-icon-btn,
.dashboard-page.app-dark .admin-user-dialog-close{
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.dashboard-page.app-dark .btn-ghost:hover,
.dashboard-page.app-dark .detail-tab-chip:hover,
.dashboard-page.app-dark .detail-tab:hover,
.dashboard-page.app-dark .message-toggle:hover,
.dashboard-page.app-dark .resolution-icon-btn:hover,
.dashboard-page.app-dark .admin-user-dialog-close:hover{
  background: rgba(255,255,255,0.10);
}

.dashboard-page.app-dark .app-profile-dropdown,
.dashboard-page.app-dark .resolution-dialog,
.dashboard-page.app-dark .admin-user-dialog,
.dashboard-page.app-dark .image-preview-dialog{
  border-color: var(--border);
  background: rgba(18,24,38,0.98);
  color: var(--text);
  box-shadow: 0 22px 58px rgba(0,0,0,0.36);
}

.dashboard-page.app-dark .input{
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  color-scheme: dark;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.dashboard-page.app-dark select.input,
.dashboard-page.app-dark select.input option{
  background: #202735;
  color: #f8fafc;
}

.dashboard-page.app-dark select.input option:checked{
  background: var(--primary);
  color: #fff;
}

.dashboard-page.app-dark .input::placeholder{
  color: rgba(248,250,252,0.42);
}

.dashboard-page.app-dark .input:focus{
  border-color: rgba(139,124,255,0.62);
  box-shadow: 0 0 0 4px rgba(139,124,255,0.17);
}

.dashboard-page.app-dark .label{
  color: #d7deea;
}

.dashboard-page.app-dark .claims-table thead th{
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border-bottom-color: var(--border);
}

.dashboard-page.app-dark .claims-table tbody td{
  border-bottom-color: rgba(226,232,240,0.09);
}

.dashboard-page.app-dark .claims-table tbody tr:hover{
  background: rgba(139,124,255,0.08);
}

.dashboard-page.app-dark .badge{
  border-color: var(--border);
  background: rgba(255,255,255,0.07);
  color: #d7deea;
  box-shadow: none;
}

.dashboard-page.app-dark .badge-open{
  color: #9bd0ff;
  background: rgba(46,144,250,0.16);
}

.dashboard-page.app-dark .badge-review{
  color: #c7bfff;
  background: rgba(139,124,255,0.16);
}

.dashboard-page.app-dark .badge-approved{
  color: #99f0c8;
  background: rgba(53,212,155,0.14);
}

.dashboard-page.app-dark .badge-rejected{
  color: #ffb0b8;
  background: rgba(255,107,117,0.14);
}

.dashboard-page.app-dark .badge-closed{
  color: #bbf7d0;
  background: rgba(93,211,158,0.12);
}

.dashboard-page.app-dark .badge-info{
  color: #c5cfdd;
  background: rgba(226,232,240,0.10);
}

.dashboard-page.app-dark .alert{
  border-color: var(--border);
  background: rgba(255,255,255,0.07);
  color: var(--text);
}

.dashboard-page.app-dark .alert-danger{
  border-color: rgba(255,107,117,0.32);
  background: rgba(255,107,117,0.12);
  color: #ffd0d4;
}

.dashboard-page.app-dark .alert-success{
  border-color: rgba(53,212,155,0.30);
  background: rgba(53,212,155,0.12);
  color: #bbf7dc;
}

.dashboard-page.app-dark .analytics-bar-track{
  background: rgba(255,255,255,0.08);
}

.dashboard-page.app-dark .detail-ai-summary{
  background: rgba(139,124,255,0.12);
  color: #e8e5ff;
}

.dashboard-page.app-dark .settings-toggle-row,
.dashboard-page.app-dark .settings-branding-preview{
  border-color: var(--border);
  background: rgba(255,255,255,0.05);
}

.dashboard-page.app-dark .settings-logo-preview,
.dashboard-page.app-dark .settings-color-input{
  border-color: var(--border);
  background: rgba(255,255,255,0.07);
}

.dashboard-page.app-dark .settings-toggle-slider{
  background: #475467;
}

.dashboard-page.app-dark .settings-toggle-row input:checked + .settings-toggle-slider{
  background: var(--primary);
}

.dashboard-page.app-dark .settings-account-block,
.dashboard-page.app-dark .settings-account-block:nth-child(2){
  border-left-color: var(--border);
  border-top-color: var(--border);
}

.dashboard-page.app-dark .settings-account-block-password{
  border-top-color: var(--border);
}

.dashboard-page.app-dark .settings-account-actions{
  border-top-color: var(--border);
}

@media (max-width: 900px){
  .app-topbar-inner{
    grid-template-columns: 1fr auto;
  }

  .app-topbar-nav{
    gap: 8px;
  }
}

@media (max-width: 620px){
  .dashboard-wrapper{
    padding: 166px 16px 24px;
  }

  .app-topbar .sidebar-card,
  .app-topbar-inner{
    width: min(100% - 20px, 1450px);
    border-radius: 16px;
  }

  .app-topbar-actions{
    padding-bottom: 2px;
  }

  .app-brand-name{
    font-size: 14px;
  }

  .dashboard-page .panel,
  .dashboard-page .card{
    padding: 18px;
  }
}

/* ===== Auth and submission pages ===== */
.auth-page{
  --auth-bg: #f7f8fb;
  --auth-ink: #101827;
  --auth-muted: #667085;
  --auth-line: rgba(17,24,39,0.10);
  --auth-primary: #5b4dff;
  --auth-cyan: #11b8d6;
  min-height: 100vh;
  color: var(--auth-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,248,251,0.96) 38%, #f7f8fb 100%),
    radial-gradient(760px 480px at 12% 0%, rgba(91,77,255,0.14), transparent 62%),
    radial-gradient(760px 480px at 92% 10%, rgba(17,184,214,0.11), transparent 60%);
  background-attachment: fixed;
}

.auth-page.submission-dark{
  --auth-bg: #0f141f;
  --auth-ink: #f8fafc;
  --auth-muted: #aab4c3;
  --auth-line: rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(15,20,31,0.96), rgba(10,14,22,0.98) 42%, #080b12 100%),
    radial-gradient(760px 480px at 12% 0%, color-mix(in srgb, var(--auth-primary) 28%, transparent), transparent 62%),
    radial-gradient(760px 480px at 92% 10%, rgba(255,255,255,0.08), transparent 60%);
  background-attachment: fixed;
}

.auth-page a{
  color: var(--auth-ink);
}

.auth-page a:focus-visible,
.auth-page button:focus-visible,
.auth-page input:focus-visible,
.auth-page textarea:focus-visible{
  outline: 3px solid rgba(91,77,255,0.26);
  outline-offset: 3px;
}

.auth-page .container{
  min-height: auto;
  padding: 34px 18px;
}

.auth-page.submission-dark .app-copyright{
  color: rgba(215,222,234,0.78);
}

.auth-page .shell{
  max-width: 1060px;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.auth-page.submission-page .shell{
  max-width: 1180px;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
}

.auth-page .brand,
.auth-page .card{
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 24px 80px rgba(35,42,68,0.12);
}

.auth-page.submission-dark .brand,
.auth-page.submission-dark .card{
  background: rgba(18,23,35,0.88);
  box-shadow: 0 24px 80px rgba(0,0,0,0.34);
}

.auth-page .brand{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  padding: 34px;
  overflow: hidden;
}

.auth-page .brand::before{
  background:
    radial-gradient(520px 260px at 12% 10%, rgba(91,77,255,0.16), transparent 62%),
    radial-gradient(460px 260px at 90% 14%, rgba(17,184,214,0.13), transparent 60%);
  filter: none;
  opacity: 1;
}

.auth-page .auth-brand-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--auth-ink);
  font-weight: 800;
  text-decoration: none;
}

.auth-brand-logo{
  display: block;
  width: min(220px, 62vw);
  height: auto;
}

.reclaimed-logo{
  display: block;
}

.auth-page .h1{
  max-width: 460px;
  margin: auto 0 14px;
  color: var(--auth-ink);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-page .p{
  max-width: 480px;
  color: var(--auth-muted);
  font-size: 16px;
}

.auth-page .pills{
  margin-top: 28px;
}

.auth-page .pill{
  border-color: rgba(91,77,255,0.14);
  background: rgba(91,77,255,0.07);
  color: #3426d9;
  font-weight: 800;
}

.auth-page .card{
  padding: 30px;
}

.auth-page .card h2{
  margin: 0 0 22px;
  color: var(--auth-ink);
  font-size: 26px;
  line-height: 1.2;
}

.auth-page .form{
  display: grid;
  gap: 16px;
}

.auth-page .label{
  display: grid;
  gap: 8px;
  color: #475467;
  font-weight: 800;
}

.auth-page.submission-dark .label{
  color: #d7deea;
}

.auth-page .input{
  border-color: rgba(17,24,39,0.12);
  background: #fff;
  color: var(--auth-ink);
  box-shadow: 0 8px 20px rgba(35,42,68,0.04);
}

.auth-page.submission-dark .input{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.auth-page.submission-dark .input::placeholder{
  color: rgba(248,250,252,0.46);
}

.auth-page textarea.input{
  min-height: 132px;
  resize: vertical;
}

.auth-page .input::file-selector-button{
  margin-right: 12px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--auth-primary);
  font-weight: 800;
  cursor: pointer;
}

.auth-page .input:focus{
  border-color: rgba(91,77,255,0.52);
  box-shadow: 0 0 0 4px rgba(91,77,255,0.13);
}

.auth-page .mini{
  color: var(--auth-muted);
}

.legal-note{
  padding: 12px;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.legal-note a{
  display: inline-block;
  margin-left: 8px;
  color: var(--auth-primary);
  font-weight: 800;
  text-decoration: none;
}

.legal-note a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-page.submission-dark .legal-note{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #d7deea;
}

.submission-powered-footer{
  gap: 12px 20px;
}

.submission-powered{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(71,84,103,0.72);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.submission-powered-logo{
  display: block;
  width: 112px;
  height: auto;
  opacity: 0.86;
}

.submission-powered-logo-dark{
  display: none;
}

.submission-powered:hover{
  text-decoration: none;
}

.submission-powered:hover .submission-powered-logo{
  opacity: 1;
}

.auth-page.submission-dark .submission-powered{
  color: rgba(248,250,252,0.72);
}

.auth-page.submission-dark .submission-powered-logo-light{
  display: none;
}

.auth-page.submission-dark .submission-powered-logo-dark{
  display: block;
}

.submission-blocker{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(16,24,39,0.58);
  backdrop-filter: blur(8px);
}

.submission-blocker.open{
  display: grid;
}

.submission-blocker-dialog{
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 16px;
  background: #fff;
  color: #101827;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0,0,0,0.24);
}

.submission-blocker-spinner{
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border: 4px solid rgba(91,77,255,0.18);
  border-top-color: var(--auth-primary);
  border-radius: 50%;
  animation: submission-spin 0.8s linear infinite;
}

.submission-blocker-title{
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
}

.submission-blocker-text{
  margin-top: 10px;
  color: #667085;
  line-height: 1.5;
}

.auth-page.submission-dark .submission-blocker-dialog{
  background: #121723;
  color: #f8fafc;
}

.auth-page.submission-dark .submission-blocker-text{
  color: #aab4c3;
}

@keyframes submission-spin{
  to{
    transform: rotate(360deg);
  }
}

.auth-page .row{
  gap: 10px;
}

.auth-page .btn{
  border: 1px solid transparent;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 14px 32px rgba(17,24,39,0.12);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.auth-page .btn:hover{
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(17,24,39,0.16);
  text-decoration: none;
}

.auth-page .btn-ghost{
  color: var(--auth-ink);
  background: rgba(255,255,255,0.78);
  border-color: rgba(17,24,39,0.10);
  box-shadow: 0 10px 24px rgba(35,42,68,0.06);
}

.auth-page.submission-dark .btn-ghost{
  color: #f8fafc;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.auth-page .btn-ghost:hover{
  background: #fff;
}

.auth-page.submission-dark .btn-ghost:hover{
  background: rgba(255,255,255,0.12);
}

.auth-page .alert{
  border-color: rgba(17,24,39,0.10);
  background: #fff;
  color: var(--auth-ink);
}

.auth-page .alert-danger{
  border-color: rgba(217,45,32,0.26);
  background: #fef3f2;
  color: #b42318;
}

.auth-page .alert-success{
  border-color: rgba(24,166,118,0.24);
  background: #ecfdf3;
  color: #067647;
}

.auth-page .success-actions{
  margin-top: 18px;
}

@media (max-width: 920px){
  .auth-page .shell,
  .auth-page.submission-page .shell{
    grid-template-columns: 1fr;
  }

  .auth-page .brand{
    min-height: auto;
    gap: 34px;
  }

  .auth-page .h1{
    margin-top: 42px;
  }
}

@media (max-width: 520px){
  .auth-page .container{
    padding: 18px 12px;
  }

  .auth-page .brand,
  .auth-page .card{
    border-radius: 18px;
    padding: 22px;
  }

  .auth-page .row{
    align-items: stretch;
    flex-direction: column;
  }

  .auth-page .row .btn{
    width: 100%;
    text-align: center;
  }
}
.submission-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.auth-page .submission-form-header h2 {
  margin: 0;
}

.submission-language {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: #667085;
}

.submission-language-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.submission-language-flag {
  position: absolute;
  left: 8px;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: center / cover no-repeat url('assets/flag-nl.svg');
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}

.submission-language[data-language="en"] .submission-language-flag {
  background-image: url('assets/flag-en.svg');
}

.submission-language[data-language="de"] .submission-language-flag {
  background-image: url('assets/flag-de.svg');
}

.submission-language select {
  width: auto;
  min-height: 34px;
  padding: 6px 4px 6px 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.submission-language select:hover {
  background: rgba(127,127,127,0.08);
}

.submission-language select:focus-visible {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
}

.auth-page.submission-dark .submission-language {
  color: #d7deea;
  color-scheme: dark;
}
