@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root { color-scheme: light; --navy: #102c58; --blue: #2563b8; --blue-light: #eaf3ff; --ink: #18263b; --muted: #65758b; --line: #e3eaf2; --surface: #fff; --bg: #f5f8fc; --green: #18794e; --red: #b42318; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "DM Sans", sans-serif; }
button, input, select { font: inherit; }
.topbar { min-height: 76px; padding: 0 clamp(20px, 6vw, 86px); background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 13px; align-items: center; color: #fff; font: 700 18px "Manrope", sans-serif; text-decoration: none; letter-spacing: -.3px; }
.brand small { margin-left: 8px; color: #9dc9ff; font: 700 10px "DM Sans", sans-serif; letter-spacing: 1.5px; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px; }
.account-area { display: flex; gap: 16px; align-items: center; color: #dceaff; font-size: 14px; }
main { width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 140px); margin: 0 auto; padding: 48px 0 64px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: "Manrope", sans-serif; letter-spacing: -.7px; }
h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.18; margin-bottom: 12px; }
h2 { font-size: 22px; line-height: 1.3; margin-bottom: 0; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; margin: 0 0 7px; }
.hero { min-height: 540px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero-copy { max-width: 590px; }
.hero-copy h1 { max-width: 530px; color: var(--navy); font-size: clamp(38px, 5vw, 58px); }
.hero-copy > p:not(.eyebrow):not(.fine-print) { max-width: 540px; margin: 18px 0 28px; color: var(--muted); font-size: 19px; }
.hero-card { min-height: 280px; padding: 42px; border-radius: 22px; background: linear-gradient(145deg, #dcecff, #fff 65%); box-shadow: 0 24px 60px rgba(28,72,124,.1); display: flex; flex-direction: column; justify-content: end; position: relative; overflow: hidden; }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border: 1px solid rgba(37,99,184,.19); border-radius: 50%; width: 245px; height: 245px; right: -50px; top: -65px; }
.hero-card::after { width: 160px; height: 160px; top: -22px; right: -8px; }
.hero-icon { position: absolute; top: 56px; left: 48px; width: 90px; height: 90px; border-radius: 22px; box-shadow: 0 12px 28px rgba(16,44,88,.22); }
.hero-card strong { color: var(--navy); font: 700 20px "Manrope", sans-serif; }
.hero-card span { margin-top: 5px; color: var(--muted); }
.button { border: 0; border-radius: 9px; padding: 12px 18px; cursor: pointer; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { background: var(--blue); color: white; box-shadow: 0 5px 13px rgba(37,99,184,.18); }
.button.primary:hover:not(:disabled) { background: #1a529e; }
.google-sign-in { display: block; width: 180px; height: 40px; padding: 0; border: 0; border-radius: 20px; background: transparent; cursor: pointer; line-height: 0; }
.google-sign-in img { display: block; width: 180px; height: 40px; }
.google-sign-in:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.button.quiet { color: white; padding: 7px 10px; border: 1px solid rgba(255,255,255,.3); background: transparent; font-size: 13px; }
.button.small { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
.fine-print, .hint, .role-note, .muted { color: var(--muted); }
.fine-print { margin: 13px 0 0; font-size: 13px; }
.setup-notice { max-width: 760px; margin: 60px auto; }
.notice, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(29,56,92,.045); }
.setup-notice { padding: 30px; }
.setup-notice h1 { font-size: 29px; color: var(--navy); }
.setup-notice code { background: #edf3fa; border-radius: 4px; padding: 2px 5px; }
.loading { display: flex; min-height: 360px; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid #cfe0f5; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { color: var(--navy); }
.org-picker-label { display: flex; flex-direction: column; gap: 6px; min-width: min(340px, 100%); font-size: 12px; font-weight: 700; color: var(--muted); }
select, input { min-height: 45px; border: 1px solid #ccd7e5; background: white; border-radius: 8px; padding: 9px 12px; color: var(--ink); outline: none; }
select:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,184,.12); }
.dashboard-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.panel { padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-heading h2 { color: var(--navy); }
.invite-panel form { display: flex; flex-direction: column; gap: 9px; }
.invite-panel label { margin-top: 6px; font-size: 13px; font-weight: 700; }
.invite-panel .button { margin-top: 8px; }
.hint { margin: 5px 0 0; font-size: 12px; line-height: 1.55; }
.bulk-users-panel { margin-bottom: 20px; }
.bulk-users-panel .panel-heading { margin-bottom: 12px; }
.bulk-users-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.bulk-users-toolbar > div:first-child { min-width: 0; flex: 1; }
.bulk-users-toolbar label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.bulk-users-toolbar input[type="file"] { display: block; width: min(100%, 520px); padding: 7px 10px; }
.bulk-users-toolbar .hint { max-width: 720px; }
.bulk-users-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.csv-preview { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #f3f7fc; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.people-heading { margin-bottom: 10px; }
.people-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.people-toolbar label { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.people-toolbar select { width: 100%; min-width: 0; font-size: 13px; }
.count-pill { min-width: 30px; padding: 2px 9px; text-align: center; border-radius: 20px; color: var(--blue); background: var(--blue-light); font-size: 13px; font-weight: 700; }
.people-list, .pending-list { display: flex; flex-direction: column; }
.person-row, .pending-row { min-height: 66px; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.person-identity { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.person-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.person-identity span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.role-badge { flex: 0 0 auto; border-radius: 30px; padding: 4px 9px; color: #465870; background: #edf1f6; font-size: 11px; font-weight: 700; }
.role-badge.owner { background: #e8e8ff; color: #5148a6; }
.role-badge.admin { background: #eaf3ff; color: #215e9f; }
.role-badge.technician { background: #e7f7f0; color: #17704b; }
.role-badge.endUser { background: #fff4df; color: #845c0d; }
.icon-button { border: 0; background: transparent; color: #586b84; cursor: pointer; font-size: 12px; font-weight: 700; padding: 8px; }
.icon-button:hover { color: var(--red); }
.dashboard-tabs { display: flex; gap: 8px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.dashboard-tab { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 10px 14px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.dashboard-tab:hover { background: #edf3fa; color: var(--navy); }
.dashboard-tab[aria-selected="true"] { background: var(--blue-light); color: var(--blue); }
.history-panel .panel-heading { margin-bottom: 8px; }
.history-panel > .hint { margin-bottom: 18px; }
.history-list { min-width: 0; }
.history-table { overflow-x: auto; border-top: 1px solid var(--line); }
.history-row { min-width: 760px; display: grid; grid-template-columns: 1.35fr 1fr 1.2fr .7fr .8fr; gap: 14px; align-items: center; min-height: 60px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.history-cell { min-width: 0; overflow-wrap: anywhere; }
.history-header { min-height: 42px; color: var(--muted); font-size: 12px; font-weight: 700; }
.history-identity { font-size: 13px; font-weight: 600; }
.history-identity small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.history-status { display: inline-block; border-radius: 30px; padding: 4px 9px; color: #465870; background: #edf1f6; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.history-status.active { color: #17704b; background: #e7f7f0; }
.history-status.ended { color: #215e9f; background: #eaf3ff; }
.history-status.expired { color: #845c0d; background: #fff4df; }
.history-error { color: var(--red); overflow-wrap: anywhere; }
.history-empty { margin: 16px 0 4px; }
.license-status { border-radius: 30px; padding: 5px 11px; color: var(--blue); background: var(--blue-light); font-size: 12px; font-weight: 700; text-transform: capitalize; }
.licensing-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.license-card { min-width: 0; display: flex; flex-direction: column; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfe; }
.license-card-title { color: var(--muted); font-size: 13px; font-weight: 700; }
.license-card-value { color: var(--navy); font: 800 28px/1.2 "Manrope", sans-serif; letter-spacing: -.5px; }
.license-card-detail { color: var(--muted); font-size: 12px; }
.billing-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.billing-summary div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.billing-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.billing-summary strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.license-readonly-note { margin: 18px 0 0; }
.pending-panel { margin-top: 20px; }
.pending-panel .panel-heading { margin-bottom: 8px; }
.role-note { margin: 18px 0; font-size: 12px; }
.message { position: sticky; top: 12px; z-index: 2; padding: 13px 16px; border-radius: 9px; margin-bottom: 18px; font-size: 14px; }
.message.success { color: #14633f; background: #e9f7f0; border: 1px solid #c6e9d6; }
.message.error { color: #8f1d14; background: #fff0ee; border: 1px solid #f1ccc7; }
.load-error { max-width: 720px; margin: 42px auto; padding: 34px; text-align: center; border-color: #f0d2ce; }
.load-error h1 { color: #8f1d14; font-size: 27px; }
.load-error p { max-width: 590px; margin: 10px auto 22px; color: var(--muted); overflow-wrap: anywhere; }
.error-mark { width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #9a2d23; background: #fff0ee; font-weight: 800; font-size: 22px; }
.error-actions { display: flex; justify-content: center; gap: 10px; }
.button.secondary { color: var(--navy); background: #edf3fa; }
.invite-list { display: flex; flex-direction: column; gap: 10px; }
.invite-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.invite-details { display: flex; flex-direction: column; }
.invite-details span { color: var(--muted); font-size: 13px; }
.empty-state { max-width: 760px; margin: 45px auto; padding: 38px; text-align: center; }
.empty-state h1 { color: var(--navy); font-size: 30px; }
.empty-state p { max-width: 570px; margin: 10px auto; color: var(--muted); }
.signup-panel { max-width: 760px; text-align: left; }
.signup-panel > .empty-icon, .signup-panel > .eyebrow, .signup-panel > h1, .signup-panel > p { margin-left: auto; margin-right: auto; text-align: center; }
.billing-signup-form { max-width: 560px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 9px; }
.billing-signup-form label { margin-top: 4px; color: var(--ink); font-size: 13px; font-weight: 700; }
.billing-signup-form .button { margin-top: 8px; }
.billing-signup-form #billing-signup-status { min-height: 20px; overflow-wrap: anywhere; }
.signup-enterprise { margin-top: 24px !important; }
.signup-enterprise a { color: var(--blue); font-weight: 700; }
.signup-access-note { font-size: 12px; }
.license-heading-actions { display: flex; align-items: center; gap: 10px; }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 18px; border-radius: 15px; display: grid; place-items: center; background: var(--blue-light); color: var(--blue); font-size: 27px; }
footer { min-height: 64px; padding: 0 clamp(20px, 6vw, 86px); border-top: 1px solid var(--line); background: white; display: flex; align-items: center; justify-content: space-between; color: #56677d; font-size: 12px; }
footer span { color: #8996a8; }
[hidden] { display: none !important; }
@media (max-width: 780px) {
  .hero { min-height: 0; padding: 38px 0; grid-template-columns: 1fr; gap: 30px; }
  .hero-card { min-height: 220px; }
  .hero-icon { top: 34px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .bulk-users-toolbar { align-items: stretch; flex-direction: column; }
  .bulk-users-actions { align-items: stretch; }
  .page-heading { align-items: start; flex-direction: column; }
  .org-picker-label { width: 100%; }
  .licensing-cards { grid-template-columns: 1fr; }
  .billing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .license-heading-actions { align-items: end; flex-direction: column; }
}
@media (max-width: 520px) {
  .topbar { min-height: 66px; padding: 0 16px; }
  .brand { gap: 9px; font-size: 15px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand small { display: block; margin: 1px 0 0; }
  .account-area { gap: 8px; font-size: 11px; }
  main { width: min(100% - 28px, 1160px); padding: 30px 0 45px; }
  .panel { padding: 19px; }
  .invite-row { align-items: start; flex-direction: column; padding: 12px 0; }
  .invite-row .button { width: 100%; }
  .people-toolbar { grid-template-columns: 1fr; }
  .billing-summary { grid-template-columns: 1fr; }
  .role-badge { font-size: 10px; }
  footer { padding: 0 16px; }
}
