/* Layout language shared with the digital human workspace. */
:root {
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #253746;
  background: #f7f9fb;
}

button, input, select, textarea { font: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #80cfc0;
  outline-offset: 2px;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.shell { min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  width: 244px;
  height: 100vh;
  flex: 0 0 244px;
  gap: 0;
  padding: 27px 15px 16px;
  background: #142b34;
  color: #edf6f6;
  overflow-y: auto;
}
.brand { gap: 12px; padding: 0 11px 28px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #73d9be;
  color: #133840;
}
.brand strong { font-size: 16px; letter-spacing: .02em; }
.brand small { margin-top: 3px; color: #8fb1b4; letter-spacing: .08em; }
.nav-label {
  margin: 0 13px 11px;
  color: #7e9ca2;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
}
.sidebar nav { gap: 4px; }
.sidebar .nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 13px;
  color: #aac1c3;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.sidebar .nav:hover, .sidebar .nav.active {
  background: #284650;
  color: #fff;
}
.sidebar .nav.active { box-shadow: inset 3px 0 #74d9bb; }
.nav-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-text {
  flex: 1;
  float: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
}
.sidebar .nav-count {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: #3f7d79;
  color: white;
  font-size: 11px;
  float: none;
}
.settings-nav { margin-top: auto; padding-top: 13px; border-top: 1px solid #ffffff1d; }

main { flex: 1; min-width: 0; padding: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 63px;
  padding: 0 42px;
  border-bottom: 1px solid #e7ecef;
  background: #fff;
  color: #7c8d99;
  font-size: 12px;
}
.topbar-trail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-trail strong { color: #344b57; }
.topbar-divider { margin: 0 10px; color: #bdc8cd; }
.topbar-meta { display: flex; align-items: center; gap: 16px; white-space: nowrap; color: #95a3aa; }
.topbar-account,.topbar-logout { border: 0; background: transparent; color: #4b8c80; font-size: 12px; font-weight: 700; white-space: nowrap; }
.topbar-account { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.topbar-account:hover,.topbar-logout:hover { color: #246f65; text-decoration: underline; }
.workspace-content { width: min(100%, 1480px); margin: 0 auto; padding: 31px 42px 70px; }
.page-heading { align-items: flex-end; margin-bottom: 25px; }
.page-heading .eyebrow { color: #4b9e9a; font-size: 11px; letter-spacing: .17em; }
.page-heading h1 { margin: 8px 0 5px; color: #1f3b4a; font-size: 29px; letter-spacing: -.025em; }
.page-heading p { margin: 0; color: #82959e; font-size: 13px; line-height: 1.6; }
.header-actions { justify-content: flex-end; }
button.primary, button.secondary, button.danger, button.ghost {
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
button.primary { background: #247b74; border-color: #247b74; }
button.primary:hover { background: #196961; }
button.secondary { border-color: #d8e6e5; color: #3b6766; }
button.secondary:hover { background: #f3faf8; border-color: #b7dcd4; }

.panel, .stat, .card {
  border: 1px solid #e7edef;
  border-radius: 15px;
  box-shadow: 0 7px 20px #1737470a;
}
.panel { padding: 23px; }
.panel-head { gap: 16px; margin-bottom: 17px; }
.panel-head h2 { color: #203e4b; font-size: 19px; }
.panel-head small { color: #869aa3; }
.inbox-conversations-head { align-items: flex-start; flex-direction: column; gap: 10px; }
.inbox-conversations-head #conversation-filter { width: 100%; min-width: 0; }
.grid { gap: 16px; }
.row { border-color: #e6eeee; background: #fff; }
.row:hover { border-color: #badbd4; background: #fcfefd; }
.row strong { color: #344d58; }
.row p { color: #617985; }
.meta, .muted { color: #8c9ca5; }
.empty { border-color: #dce9e7; background: #f9fcfb; color: #8b9ea4; }
.pill { border-radius: 999px; background: #eaf6f2; color: #367d72; }
input, select, textarea { border-color: #dce8e8; color: #304955; }
table { overflow-wrap: anywhere; }
th { background: #f8fbfb; color: #728d96; }
td, th { border-color: #e9f0ef; }
dialog { border-color: #e2ecea; border-radius: 16px; }

.overview-hero {
  position: relative;
  min-height: 222px;
  overflow: hidden;
  padding: 32px 39px;
  border-radius: 20px;
  background: radial-gradient(circle at 82% 12%, #455eb5 0%, transparent 36%), linear-gradient(115deg, #172953, #233f84 70%, #4263ab);
  box-shadow: 0 16px 35px #25407824;
}
.overview-hero::before, .overview-hero::after {
  content: "";
  position: absolute;
  width: 295px;
  height: 295px;
  right: 6%;
  top: -38px;
  border: 1px solid #ffffff31;
  border-radius: 50%;
  pointer-events: none;
}
.overview-hero::after { width: 190px; height: 190px; right: calc(6% + 53px); top: 14px; box-shadow: 0 0 0 20px #ffffff0b; }
.overview-hero h2, .overview-hero p, .overview-hero button { position: relative; z-index: 1; }
.overview-hero h2 { max-width: 680px; margin: 9px 0 9px; font-size: clamp(23px, 2.5vw, 32px); line-height: 1.35; }
.overview-hero p { max-width: 590px; color: #d5e0f7; line-height: 1.8; }
.overview-hero button.primary { margin-top: 7px; border-color: #fff; background: #fff; color: #234680; }
.overview-hero button.primary:hover { background: #eaf3ff; }
.stats { gap: 14px; margin: 19px 0 25px; }
.stat { min-height: 122px; padding: 18px 19px; }
.stat::before { content: ""; display: block; width: 27px; height: 27px; margin-bottom: 10px; border-radius: 8px; background: #e9f1fc; box-shadow: inset 0 0 0 8px #d7e6fb; }
.stat:nth-child(2)::before { background: #e7f5f0; box-shadow: inset 0 0 0 8px #d3ecdf; }
.stat:nth-child(3)::before { background: #f0eaf9; box-shadow: inset 0 0 0 8px #e4d9f2; }
.stat:nth-child(4)::before { background: #faf0e6; box-shadow: inset 0 0 0 8px #f2dfc8; }
.stat span { color: #778995; }
.stat strong { margin-top: 5px; color: #203d50; font-size: 28px; }

.lead-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.lead-fields label { min-width: 0; }
@media (max-width: 600px) { .lead-fields { grid-template-columns: 1fr; } }
.settings-readiness-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e9f0ef; }
.settings-readiness-row strong { color: #344d58; font-size: 13px; }
.settings-readiness-row .pill { flex: none; }
.settings-readiness-row .hint { margin-bottom: 0; }
.settings-page { max-width: 1120px; margin: 0 auto; gap: 0; }
.settings-section { gap: 17px; }
.settings-section + .settings-section { margin-top: 28px; padding-top: 27px; border-top: 1px solid #e2ebea; }
.settings-section-head h3 { color: #203e4b; font-size: 20px; }
.settings-section-head span { color: #8a9ca5; }
.settings-grid { gap: 16px; align-items: stretch; }
.settings-grid .panel { min-width: 0; }
.settings-gmail-card { grid-column: 1 / -1; }
.settings-channel-maintenance { grid-column: 1 / -1; }
.settings-channel-maintenance .row { margin-bottom: 14px; }
.settings-channel-maintenance .row-top { flex-wrap: wrap; }
.settings-gmail-card .row + .row { margin-top: 10px; }
.settings-gmail-card .row-top { flex-wrap: wrap; }
.settings-company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.settings-identity-card,.settings-admin-card { min-height: 490px; }
.settings-card-heading { margin-bottom: 21px; }
.settings-card-heading h2 { margin: 8px 0 5px; color: #203e4b; font-size: 20px; }
.settings-card-heading p { margin: 0; color: #82959e; font-size: 12px; line-height: 1.7; }
.settings-divider { height: 1px; margin: 22px 0; background: #eaf0f0; }
.settings-identity-card h3,.settings-subheading h3,.personal-account-card h3 { margin: 0; color: #344f5b; font-size: 15px; }
.settings-subheading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.settings-admin-card .settings-form { margin-top: 17px; }
.settings-admin-card .admin-account-row { flex-wrap: wrap; }
.settings-admin-card .admin-account-row .actions { margin-top: 0; }
.settings-single { grid-template-columns: minmax(0, 760px); }
.settings-form input { max-width: 480px; }
.settings-logo-preview { background: #fafdfc; }
.settings-command { white-space: normal; overflow-wrap: anywhere; }

.personal-account-page { width: min(100%, 620px); margin: 0 auto; }
.personal-account-card { padding: 28px; }
.personal-account-card h2 { margin: 9px 0 18px; color: #203e4b; }
.current-account-identity { display: flex; align-items: center; gap: 12px; }
.account-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; background: #e6f4f0; color: #378f7b; font-size: 17px; font-weight: 800; }
.current-account-identity strong,.current-account-identity small { display: block; }
.current-account-identity strong { color: #344f5b; font-size: 15px; }
.current-account-identity small { margin-top: 4px; color: #93a4a9; font-size: 12px; }
.personal-account-card .settings-form { margin-top: 20px; }

dialog.auth-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: auto; background: #f7faf9; box-shadow: none; }
dialog.auth-dialog::backdrop { background: #f7faf9; }
.auth-dialog form { position: relative; display: grid; grid-template-columns: minmax(350px, 1fr) minmax(360px, 1fr); min-height: 100%; }
.auth-dialog .auth-intro { grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px clamp(35px, 7vw, 110px); background: radial-gradient(circle at 90% 15%, #325f75 0%, transparent 38%), linear-gradient(145deg, #132b37, #1e4b58); color: #f3fbf9; }
.auth-intro-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; letter-spacing: .05em; }
.auth-intro-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #73d9be; color: #133840; font-weight: 900; }
.auth-intro .eyebrow { color: #a7e4d4; }
.auth-intro h1 { margin: 15px 0 13px; font-size: clamp(32px, 3.2vw, 49px); line-height: 1.36; }
.auth-intro p { max-width: 470px; margin: 0; color: #b8d2d1; font-size: 14px; line-height: 1.9; }
.auth-intro-foot { color: #93cdbd; font-size: 12px; }
.auth-dialog .modal-head { position: absolute; z-index: 2; top: 18px; right: 22px; margin: 0; }
.auth-dialog .modal-head h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.auth-dialog #modal-body { grid-column: 2; display: grid; place-items: center; padding: 45px 30px; }
.auth-dialog .modal-actions { display: none; }
.auth-card { display: grid; gap: 15px; width: min(100%, 430px); padding: 39px; border: 1px solid #e5eeee; border-radius: 18px; background: #fff; box-shadow: 0 20px 55px #16455012; }
.auth-card h2 { margin: -5px 0 -8px; color: #203e4b; font-size: 28px; }
.auth-card > p { margin: 0 0 9px; color: #8599a0; font-size: 12px; line-height: 1.7; }
.auth-card .field { gap: 7px; color: #45616a; }
.auth-card input,.auth-card select { min-height: 43px; background: #fcfefe; }
.auth-card .auth-submit { min-height: 44px; margin-top: 7px; }
.auth-card .hint { margin: 5px 0 0; }

@media (max-width: 1100px) {
  .workspace-content { padding: 28px 28px 60px; }
  .topbar { padding: 0 28px; }
}
@media (max-width: 800px) {
  .settings-company-grid { grid-template-columns: 1fr; }
  .settings-identity-card,.settings-admin-card { min-height: 0; }
  .auth-dialog form { grid-template-columns: 1fr; }
  .auth-dialog .auth-intro { min-height: 245px; padding: 27px 32px; }
  .auth-intro h1 { font-size: 29px; }
  .auth-intro-foot { display: none; }
  .auth-dialog #modal-body { grid-column: 1; padding: 26px 18px 38px; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .sidebar { width: 72px; flex-basis: 72px; padding: 20px 8px; }
  .sidebar .brand { justify-content: center; padding: 0 0 23px; }
  .sidebar .brand-copy, .nav-label, .nav-text, .sidebar .nav-count { display: none !important; }
  .sidebar .nav { justify-content: center; padding: 10px; font-size: 13px; }
  .sidebar .nav::first-letter { font-size: inherit; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: sticky; z-index: 9; top: 0; width: 100%; height: auto; padding: 10px 15px 9px; overflow: visible; }
  .sidebar .brand { justify-content: flex-start; padding: 0 108px 0 0; margin: 0 0 9px; }
  .sidebar .brand-copy { display: block !important; }
  .nav-label { display: none; }
  .sidebar .main-nav { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .sidebar .main-nav::-webkit-scrollbar { display: none; }
  .sidebar .nav { flex: 0 0 auto; width: auto; min-height: 36px; padding: 8px 10px; font-size: 12px; }
  .sidebar .nav::first-letter { font-size: inherit; }
  .nav-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .nav-text { display: inline !important; }
  .sidebar .nav-count { display: grid !important; }
  .settings-nav { position: absolute; top: 13px; right: 15px; display: flex; margin: 0; padding: 0; border: 0; }
  .topbar { min-height: 49px; padding: 0 16px; }
  .topbar-trail #topbar-brand,.topbar-divider,#topbar-date { display: none; }
  .topbar-meta { gap: 8px; min-width: 0; }
  .topbar-account { max-width: 145px; }
  .topbar-logout { padding: 5px; }
  .workspace-content { padding: 22px 16px 48px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; }
  .header-actions { justify-content: flex-start; }
  .grid, .settings-grid, .settings-single { grid-template-columns: 1fr; }
  .settings-company-grid { grid-template-columns: 1fr; }
  .overview-hero { min-height: 210px; padding: 25px; }
  .overview-hero::before, .overview-hero::after { right: -130px; }
  .overview-hero p { max-width: 420px; }
}
@media (max-width: 480px) {
  .page-heading { flex-direction: column; }
  .page-heading .eyebrow { font-size: 10px; }
  .header-actions { width: 100%; }
  .stats { gap: 9px; }
  .stat { min-height: 112px; padding: 14px; }
  .stat strong { font-size: 24px; }
  .panel { padding: 18px; }
  .panel-head { align-items: flex-start; flex-wrap: wrap; }
  .overview-hero { padding: 22px; }
  .auth-dialog .auth-intro { min-height: 190px; padding: 21px 24px; }
  .auth-intro h1 { font-size: 24px; }
  .auth-intro p { font-size: 12px; }
  .auth-card { padding: 27px 23px; }
}
