:root{--bg:#090a0c;--glass:rgba(255,255,255,.05);--bd:rgba(255,255,255,.13);--o:#ff673f;--g:#ffad55;--c:#00c9df;--green:#00e99a;--txt:#f5f5f7;--muted:#969ba5;--r:16px}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--txt);font:14px Inter,sans-serif;overflow-x:hidden}
body:before,body:after{content:"";position:fixed;width:420px;height:420px;border-radius:50%;filter:blur(130px);opacity:.15;pointer-events:none;z-index:-1}
body:before{background:var(--o);top:-230px;left:-180px}
body:after{background:var(--c);right:-200px;bottom:-220px}
.app{display:flex;min-height:100vh}
.sidebar{width:250px;flex-shrink:0;padding:28px 18px;background:#0f1013d9;border-right:1px solid var(--bd);position:sticky;top:0;height:100vh}
.logo{font-size:25px;font-weight:800;letter-spacing:3px;background:linear-gradient(90deg,#fff,var(--g));background-clip:text;color:transparent}
.subtitle{font-size:10px;letter-spacing:2px;color:var(--muted);margin-bottom:30px}
.nav{display:block;width:100%;padding:12px;margin:6px 0;text-align:left;background:transparent;color:#aeb3bd;border:1px solid transparent;border-radius:11px;cursor:pointer;font:13px Inter}
.nav:hover,.nav.active{background:#ff673f20;border-color:#ff86564d;color:white}
.main{flex:1;min-width:0;padding:30px 35px}
.header{display:flex;align-items:center;justify-content:space-between;padding-bottom:20px;margin-bottom:25px;border-bottom:1px solid var(--bd)}
h1{font-size:26px;font-weight:400;letter-spacing:2px;text-transform:uppercase;margin:0}
h2{font-size:17px}
h3{font-size:11px;letter-spacing:1px;color:#b5bac3}
.small,.card p{color:var(--muted);font-size:12px;line-height:1.6}
.status{color:var(--green);font-size:11px}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.card{padding:22px;margin-bottom:18px;background:linear-gradient(135deg,#ffffff12,#ffffff05);border:1px solid var(--bd);border-radius:var(--r);box-shadow:0 12px 35px #0004;min-width:0}
.metric{font-size:30px;font-weight:600;margin:15px 0;background:linear-gradient(90deg,#fff,var(--g));background-clip:text;color:transparent}
button{font-family:inherit;cursor:pointer;min-height:44px}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--c);outline-offset:2px}\n
.primary{padding:12px 20px;color:white;background:linear-gradient(110deg,#ff603b,#ff9b50);border:1px solid #ffffff44;border-radius:10px;font-size:12px;font-weight:600}
.primary:disabled{opacity:.5;cursor:not-allowed}
input,select{width:100%;padding:12px;margin:6px 0 13px;background:#0006;color:white;border:1px solid var(--bd);border-radius:10px;font:13px Inter}
input:focus,select:focus{outline:1px solid var(--c)}
select option{background:#151515}
.chat{height:390px;overflow-y:auto;padding:15px;background:#0004;border:1px solid var(--bd);border-radius:13px}
.message{max-width:85%;padding:13px 16px;margin:10px 0;border-radius:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.bot{background:#ffffff10;border:1px solid #ffffff15}
.user{margin-left:auto;background:#ff673f25;border:1px solid #ffad5540}
.chatform{display:flex;gap:10px;margin-top:12px}
.chatform input{min-width:0}
table{width:100%;border-collapse:collapse;font-size:12px}
th,td{text-align:left;padding:12px;border-bottom:1px solid #ffffff12}
th{color:var(--muted)}
.empty-state{color:var(--muted);padding:18px 0}
.language-option{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--bd);border-radius:11px;margin:9px 0}
.language-option input{width:auto;margin:0;accent-color:var(--o)}
.language-option label{flex:1;cursor:pointer}
.language-option span{display:block;color:var(--muted);font-size:11px}
.form-status{min-height:20px;margin:4px 0 14px;color:var(--muted);font-size:12px;line-height:1.5}
.form-status.error{color:#ff8b78}
.form-status.success{color:var(--green)}
footer{padding:20px 0;color:var(--muted);font-size:10px}
@media(max-width:1050px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.main{padding:24px}}
@media(max-width:650px){body{font-size:16px}input,select,button{font-size:16px}.app{display:block}.sidebar{width:100%;height:auto;position:relative;padding:16px;border:0;border-bottom:1px solid var(--bd)}.subtitle{margin-bottom:12px}.sidebar .nav{display:inline-block;width:auto;padding:9px;margin:3px}.main{padding:18px 13px}.header{align-items:flex-start;flex-direction:column;gap:10px}h1{font-size:22px}.grid{gap:9px}.card{padding:15px}.metric{font-size:24px}.chat{height:350px}.message{max-width:95%}table{display:block;overflow-x:auto;white-space:nowrap}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

[hidden] { display: none !important; }
.group-session-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.align-self-end { align-self: end; }
.agenda-config-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }


/* Commerce workspace */
.commerce-content .commerce-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: end;
}
.commerce-content .commerce-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text, inherit);
  font-size: 13px;
}
.commerce-content .commerce-form input,
.commerce-content .commerce-form select,
.commerce-content .commerce-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.commerce-content .commerce-form .wide { grid-column: 1 / -1; }
.commerce-content .commerce-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.commerce-content .table-wrap { width: 100%; overflow-x: auto; }
.commerce-content table { width: 100%; border-collapse: collapse; }
.commerce-content th,
.commerce-content td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(127,127,127,.2);
  white-space: nowrap;
}
.commerce-content .form-status { min-height: 1.4em; }
@media (max-width: 640px) {
  .commerce-content .commerce-form { grid-template-columns: 1fr; }
  .commerce-content .commerce-form .wide { grid-column: auto; }
  .commerce-content .commerce-form button { min-height: 44px; }
}


/* Payment settings: external stylesheet required by strict CSP */
#enyaPaymentSettings {
          margin-top: 24px;
          display: grid;
          gap: 18px;
        }

        #enyaPaymentSettings .payment-card {
          background: var(--card, #171717);
          border: 1px solid var(--border, #333);
          border-radius: 14px;
          padding: 22px;
        }

        #enyaPaymentSettings h3 {
          margin: 0 0 8px;
          font-size: 19px;
        }

        #enyaPaymentSettings .payment-description {
          opacity: .75;
          margin: 0 0 18px;
          line-height: 1.5;
        }

        #enyaPaymentSettings .payment-field {
          display: grid;
          gap: 7px;
          margin-bottom: 15px;
        }

        #enyaPaymentSettings label {
          font-size: 13px;
          font-weight: 600;
        }

        #enyaPaymentSettings input,
        #enyaPaymentSettings select {
          width: 100%;
          box-sizing: border-box;
          padding: 11px 12px;
          border-radius: 8px;
          border: 1px solid var(--border, #444);
          background: var(--bg, #090909);
          color: inherit;
          font: inherit;
        }

        #enyaPaymentSettings .payment-actions {
          display: flex;
          flex-wrap: wrap;
          gap: 10px;
          margin-top: 16px;
        }

        #enyaPaymentSettings button {
          border: 0;
          border-radius: 8px;
          padding: 11px 16px;
          cursor: pointer;
          font-weight: 700;
          background: var(--accent, #f97316);
          color: #111;
        }

        #enyaPaymentSettings button.secondary {
          background: #333;
          color: white;
        }

        #enyaPaymentSettings button:disabled {
          opacity: .5;
          cursor: not-allowed;
        }

        #enyaPaymentSettings .payment-status {
          display: inline-block;
          padding: 5px 10px;
          border-radius: 20px;
          background: #333;
          font-size: 12px;
          margin: 5px 0 15px;
        }

        #enyaPaymentSettings #paymentNotice {
          padding: 12px;
          border-radius: 8px;
          background: #252525;
          margin: 0;
          line-height: 1.5;
        }

        #enyaPaymentSettings #paymentNotice[data-type="error"] {
          background: #492020;
          color: #ffd5d5;
        }

        #enyaPaymentSettings #paymentNotice[data-type="success"] {
          background: #183d2a;
          color: #d0ffe0;
        }

        #enyaPaymentSettings .payment-check {
          display: flex;
          align-items: center;
          gap: 10px;
          margin-top: 12px;
        }

        #enyaPaymentSettings .payment-check input {
          width: auto;
        }

        #enyaPaymentSettings .payment-help {
          opacity: .65;
          font-size: 12px;
          line-height: 1.5;
        }


/* Tenant business profile settings */
.business-profile-card { margin-top: 18px; }
.business-profile-card > p { line-height: 1.5; }
.business-profile-card .commerce-form { margin-top: 16px; }
.business-profile-card .commerce-form button { justify-self: start; }


/* Security and quality center */
.security-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.security-status-card {
  border: 1px solid rgba(127,127,127,.25);
  border-radius: 12px;
  padding: 16px;
}
.security-status-card h3 { margin-top: 0; }
.security-status-card p { font-weight: 700; }
.health-good { color: #15803d; }
.health-bad { color: #b91c1c; }
.security-link { display: inline-block; margin: 8px 0; font-weight: 700; }
.muted { opacity: .72; font-size: .9em; }

/* ENYA 15 multi-company workspace identity */
.tenant-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 11px 10px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  min-width: 0;
}
.tenant-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: rgba(255,134,86,.14);
  color: #ff9b70;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
}
#tenantBrandName {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.workspace-switch-label {
  color: var(--muted, #a1a1aa);
  font-size: 12px;
}
#workspaceSwitcher {
  max-width: min(280px, 55vw);
  min-width: 150px;
  padding: 9px 30px 9px 11px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  background: #17191d;
  color: #fff;
  font: inherit;
}
#workspaceSwitcher[hidden] { display: none !important; }
@media(max-width:650px) {
  .header-actions { width: 100%; justify-content: space-between; }
  #workspaceSwitcher { flex: 1; max-width: none; }
}

.tenant-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tenant-brand-copy small {
  color: var(--muted, #a1a1aa);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}
