:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #17231d;
  background: #f3f6f3;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.shell {
  min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.1fr;
  max-width: 1440px; margin: 0 auto; background: #fff;
}
.brand-panel {
  padding: clamp(36px, 7vw, 100px); display: flex; flex-direction: column;
  justify-content: center; color: #f5fff8;
  background: radial-gradient(circle at 15% 15%, #315d47 0, transparent 38%),
              linear-gradient(145deg, #10251d, #173c2b 65%, #0d2119);
}
.brand-lockup {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 12px 16px; margin-bottom: 48px; border-radius: 10px;
  background: #f2f5ed; box-shadow: 0 8px 24px #06170f26;
  font-weight: 900; line-height: 1; white-space: nowrap;
}
.brand-lockup-cyb { color: #e31b23; font-size: 27px; letter-spacing: -1.5px; }
.brand-lockup-product { color: #111; font-size: 18px; letter-spacing: .5px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 800; color: #79bd88; }
.brand-panel h1 { font-size: clamp(38px, 5vw, 62px); letter-spacing: -2px; margin: 12px 0; }
.brand-copy { max-width: 430px; color: #c0d5c7; line-height: 1.8; font-size: 16px; }
.trust-note { display: flex; align-items: center; gap: 10px; margin-top: 54px; color: #c0d5c7; font-size: 13px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #b8f36b; box-shadow: 0 0 0 5px #b8f36b22; }
.form-panel { min-width: 0; display: flex; flex-direction: column; padding: 26px clamp(24px, 6vw, 76px); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.product-label { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #63736a; }
.language-switch select { border: 1px solid #dce5de; border-radius: 8px; padding: 8px 10px; background: white; color: #34463b; }
.auth-card { width: 100%; max-width: 430px; margin: auto; padding: 42px 0; }
.lock-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: #eff8e8; color: #36753f; font-size: 28px; margin-bottom: 28px; }
.auth-card h2 { margin: 8px 0; font-size: 32px; letter-spacing: -1px; }
.muted { color: #718078; line-height: 1.6; margin: 0 0 28px; }
.field { display: grid; gap: 8px; margin: 18px 0; }
.field label { font-size: 13px; font-weight: 700; color: #35463b; }
.field input {
  width: 100%; min-height: 48px; border: 1px solid #d8e1da; border-radius: 9px;
  padding: 0 13px; outline: none; font: inherit; background: #fff;
}
.field input:focus { border-color: #4b9b58; box-shadow: 0 0 0 3px #4b9b581c; }
.field small { color: #77847c; line-height: 1.5; }
.primary-button {
  width: 100%; min-height: 49px; border: 0; border-radius: 9px; margin-top: 10px;
  background: #276b3a; color: white; font-weight: 800; font-size: 14px; cursor: pointer;
}
.primary-button:hover { background: #1d572e; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.alert { border-radius: 9px; padding: 12px 14px; margin: 16px 0; font-size: 13px; line-height: 1.5; }
.alert.error { background: #fff0ef; color: #a12f28; border: 1px solid #ffd8d5; }
.alert.success { background: #eff9ee; color: #276b3a; border: 1px solid #d5ebd2; }
.footer-note { margin-top: 24px; text-align: center; color: #89958d; font-size: 11px; line-height: 1.6; }
.page-footer { text-align: center; color: #9aa59e; font-size: 11px; padding: 18px 0 8px; }
.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; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 210px; padding: 28px 26px; }
 .brand-mark { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px; font-size: 18px; }
  .brand-panel h1 { font-size: 34px; }
  .brand-copy { font-size: 13px; margin: 5px 0; }
  .trust-note { margin-top: 18px; }
  .form-panel { min-height: 65vh; padding: 20px 24px; }
  .auth-card { padding: 35px 0; }
}

/* Development dashboard and employee management */
.alert.info { background: #eef6ff; color: #24527a; border: 1px solid #d5e7fb; }
.dashboard-page { background: #f3f6f3; color: #17231d; }
.dashboard-header {
  min-height: 70px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 10px clamp(18px, 4vw, 56px); background: #fff;
  border-bottom: 1px solid #e5ebe6;
}
.dashboard-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: #111111;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 1.1px;
  text-decoration: none;
  white-space: nowrap;
}
.dashboard-brand-cyb {
  color: #e31b23;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -1.1px;
}
.dashboard-brand-product {
  color: #111111;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 1.1px;
}
.dashboard-user { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; }
.role-chip, .status-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800; background: #edf5ed; color: #276b3a; }
.dashboard-layout { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 12px; padding: 28px 18px; background: #fff; border-right: 1px solid #e5ebe6; }
.sidebar-caption { padding: 0 12px; color: #94a198; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; }
.nav-item { padding: 12px; border-radius: 9px; color: #2b6840; background: #eef7ee; font-size: 13px; font-weight: 800; text-decoration: none; }
.sidebar-note { margin-top: auto; padding: 12px; border-radius: 9px; background: #f5f8f5; color: #849188; font-size: 11px; line-height: 1.7; }
.content-area { min-width: 0; padding: clamp(22px, 4vw, 48px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 7px 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -1px; }
.page-heading .muted { margin: 0; }
.primary-button.compact { width: auto; min-height: 42px; margin: 0; padding: 0 18px; white-space: nowrap; }
.secondary-button { min-height: 38px; padding: 0 14px; border: 1px solid #d9e3db; border-radius: 8px; background: #fff; color: #365443; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.secondary-button:hover { background: #f4f8f4; }
.panel { margin: 18px 0; padding: 22px; border: 1px solid #e3eae4; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px #173c2b0a; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 17px; }
.panel-heading .muted { margin: 0; font-size: 12px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #f2f6f2; color: #53645a; font-size: 22px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.employee-form .field { margin: 8px 0 14px; }
.employee-form .field input { min-height: 43px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 12px 10px; color: #78867d; background: #f7f9f7; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 10px; border-bottom: 1px solid #edf1ed; color: #35463b; white-space: nowrap; }
.user-identity { display: grid; gap: 4px; }
.user-identity strong { color: #20372a; font-size: 12px; }
.user-identity small { color: #87938b; font-size: 10px; }
.role-cell { font-weight: 800; }
.status-chip.active { color: #287344; background: #edf8ef; }
.status-chip.inactive { color: #a33d36; background: #fff0ef; }
.table-action { padding: 6px 10px; border: 1px solid #dbe5dc; border-radius: 7px; background: #fff; color: #46614f; font-size: 11px; font-weight: 800; cursor: pointer; }
.empty-cell { padding: 28px; text-align: center; color: #8b978f; }
.dev-warning { margin-top: 22px; color: #8b6a2b; font-size: 11px; line-height: 1.7; }
@media (max-width: 760px) {
  .dashboard-header { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { padding: 12px 18px; border-right: 0; border-bottom: 1px solid #e5ebe6; }
  .sidebar-note { display: none; }
  .content-area { padding: 20px 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}


/* CYB SSL operations dashboard */
.sidebar .nav-item {
  width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit;
  font-size: 13px; background: transparent; color: #637369;
}
.sidebar .nav-item.active, .sidebar .nav-item:hover {
  background: #eef7ee; color: #276b3a;
}
.ssl-stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin: 18px 0 24px;
}
.ssl-stat {
  display: grid; gap: 9px; padding: 20px; border: 1px solid #e3eae4;
  border-radius: 13px; background: #fff; box-shadow: 0 8px 28px #173c2b08;
}
.ssl-stat span { color: #738078; font-size: 12px; font-weight: 700; }
.ssl-stat strong { color: #20372a; font-size: 32px; line-height: 1; }
.ssl-stat small { color: #89958d; font-size: 11px; }
.ssl-stat.warning strong { color: #a66a13; }
.ssl-stat.danger strong { color: #a33d36; }
.warning-chip { color: #946313; background: #fff6df; }
.domain-form { max-width: 680px; }
.domain-form .field { margin: 8px 0 14px; }
.domain-form input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #d9e3db; border-radius: 8px; }
.danger-action { margin-left: 6px; color: #a33d36; border-color: #f0d7d4; }
.table-action:disabled { opacity: .55; cursor: wait; }
@media (max-width: 1000px) {
  .ssl-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ssl-stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .ssl-stat { padding: 14px; }
  .ssl-stat strong { font-size: 26px; }
}


/* SQL-backed project/domain inventory */
.domain-form select, .inline-project-select {
  min-height: 40px; border: 1px solid #d9e3db; border-radius: 8px;
  background: #fff; color: #20372a; padding: 0 10px; font: inherit;
}
.domain-form select { width: 100%; }
.inline-project-select { max-width: 170px; min-height: 31px; font-size: 11px; }
#projectsPage .panel, #domainsPage .panel { overflow: visible; }


/* ACME issuance workflow */
.acme-panel { border: 1px solid #cfe3d3; scroll-margin-top: 18px; }
.acme-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.acme-checkbox { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-size: 13px; }
.acme-checkbox input { width: 16px; height: 16px; accent-color: #236b3b; }
.acme-panel h3 { margin: 18px 0 8px; font-size: 15px; }
.acme-message { margin: 14px 0; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.acme-message.info { color: #1e40af; background: #eff6ff; }
.acme-message.success { color: #166534; background: #ecfdf3; }
.acme-message.warning { color: #92400e; background: #fffbeb; }
.acme-message.error { color: #991b1b; background: #fef2f2; }
.acme-panel td { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .acme-controls { align-items: stretch; }
  .acme-controls button { width: 100%; }
}


/* Search and date filters for inventory tables */
.inventory-filters {
  display: flex; align-items: end; flex-wrap: wrap; gap: 10px;
  margin: 12px 0 16px; padding: 12px; border: 1px solid #e3eae4;
  border-radius: 10px; background: #fbfdfb;
}
.inventory-filters > input[type="search"] {
  flex: 1 1 240px; min-width: 180px; min-height: 38px;
  padding: 0 11px; border: 1px solid #d9e3db; border-radius: 8px;
  font: inherit; color: #20372a; background: #fff;
}
.inventory-filters select, .inventory-filters input[type="date"] {
  min-height: 38px; padding: 0 9px; border: 1px solid #d9e3db;
  border-radius: 8px; background: #fff; color: #20372a; font: inherit;
}
.inventory-filters label {
  display: flex; align-items: center; gap: 6px; color: #637369;
  font-size: 12px; white-space: nowrap;
}
@media (max-width: 760px) {
  .inventory-filters { align-items: stretch; }
  .inventory-filters > * { flex: 1 1 100%; }
  .inventory-filters label { justify-content: space-between; }
}

.acme-recovery-controls {
  display: flex; align-items: end; flex-wrap: wrap; gap: 10px;
  margin: 12px 0; padding: 12px; border: 1px dashed #cfe3d3; border-radius: 9px;
}
.acme-recovery-controls label { flex: 0 0 100%; color: #637369; font-size: 12px; }
.acme-recovery-controls input {
  flex: 1 1 260px; min-height: 38px; padding: 0 10px;
  border: 1px solid #d9e3db; border-radius: 8px; font: inherit;
}


/* Dedicated SMTP configuration page */
.mail-settings-panel { max-width: 980px; }
.mail-settings-form { max-width: none; }
.mail-settings-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mail-settings-form .field input:not([type="checkbox"]) {
  width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #d9e3db;
  border-radius: 8px; background: #fff; color: #20372a; font: inherit;
}
.mail-settings-form .mail-tls-field { display: flex; align-items: end; }
.mail-settings-form .mail-tls-field label { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.mail-settings-form .mail-tls-field input { width: 16px; height: 16px; accent-color: #236b3b; }
@media (max-width: 760px) { .mail-settings-form .form-grid { grid-template-columns: 1fr; } }

.permission-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; padding:10px 0; }
.permission-grid label { display:flex; align-items:center; gap:8px; font-size:13px; }
