/* FullCator 2.0 — Shell layout and chrome.
 * Tokens and reusable components are in /shared/design/.
 */

.hidden {
  display: none !important;
}

/* Native mobile safe areas; browser values resolve to 0. */
:root {
  --fc-safe-top: env(safe-area-inset-top, 0px);
  --fc-safe-right: env(safe-area-inset-right, 0px);
  --fc-safe-bottom: env(safe-area-inset-bottom, 0px);
  --fc-safe-left: env(safe-area-inset-left, 0px);
}

/* Login / register */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fc-space-xl);
  background: var(--fc-bg);
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: var(--fc-space-2xl);
}

.login-card h1 {
  margin: 0 0 var(--fc-space-xs) 0;
  font-size: var(--fc-text-xl);
  font-weight: 700;
  text-align: center;
}

.login-subtitle {
  margin: 0 0 var(--fc-space-lg) 0;
  color: var(--fc-text-muted);
  text-align: center;
}

.login-register {
  margin-top: var(--fc-space-lg);
  text-align: center;
  font-size: var(--fc-text-sm);
  color: var(--fc-text-muted);
}

.status-message {
  margin-top: var(--fc-space-md);
  padding: 10px 12px;
  border-radius: var(--fc-radius);
  font-size: var(--fc-text-sm);
  min-height: 40px;
  border: 1px solid transparent;
}

.status-message.error {
  background: var(--fc-danger-bg);
  color: var(--fc-danger-text);
  border-color: var(--fc-danger-border);
}

.status-message.success {
  background: var(--fc-success-bg);
  color: var(--fc-success-text);
  border-color: var(--fc-success-border);
}

.status-message.info {
  background: var(--fc-info-bg);
  color: var(--fc-info-text);
  border-color: var(--fc-info-border);
}

/* Shell */
.shell {
  --fc-topbar-height: 72px;
  --fc-module-bar-height: 44px;
  height: 100vh;
  height: 100dvh;
  padding: var(--fc-safe-top) var(--fc-safe-right) var(--fc-safe-bottom) var(--fc-safe-left);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: var(--fc-topbar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fc-space-md);
  padding: 0 var(--fc-space-lg);
  background: var(--fc-primary);
  color: var(--fc-on-primary);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  box-sizing: border-box;
  box-shadow: none;
  z-index: 100;
}

.topbar .fc-btn-ghost,
.topbar .fc-btn-link {
  color: var(--fc-on-primary);
  background: transparent;
  border-color: transparent;
}

.topbar .fc-btn-ghost:hover:not(:disabled),
.topbar .fc-btn-link:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--fc-space-sm);
  font-weight: 700;
  font-size: var(--fc-text-lg);
  color: var(--fc-on-primary);
}

.brand-icon {
  color: var(--fc-on-primary);
  font-size: 20px;
}

.topbar-center {
  flex: 1;
  text-align: center;
  font-size: var(--fc-text-sm);
  color: rgba(255, 255, 255, 0.85);
  padding: 0 var(--fc-space-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--fc-space-sm);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--fc-space-sm);
  font-size: var(--fc-text-sm);
  color: var(--fc-on-primary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fc-on-primary);
  color: var(--fc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fc-text-xs);
  font-weight: 700;
}

.shell-body {
  flex: 1;
  display: flex;
  min-height: 0;
  background: var(--fc-bg);
  position: relative;
}

.sidebar {
  width: var(--fc-sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--fc-primary);
  color: var(--fc-on-primary);
  overflow: hidden;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 90;
}

.sidebar-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 85;
}

.sidebar-title {
  margin: 0;
  height: var(--fc-module-bar-height);
  padding: 0 var(--fc-space-lg);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  font-size: var(--fc-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.module-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--fc-space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-xs);
}

.module-item {
  display: flex;
  align-items: center;
  gap: var(--fc-space-sm);
  padding: 10px var(--fc-space-md);
  border: none;
  border-radius: var(--fc-radius);
  background: transparent;
  color: var(--fc-on-primary);
  font-size: var(--fc-text-base);
  text-align: left;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.module-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.module-item.active {
  background: rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.module-item:disabled,
.module-item[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.module-icon {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  text-align: center;
  font-size: 18px;
}

.workspace {
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--fc-bg);
}

.workspace-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--fc-text-muted);
  padding: var(--fc-space-xl);
}

.workspace-welcome h2 {
  margin: 0 0 var(--fc-space-sm) 0;
  color: var(--fc-text);
}

.workspace-welcome p {
  margin: 0;
}

.workspace-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace-header {
  height: var(--fc-module-bar-height);
  min-height: var(--fc-module-bar-height);
  padding: 0 var(--fc-space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fc-space-md);
  box-sizing: border-box;
  background: var(--fc-surface);
  border-bottom: 1px solid var(--fc-border);
  font-size: var(--fc-text-lg);
  font-weight: 600;
  color: var(--fc-text);
}

.workspace-header-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workspace-edit-module {
  flex: 0 0 auto;
}

.workspace-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--fc-space-xl);
  text-align: center;
  color: var(--fc-text-muted);
  background: var(--fc-bg);
}

.workspace-placeholder h3 {
  margin: 0 0 var(--fc-space-xs) 0;
  color: var(--fc-text);
  font-size: var(--fc-text-lg);
}

.workspace-placeholder .hint {
  color: var(--fc-text-muted);
}

.module-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--fc-surface);
}

/* Dev panel */
.dev-panel {
  position: fixed;
  top: var(--fc-topbar-height);
  right: 0;
  width: var(--fc-dev-width);
  max-width: 90vw;
  height: calc(100vh - var(--fc-topbar-height));
  background: var(--fc-surface);
  border-left: 1px solid var(--fc-border);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--fc-transition);
}

.dev-panel.hidden {
  display: block;
  transform: translateX(100%);
}

.dev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fc-space-md) var(--fc-space-lg);
  border-bottom: 1px solid var(--fc-border);
  background: var(--fc-surface-alt);
}

.dev-header h3 {
  margin: 0;
  font-size: var(--fc-text-sm);
  font-weight: 700;
}

.dev-list {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: var(--fc-space-lg);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--fc-space-sm) var(--fc-space-md);
  font-size: var(--fc-text-sm);
}

.dev-list dt {
  color: var(--fc-text-muted);
  font-weight: 600;
}

.dev-list dd {
  margin: 0;
  color: var(--fc-text);
  word-break: break-word;
}

.dev-list dd ul {
  margin: 0;
  padding-left: var(--fc-space-lg);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--fc-sidebar-collapsed);
  }

  .sidebar-title {
    text-align: center;
    padding: 0 var(--fc-space-xs);
  }

  .module-item {
    justify-content: center;
    padding: var(--fc-space-sm);
  }

  .module-item span:not(.module-icon) {
    display: none;
  }

  .module-icon {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 var(--fc-space-md);
  }

  .topbar-center {
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .shell-body {
    position: relative;
  }

  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--fc-sidebar-width);
    transform: translateX(-100%);
    transition: transform var(--fc-transition);
    box-shadow: var(--fc-shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open ~ .sidebar-backdrop,
  .sidebar.open + .sidebar-backdrop {
    display: block;
  }

  .sidebar-title {
    text-align: left;
    padding: 0 var(--fc-space-lg);
  }

  .module-item {
    justify-content: flex-start;
    padding: 10px var(--fc-space-md);
  }

  .module-item span:not(.module-icon) {
    display: inline;
  }

  .workspace-header {
    padding: 0 var(--fc-space-md);
    font-size: var(--fc-text-base);
  }

  .dev-panel {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }

  .user-info > span {
    display: none;
  }
}

/* Shared navigation and search row */
.shell { --fc-module-bar-color: #004494; --fc-shell-search-width: 180px; }
.topbar { padding-left: 0; gap: 0; }
.brand { width: var(--fc-sidebar-width); flex: 0 0 var(--fc-sidebar-width); justify-content: center; height: 100%; }
.sidebar-tabs { display: flex; flex: 0 0 var(--fc-module-bar-height); background: var(--fc-module-bar-color); }
.sidebar-tabs button { width: 50%; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.sidebar-tabs button[aria-selected="true"] { background: rgba(255,255,255,.12); border-bottom-color: #fff; font-weight: 700; }
.sidebar-tabs button:hover { background: rgba(255,255,255,.18); }
.sidebar-tabs button:focus-visible, .user-info:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.workspace-header { padding: 0 12px 0 0; background: var(--fc-module-bar-color); color: #fff; border: 0; gap: 12px; }
.workspace-header-title { flex: 1; }
.shell-search.fc-input { flex: 0 0 var(--fc-shell-search-width); width: var(--fc-shell-search-width); min-width: 0; height: 32px; margin: 6px 0 6px 6px; padding: 4px 10px; background: #fff; color: #18324f; border: 1px solid #b5c9df; border-radius: 5px; font-size: 14px; }
.shell-search::placeholder { color: #52677f; }
#workspace-edit-module { color: #fff; background: transparent; border-color: rgba(255,255,255,.65); }
#workspace-edit-module:hover { background: rgba(255,255,255,.15); }
.shell-contacts { flex: 1; overflow-y: auto; padding: 8px; }
.shell-contact { padding: 10px 12px; overflow-wrap: anywhere; color: #fff; font-size: var(--fc-text-base); cursor: pointer; border-radius: var(--fc-radius); }
.shell-contact:hover, .shell-contact:focus-visible { background: rgba(255,255,255,.10); outline: none; }
.shell-contact.active { background: rgba(255,255,255,.18); font-weight: 700; }
.sidebar-empty { padding: 12px; font-size: 13px; color: #fff; }
.user-menu-anchor { position: relative; }
.user-info { border: 0; cursor: pointer; min-height: 36px; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 190px; padding: 6px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: 8px; box-shadow: var(--fc-shadow-lg); z-index: 1100; }
.user-menu button { display: block; width: 100%; padding: 10px 12px; text-align: left; border: 0; border-radius: 4px; background: transparent; color: var(--fc-text); font: inherit; cursor: pointer; }
.user-menu button:hover, .user-menu button:focus-visible { background: var(--fc-surface-alt); }
.user-menu button:disabled { opacity: .45; cursor: default; }
.login-screen { position: fixed; inset: var(--fc-topbar-height) 0 0; min-height: 0; z-index: 1200; background: rgba(15,35,60,.35); }
.login-card { position: relative; max-height: 100%; overflow-y: auto; }
.auth-close { position: absolute; right: 8px; top: 4px; font-size: 24px; }
.profile-dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--fc-border); border-radius: 10px; padding: 24px; color: var(--fc-text); background: var(--fc-surface); }
.profile-dialog::backdrop { background: rgba(15,35,60,.35); }
.profile-dialog h2 { margin-top: 0; }
.profile-actions { display: flex; justify-content: flex-end; gap: 8px; }
.profile-password-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--fc-border); }
.profile-password-form h3 { margin: 0 0 12px; }
.profile-meta { margin: 4px 0 12px; color: var(--fc-text-muted); font-size: 13px; }
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: var(--fc-sidebar-width); }
  .module-item { justify-content: flex-start; padding: 10px var(--fc-space-md); }
  .module-item span:not(.module-icon) { display: inline; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { width: auto; flex: 1; justify-content: flex-start; }
  .workspace-header { gap: 8px; padding-right: 6px; }
  .shell-search.fc-input { flex-basis: min(var(--fc-shell-search-width), 32vw); width: min(var(--fc-shell-search-width), 32vw); }
  #workspace-edit-module { max-width: 110px; white-space: normal; line-height: 1.1; padding: 4px 6px; font-size: 12px; }
}
@media (max-width: 599px) {
  #workspace-edit-module { display: none !important; }
}
@media (max-width: 480px) {
  .brand-text { display: inline; font-size: 16px; }
  .user-info > span { display: inline; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
  .user-avatar { display: none; }
}

/* Global voice/video call overlays */
.fc-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 24, 42, .72);
  backdrop-filter: blur(4px);
}

.fc-call-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  text-align: center;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 16px;
  box-shadow: var(--fc-shadow-lg);
}

.fc-call-icon { font-size: 52px; margin-bottom: 10px; }
.fc-call-kicker { margin: 0 0 6px; color: var(--fc-text-muted); }
.fc-call-card h2 { margin: 0 0 18px; }

.fc-call-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #07111d;
}

#call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07111d;
}

#call-local-video {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(30%, 150px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 8px;
  background: #172638;
  box-shadow: var(--fc-shadow-sm);
}

.fc-call-status { min-height: 22px; margin: 8px 0; color: var(--fc-text-muted); }
.fc-call-timer { margin: 4px 0 18px; font-variant-numeric: tabular-nums; font-weight: 700; }
#call-remote-audio { display: none; }
.fc-call-media-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.fc-call-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ===== Responsive viewport fit ===== */
.shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
.shell-body,
.workspace,
.workspace-frame,
.module-iframe { min-height: 0; }
.module-iframe {
  height: 100%;
  display: block;
}
.login-screen {
  min-height: calc(100dvh - var(--fc-topbar-height));
}
.profile-dialog {
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  box-sizing: border-box;
}
.fc-call-card { max-height: calc(100dvh - 24px); }
@media (max-width: 768px), (max-height: 760px) {
  .login-screen { padding: 12px; }
  .login-card { padding: 16px; }
  .profile-dialog { width: min(420px, calc(100vw - 16px)); padding: 12px; }
  .profile-password-form { margin-top: 12px; padding-top: 10px; }
}

/* FullCator product logos */
.topbar { justify-content:flex-start; }
.topbar-right { margin-left:auto; }
.topbar-brand-nav {
  display:flex;
  align-items:center;
  gap:14px;
  flex:0 0 auto;
  min-width:0;
  margin-left:clamp(18px, 4vw, 64px);
}
.app-brand-link, .topbar-photobank-link {
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  margin:0;
  padding:0;
  text-decoration:none;
}
.topbar-logo {
  display:block;
  width:auto;
  object-fit:contain;
  background:transparent;
  border-radius:0;
}
.topbar-logo-desktop { height:56px; }
.topbar-logo-photobank { height:52px; }
.topbar-photobank-link { opacity:.96; }
.topbar-photobank-link:hover { opacity:1; }
@media (max-width:768px) {
  .topbar { justify-content:flex-start; }
  .topbar-brand-nav { margin-left:0; gap:8px; }
  .topbar-logo-desktop { height:48px; }
  .topbar-logo-photobank { height:44px; }
}
@media (max-width:520px) {
  .topbar-brand-nav { gap:5px; }
  .topbar-logo-desktop { height:42px; }
  .topbar-logo-photobank { height:38px; max-width:92px; }
}

/* Profile billing / subscription management */
.profile-dialog { width:min(900px,calc(100vw - 32px)); }
.profile-billing-section { margin-top:20px; padding-top:18px; border-top:1px solid var(--fc-border); }
.profile-billing-section h3,.profile-billing-section h4 { margin:0 0 12px; }
.billing-summary,.billing-storage-card { padding:14px; margin-bottom:14px; border:1px solid var(--fc-border); border-radius:8px; background:var(--fc-surface-alt); }
.billing-row { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:4px 0; }
.billing-progress { height:12px; overflow:hidden; margin:10px 0; border-radius:999px; background:var(--fc-border); }
.billing-progress > span { display:block; height:100%; width:0; background:#2f7d32; transition:width .2s ease; }
.billing-progress > span.warning { background:#c58a00; }
.billing-progress > span.danger { background:#b42318; }
.billing-storage-controls { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.billing-storage-controls .fc-input { width:100px; }
.billing-module-list,.billing-invoice-list { display:grid; gap:8px; margin-bottom:16px; }
.billing-module-row,.billing-invoice-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--fc-border); border-radius:7px; }
.billing-customer-form { padding-top:12px; border-top:1px solid var(--fc-border); margin-bottom:16px; }
.billing-customer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.billing-customer-grid label { display:flex; flex-direction:column; gap:4px; }
@media(max-width:760px){.profile-dialog{width:min(640px,calc(100vw - 16px));}.billing-customer-grid{grid-template-columns:1fr 1fr;}.billing-row{align-items:flex-start;flex-direction:column;}}
@media(max-width:480px){.billing-customer-grid{grid-template-columns:1fr;}.billing-module-row,.billing-invoice-row{align-items:flex-start;flex-direction:column;}}

/* FullCator Browser Shell — gated by ?fc_browser=1 */
.fc-browser-chrome {
  position: relative;
  flex: 0 0 auto;
  z-index: 250;
  color: #fff;
  box-shadow: 0 1px 4px rgba(3, 27, 85, .24);
}
.fc-browser-toprow {
  height: 72px;
  display: grid;
  grid-template-columns: 92px 110px minmax(150px, 1fr) 110px 92px 92px;
  align-items: stretch;
  background: linear-gradient(180deg, #0263e7 0%, #031b55 100%);
}
.fc-browser-icon {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 31px;
  font-weight: 700;
  cursor: pointer;
  min-width: 0;
}
.fc-browser-icon:hover:not(:disabled),
.fc-browser-icon:focus-visible { background: rgba(255,255,255,.12); }
.fc-browser-icon:disabled { opacity: .32; cursor: default; }

.fc-browser-label { font-family: Arial, sans-serif; }
.fc-browser-home {
  font-size: 39px;
  background: rgba(255,255,255,.08);
}
.fc-browser-home.active { background: rgba(255,255,255,.16); }
.fc-browser-searchrow {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: #041c56;
  box-sizing: border-box;
}
.fc-browser-hamburger {
  width: 72px;
  height: 46px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 31px;
  cursor: pointer;
}
.fc-browser-hamburger:hover,
.fc-browser-hamburger:focus-visible { background: rgba(255,255,255,.12); }
.fc-browser-omnibox-form {
  flex: 1;
  margin: 0;
}

.fc-browser-omnibox {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #b4c3d8;
  border-radius: 7px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  color: #27364b;
  font-size: 16px;
}
.fc-browser-omnibox:focus {
  border-color: #6c9bea;
  box-shadow: 0 0 0 2px rgba(2,97,226,.18);
}
.fc-browser-popover {
  position: absolute;
  z-index: 4000;
  background: #fff;
  color: #18253a;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  overflow: hidden;
}
.fc-browser-menu-popover {
  left: 18px;
  top: 126px;
  width: min(310px, calc(100vw - 36px));
}

.fc-browser-menu-popover button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.fc-browser-menu-popover button:last-child { border-bottom: 0; }
.fc-browser-menu-popover button:hover:not(:disabled) { background: #f5f6f8; }
.fc-browser-menu-popover button:disabled { color: #9aa6b7; cursor: default; }
.fc-email-folder-menu .fc-email-folder-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fc-email-folder-count {
  min-width: 2ch;
  color: #041C56;
  font-weight: 700;
  text-align: right;
}
.fc-browser-tabs-popup {
  right: 18px;
  top: 68px;
  width: min(520px, calc(100vw - 36px));
  max-height: min(65vh, 560px);
  overflow-y: auto;
}
.fc-browser-tab-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid #edf0f5;
}
.fc-browser-tab-row:last-child { border-bottom: 0; }
.fc-browser-tab-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
}
.fc-browser-tab-row.active { background: #eef5ff; }
.fc-browser-tab-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #33445e;
  font-size: 24px;
  cursor: pointer;
}
.fc-browser-tab-close:hover { background: #e3e9f1; }
.fc-browser-bookmark-toggle {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #dfe6f0;
  background: #f7faff;
  color: #143d78;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.fc-browser-bookmark-toggle:hover { background: #edf5ff; }
.fc-browser-surface {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  background: #f5f6f8;
}
.fc-browser-engine-slot {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #fff;
}
.fc-browser-engine-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #66758a;

  background: #f5f6f8;
}
.shell.fc-browser-enabled > .topbar { display: none; }
.shell.fc-browser-enabled > .fc-browser-chrome { display: block !important; }
.shell.fc-browser-enabled .shell-body { background: #f5f6f8; }
.shell.fc-browser-enabled.fc-browser-mode .sidebar,
.shell.fc-browser-enabled.fc-browser-mode #workspace-header,
.shell.fc-browser-enabled.fc-browser-mode #workspace-welcome,
.shell.fc-browser-enabled.fc-browser-mode #workspace-frame {
  display: none !important;
}
.shell.fc-browser-enabled.fc-browser-mode #fc-browser-surface {
  display: flex !important;
}
.shell.fc-browser-enabled.fc-app-mode #fc-browser-surface {
  display: none !important;
}
.shell.fc-browser-enabled.fc-app-mode .fc-browser-home { background: transparent; }
.shell.fc-browser-enabled.fc-app-mode #fc-browser-fc { background: rgba(255,255,255,.16); }
.shell.fc-browser-enabled.fc-app-mode #workspace-header { display: none; }
.shell.fc-browser-enabled.fc-app-mode .workspace { min-width: 0; }

@media (max-width: 600px) {
  .fc-browser-chrome {
    background: linear-gradient(180deg, #4285F4 0%, #041C56 100%);
    box-shadow: none;
  }
  .fc-browser-toprow {
    position: relative;
    height: 12.905556vw;
    min-height: 46px;
    display: block;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
  }
  .fc-browser-icon {
    position: absolute;
    top: 2.720370vw;
    width: 12.037037vw;
    height: 8.333333vw;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: .925926vw;
    background: rgba(255,255,255,.40);
    box-shadow: none;
    font-size: 7.715741vw;
    line-height: 1;
    opacity: 1;
  }
  .fc-browser-icon:hover:not(:disabled),
  .fc-browser-icon:focus-visible { background: rgba(255,255,255,.40); }
  .fc-browser-icon:disabled { opacity: 1; }
  #fc-browser-account { left: 1.851852vw; }
  #fc-browser-fc { left: 15.740741vw; }
  #fc-browser-pl { left: 29.629630vw; }
  #fc-browser-home { left: 58.333333vw; }
  #fc-browser-new { left: 72.222222vw; }
  #fc-browser-tabcount { left: 86.111111vw; }
  .fc-browser-icon-text {
    display: inline-block;
    font-weight: 700;
    background: linear-gradient(180deg, #041C56 0%, #4285F4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
  .fc-browser-icon.active,
  .shell.fc-browser-enabled.fc-app-mode #fc-browser-fc {
    background: #041C56 !important;
  }
  .fc-browser-icon.active .fc-browser-icon-text,
  .shell.fc-browser-enabled.fc-app-mode #fc-browser-fc .fc-browser-icon-text {
    background: none;
    color: #fff;
    -webkit-text-fill-color: #fff;
  }
  #fc-browser-account img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: contain;
  }
  .fc-browser-home img {
    display: block;
    width: 71.423077%;
    height: 88.888889%;
    max-width: none;
    margin: 5.555556% auto 0;
    object-fit: fill;
  }
  .fc-browser-searchrow {
    height: 9.501852vw;
    min-height: 34px;
    display: flex;
    align-items: flex-start;
    gap: 2.777778vw;
    padding: 0 1.851852vw 0 2.777778vw;
    background: transparent;
    box-sizing: border-box;
  }
  .fc-browser-hamburger {
    flex: 0 0 10.185185vw;
    width: 10.185185vw;
    height: 8.333333vw;
    min-height: 30px;
    border: 0;
    border-radius: .925926vw;
    font-size: 0;
    background:
      linear-gradient(#FEFEFE,#FEFEFE) center 21.8% / 74.38% 9.4% no-repeat,
      linear-gradient(#FEFEFE,#FEFEFE) center 50% / 74.38% 9.4% no-repeat,
      linear-gradient(#FEFEFE,#FEFEFE) center 78.2% / 74.38% 9.4% no-repeat;
  }
  .fc-browser-hamburger:hover,
  .fc-browser-hamburger:focus-visible { background:
      linear-gradient(#FEFEFE,#FEFEFE) center 21.8% / 74.38% 9.4% no-repeat,
      linear-gradient(#FEFEFE,#FEFEFE) center 50% / 74.38% 9.4% no-repeat,
      linear-gradient(#FEFEFE,#FEFEFE) center 78.2% / 74.38% 9.4% no-repeat; }
  .fc-browser-omnibox-form { min-width: 0; }
  .fc-browser-omnibox {
    height: 8.333333vw;
    min-height: 30px;
    border: .277778vw solid #B4C3D8;
    border-radius: .810185vw / 1.111111vw;
    background: #fff;
    color: #041C56;
    font-size: 3.858333vw;
    padding: 0 3.769444vw;
  }
  .fc-browser-omnibox::placeholder { color:#041C56; opacity:1; }
  .fc-browser-menu-popover { top: 22.407407vw; left: 2.777778vw; width: min(300px, calc(100vw - 5.555556vw)); }
  .fc-browser-tabs-popup { top: 12.905556vw; right: 1.851852vw; width: calc(100vw - 3.703704vw); }
  .fc-browser-account-popover { top: 12.905556vw; left: 2.777778vw; }
  .shell.fc-browser-enabled.fc-app-mode .sidebar {
    top: 0;
    height: 100%;
  }
}

.fc-browser-account-popover {
  left: 10px;
  top: 66px;
  width: min(230px, calc(100vw - 20px));
}
.fc-browser-account-popover button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  color: #18253a;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.fc-browser-account-popover button:last-child { border-bottom: 0; }
.fc-browser-account-popover button:hover { background: #f5f6f8; }

.fc-browser-home img {
  display: block;
  width: auto;
  height: 50px;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}
@media (max-width: 600px) {
  .fc-browser-account-popover { top: 48px; left: 6px; }
}

/* FCMA SVG-locked mobile chrome — source artwork is used without modification. */
.fcma-top-art { display: none; }
@media (max-width: 600px) {
  .shell.fc-browser-enabled {
    background-color: #f5f6f8;
    background-image: url('/assets/fcma-svg/fcma-bg.svg?v=1');
    background-repeat: no-repeat;
    background-size: 100vw auto;
    background-position: 0 -8.020370vw;
  }
  .shell.fc-browser-enabled .fc-browser-chrome {
    background: transparent;
    box-shadow: none;
  }
  .fcma-top-art {
    display: block;
    position: absolute;
    left: 0;
    top: -8.020370vw;
    width: 100vw;
    height: auto;
    pointer-events: none;
    z-index: 0;
  }
  .fc-browser-toprow,
  .fc-browser-searchrow {
    position: relative;
    z-index: 1;
    background: transparent;
  }
  .fc-browser-toprow {
    height: 12.905556vw;
    min-height: 0;
    padding: 0;
  }
  .fc-browser-icon {
    top: 2.720370vw;
    width: 10.185185vw;
    height: 8.333333vw;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: .925926vw;
    background: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }
  #fc-browser-account { left: 2.777778vw; }
  #fc-browser-fc { left: 16.666667vw; }
  #fc-browser-pl { left: 30.555556vw; }
  #fc-browser-home { left: 59.259259vw; }
  #fc-browser-new { left: 73.148148vw; }
  #fc-browser-tabcount { left: 87.037037vw; }
  .fc-browser-icon > img,
  .fc-browser-icon > .fc-browser-icon-text { opacity: 0 !important; }
  .fc-browser-searchrow {
    height: 9.501852vw;
    min-height: 0;
    align-items: flex-start;
    gap: 2.777778vw;
    padding: 0 1.851852vw 0 2.777778vw;
  }
  .fc-browser-hamburger {
    flex: 0 0 10.185185vw;
    width: 10.185185vw;
    height: 8.333333vw;
    min-height: 0;
    border: 0;
    background: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
  }
  .fc-browser-omnibox-form { min-width: 0; }
  .fc-browser-omnibox {
    height: 8.333333vw;
    min-height: 0;
    padding: 0 3.769444vw;
    border: .277778vw solid transparent;
    border-radius: .810185vw / 1.111111vw;
    outline: none;
    background: transparent;
    color: #041c56;
    caret-color: #041c56;
    font: 400 3.858333vw Arial, sans-serif;
    box-shadow: none;
  }
  .fc-browser-omnibox::placeholder { color: transparent; opacity: 0; }
  .fc-browser-omnibox:not(:placeholder-shown) {
    border-color: #b4c3d8;
    background: #fff;
  }
  .fc-browser-omnibox:focus { box-shadow: none; }
  .shell.fc-browser-enabled .shell-body { background: #f5f6f8; }
}
