:root {
  font-family: Tahoma, Arial, sans-serif;
  color: #17213d;
  background: #f4f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #101d43;
  --blue: #506be8;
  --line: #e9edf5;
  --shadow: 0 10px 34px rgba(35, 53, 102, .06);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f4f6fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.hidden { display: none !important; }
.muted { color: #8590a6; margin: 7px 0 0; font-size: 14px; }
.small-text { font-size: 12px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #7181c4; margin-bottom: 7px; }

.login-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: radial-gradient(ellipse at 22% 12%, rgba(103,130,243,.12), transparent 34%), radial-gradient(ellipse at 82% 82%, rgba(33,167,122,.08), transparent 31%), #f4f6fb; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; font-weight: 700; font-size: 18px; color: var(--navy); }
.brand-mark { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(145deg,#657df4,#3d56d4); display: grid; place-items: center; box-shadow: 0 9px 22px rgba(79,106,231,.26); }
.brand-mark svg { width: 31px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.login-card { width: min(100%, 438px); padding: 34px 36px; background: #fff; border: 1px solid #edf0f6; border-radius: 24px; box-shadow: 0 26px 70px rgba(27,44,90,.11); }
.login-card h1 { font-size: 29px; margin: 0; color: var(--navy); }
.login-card > p { margin: 8px 0 25px; }
.stack { display: grid; gap: 17px; }
.stack label, .form-grid label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: #46516d; }
.stack input, .form-grid input, .form-grid select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #e5e9f2; border-radius: 12px; background: #fbfcff; color: #1c2744; outline: none; }
.stack input:focus, .form-grid input:focus, .form-grid select:focus { border-color: #8596f1; box-shadow: 0 0 0 3px rgba(80,107,232,.11); }
.button { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg,#5e79f4,#435ee0); color: white; box-shadow: 0 8px 18px rgba(77,104,229,.21); }
.button.primary:hover { box-shadow: 0 11px 22px rgba(77,104,229,.27); }
.button.secondary { background: #f0f2f8; color: #56617c; }
.button.wide { width: 100%; height: 47px; margin-top: 3px; }
.login-help { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 15px; color: #929bb0; font-size: 11px; line-height: 1.8; }
.login-foot { color: #9ba4b8; font-size: 11px; margin-top: 24px; }

.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: linear-gradient(180deg,#111e45,#0d1838); color: white; padding: 25px 15px 18px; display: flex; flex-direction: column; z-index: 3; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 30px; }
.brand-mark.small { width: 40px; height: 40px; border-radius: 13px; box-shadow: none; }
.brand-mark.small svg { width: 25px; }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand small { display: block; color: #9ba8cd; font-size: 10px; margin-top: 2px; }
.nav-caption { padding: 3px 13px 11px; color: #7786ae; font-size: 10px; font-weight: 700; }
.side-nav { display: grid; gap: 6px; }
.nav-item { border: 0; width: 100%; padding: 12px 13px; border-radius: 12px; background: transparent; color: #b7c1de; text-align: right; display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 13px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg,rgba(98,122,240,.31),rgba(98,122,240,.12)); color: white; box-shadow: inset -3px 0 #8093ff; }
.nav-icon { width: 20px; text-align: center; color: #9bacf4; font-size: 18px; }
.side-spacer { flex: 1; }
.side-note { display: flex; gap: 10px; align-items: flex-start; margin: 16px 3px; padding: 14px 12px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); border-radius: 13px; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #43d29d; margin-top: 6px; box-shadow: 0 0 0 4px rgba(67,210,157,.12); }
.side-note strong { display: block; font-size: 11px; }
.side-note small { display: block; color: #9aa6c6; font-size: 9px; margin-top: 4px; line-height: 1.6; }
.logout { margin-top: 5px; color: #c7cee0; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { height: 73px; background: #fff; border-bottom: 1px solid #e9edf5; display: flex; align-items: center; justify-content: space-between; padding: 0 35px; position: sticky; top: 0; z-index: 2; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #99a2b5; }
.breadcrumbs b { font-weight: 400; color: #d1d6e0; }
.breadcrumbs strong { color: #293454; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.live-pill { border: 1px solid #d8f0e7; background: #f1fbf7; color: #2c9874; border-radius: 99px; padding: 6px 10px; font-size: 10px; display: flex; align-items: center; gap: 6px; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #35bd8e; }
.icon-button { width: 36px; height: 36px; border: 1px solid #e8ebf3; background: #fff; border-radius: 11px; color: #697591; font-size: 20px; display: grid; place-items: center; }
.icon-button:hover { background: #f6f7fc; }
.owner-chip { display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); padding-right: 14px; }
.owner-avatar { width: 34px; height: 34px; display: grid; place-items: center; background: #e9edff; color: #5169df; border-radius: 11px; font-weight: 700; }
.owner-chip strong { display: block; font-size: 11px; }
.owner-chip small { display: block; font-size: 9px; color: #9aa2b5; }
.content-area { max-width: 1500px; padding: 30px 35px 45px; margin: auto; }
.welcome-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.welcome-row h1 { font-size: 26px; color: var(--navy); margin: 0; letter-spacing: -.4px; }
.welcome-row .muted { font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card { padding: 17px 18px; background: #fff; border: 1px solid #eef0f6; border-radius: 16px; box-shadow: var(--shadow); min-height: 116px; position: relative; overflow: hidden; }
.metric-card:after { content: ""; position: absolute; width: 82px; height: 82px; border-radius: 50%; left: -24px; top: -26px; background: var(--tint); }
.metric-blue { --tint: #edf0ff; --tone: #536ce2; }
.metric-green { --tint: #e9f8f1; --tone: #24936f; }
.metric-amber { --tint: #fff5e7; --tone: #d1943c; }
.metric-sky { --tint: #edf7ff; --tone: #4f8cbd; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #8791a7; font-size: 11px; }
.metric-icon { width: 31px; height: 31px; border-radius: 10px; background: var(--tint); color: var(--tone); display: grid; place-items: center; font-size: 16px; }
.metric-value { font-size: 28px; font-weight: 700; line-height: 1; margin-top: 16px; color: #1d294a; }
.metric-foot { font-size: 10px; color: #a0a8b8; margin-top: 6px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(280px,.85fr); gap: 15px; }
.panel { background: #fff; border: 1px solid #edf0f6; border-radius: 17px; box-shadow: var(--shadow); padding: 19px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 14px; margin: 0; color: #233052; }
.panel-head p { font-size: 10px; margin: 4px 0 0; color: #9aa3b6; }
.text-button { border: 0; background: transparent; color: #526be2; font-size: 11px; font-weight: 700; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 550px; }
.companies-data-table { min-width: 1120px; }
.data-table th { text-align: right; font-size: 10px; font-weight: 600; color: #9aa4b7; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { text-align: right; font-size: 11px; padding: 12px 10px; border-bottom: 1px solid #f0f2f7; color: #46516b; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.company-cell { display: flex; align-items: center; gap: 9px; }
.company-logo { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(145deg,#edf0ff,#dfe6ff); display: grid; place-items: center; color: #506be8; font-weight: 700; }
.company-name { font-weight: 700; color: #263251; font-size: 11px; }
.company-slug { direction: ltr; text-align: right; color: #a3abbb; font-size: 9px; margin-top: 2px; }
.contact-link { color: #4b63cf; text-decoration: none; direction: ltr; unicode-bidi: plaintext; }
.contact-link:hover { text-decoration: underline; }
.site-contact { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px 18px; margin:18px auto 26px; padding:14px 18px; width:min(1100px,calc(100% - 32px)); border:1px solid #e6eaf5; border-radius:18px; background:#fff; color:#68718a; font-size:13px; }
.site-contact a { color:#405de6; text-decoration:none; font-weight:700; unicode-bidi:plaintext; }
.site-contact a:hover { text-decoration:underline; }
.contact-empty { display: inline-block; margin: 0; font-size: 10px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.badge:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active { background: #eaf8f2; color: #24926d; }
.badge.suspended { background: #fef0f1; color: #d45460; }
.badge.expiring { background: #fff6e9; color: #c98c35; }
.badge.neutral { background: #f1f3f8; color: #77819a; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 255px; }
.mini-button { border: 1px solid #e7eaf2; background: #fff; border-radius: 8px; color: #65718c; padding: 5px 8px; font-size: 9px; font-weight: 600; }
.mini-button:hover { border-color: #aab6f4; color: #435edb; background: #f8f9ff; }
.mini-button.danger { color: #d25966; }
.delete-confirm { background: #c14d5b !important; }
.empty-state { padding: 35px 15px; text-align: center; color: #9ca5b7; font-size: 12px; }
.attention-panel { display: flex; flex-direction: column; }
.soft-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #d7983b; background: #fff5e7; border-radius: 11px; }
.attention-list { display: grid; gap: 9px; }
.attention-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #f0f1f6; border-radius: 11px; }
.attention-item strong { display: block; font-size: 10px; color: #34405c; }
.attention-item small { display: block; color: #a0a8b8; font-size: 9px; margin-top: 3px; }
.days-left { color: #c6862d; font-weight: 700; font-size: 10px; white-space: nowrap; }
.attention-footer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; color: #a0a8b8; font-size: 9px; }
.platform-info { display: flex; gap: 13px; align-items: center; margin-top: 15px; padding: 16px 18px; }
.platform-info h2 { font-size: 12px; margin: 0; color: #24463c; }
.platform-info p { font-size: 10px; color: #85918d; margin: 4px 0 0; line-height: 1.7; }
.info-icon { width: 34px; height: 34px; border-radius: 11px; background: #eaf8f2; color: #23a276; display: grid; place-items: center; font-weight: 700; }
.secure-label { margin-right: auto; color: #229570; background: #effaf5; border-radius: 99px; padding: 5px 9px; font-size: 9px; white-space: nowrap; }
.owner-settings-panel { max-width: 820px; }
.current-owner-email { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid #e7ebf5; border-radius: 13px; background: linear-gradient(135deg,#f8f9ff,#fff); }
.current-owner-email span { color: #8791a7; font-size: 12px; }
.current-owner-email strong { color: #34466f; font-size: 14px; overflow-wrap: anywhere; }
.owner-email-form { max-width: 560px; margin-top: 20px; }
.owner-email-form .info-notice { margin: 0; }
.owner-email-form .dialog-actions { margin-top: 0; padding-top: 0; border-top: 0; }

.table-panel { padding: 0; }
.table-tools { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(320px,100%); height: 38px; border: 1px solid #e8ebf3; background: #fbfcfe; border-radius: 10px; padding: 0 11px; color: #9ba4b7; }
.search-box input { border: 0; outline: 0; background: transparent; min-width: 0; flex: 1; font-size: 11px; color: #293454; }
.filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-pill { border: 1px solid transparent; background: transparent; color: #929bb0; border-radius: 8px; padding: 7px 10px; font-size: 10px; }
.filter-pill.active { background: #edf0ff; color: #4c66dc; font-weight: 700; }
.table-panel > .table-wrap { padding: 0 10px; }
.table-foot { border-top: 1px solid var(--line); padding: 11px 18px; font-size: 10px; color: #9ba4b7; }
.schedule-tag { background: #eff2ff; color: #526be2; border-radius: 9px; padding: 7px 10px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.info-notice { margin-top: 15px; background: #f1f4ff; border-color: #e1e7ff; color: #6c7899; font-size: 11px; line-height: 1.8; }
.info-notice strong { color: #4b62cf; }
.notice { border-radius: 12px; padding: 11px 14px; margin-bottom: 13px; font-size: 11px; }
.notice.error { background: #fff0f1; color: #bb4e59; border: 1px solid #f8d9dc; }
.notice.success { background: #eef9f4; color: #258962; border: 1px solid #d7f0e4; }
.notice.info { background: #f0f3ff; color: #566cae; border: 1px solid #e1e7ff; }
.dialog { border: 0; background: transparent; padding: 0; max-width: calc(100% - 28px); width: 510px; max-height: calc(100% - 28px); overflow: visible; }
.dialog::backdrop { background: rgba(12,22,50,.46); backdrop-filter: blur(3px); }
.dialog-card { background: white; border-radius: 19px; padding: 24px; box-shadow: 0 25px 80px rgba(12,25,60,.22); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 19px; color: #1c294c; }
.dialog-card > .muted { font-size: 11px; line-height: 1.8; margin: 10px 0 19px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,18px); opacity: 0; pointer-events: none; background: #182648; color: white; border-radius: 11px; padding: 11px 17px; font-size: 11px; box-shadow: 0 8px 28px rgba(9,18,43,.24); transition: all .2s; z-index: 10; max-width: min(90vw,460px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1120px) { .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .dashboard-grid { grid-template-columns: 1fr; } .attention-panel { min-height: 240px; } }
@media (max-width: 760px) {
  .sidebar { width: 68px; padding: 17px 9px; }
  .sidebar-brand { padding: 0 4px 24px; }
  .sidebar-brand > div:last-child, .nav-caption, .nav-item:not(.logout) { font-size: 0; }
  .sidebar-brand > div:last-child, .side-note > div { display: none; }
  .brand-mark.small { width: 44px; height: 44px; }
  .side-nav { margin-top: 4px; }
  .nav-item { justify-content: center; padding: 12px 5px; font-size: 0; }
  .nav-icon { font-size: 20px; }
  .side-note { justify-content: center; padding: 11px 0; }
  .side-note .status-dot { margin: 0; }
  .logout { font-size: 0; }
  .main-area { margin-left: 68px; }
  .topbar { height: 62px; padding: 0 16px; }
  .content-area { padding: 22px 14px 32px; }
  .breadcrumbs { font-size: 10px; }
  .top-actions { gap: 8px; }
  .live-pill { font-size: 0; padding: 8px; }
  .live-pill i { width: 7px; height: 7px; }
  .owner-chip { padding-right: 8px; }
  .owner-chip > span:last-child { display: none; }
  .welcome-row { align-items: flex-start; }
  .welcome-row h1 { font-size: 22px; }
  .welcome-row .button { font-size: 10px; padding: 9px 11px; white-space: nowrap; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 13px; min-height: 102px; }
  .metric-value { font-size: 24px; }
  .panel { padding: 15px; }
  .panel-head h2 { font-size: 13px; }
  .platform-info { align-items: flex-start; }
  .secure-label { display: none; }
  .table-tools { align-items: stretch; }
  .search-box { width: 100%; }
  .filter-pills { overflow-x: auto; flex-wrap: nowrap; }
  .filter-pill { white-space: nowrap; }
  .login-card { padding: 27px 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}
@media (max-width: 390px) { .sidebar { width: 56px; } .main-area { margin-left: 56px; } .content-area { padding-inline: 10px; } .metric-grid { grid-template-columns: 1fr 1fr; } .metric-card { padding: 10px; } .metric-top { font-size: 9px; } }
