body {
  background-color: #f4f6fb;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.support-banner {
  background: #b45309;
  color: #fff;
  text-align: center;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.vc-shell {
  display: flex;
  min-height: 100vh;
}

.vc-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--vc-sidebar, #1f2a44);
  color: #e7ebf5;
  display: flex;
  flex-direction: column;
}

/* --- Sidebar brand block: the VERSYCODE platform mark is always shown,
   fixed and unstyled by any company's own palette - the company's own
   logo/name (when there is one) is a visually separate strip below it,
   never a replacement for the platform identity. --- */
.vc-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vc-brand-versycode {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc-brand-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.vc-brand-name {
  font-weight: 700;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.vc-company-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vc-company-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.vc-company-logo-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #c9d2e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.vc-company-name {
  font-size: 0.8rem;
  color: #c9d2e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e5e9f2;
  background: #fff;
  flex-shrink: 0;
}

.vc-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px dashed #c7cfe0;
  color: #9aa4bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vc-customer-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e9f2;
  background: #fff;
  flex-shrink: 0;
}

.vc-customer-photo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px dashed #c7cfe0;
  color: #9aa4bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.vc-upload-zone {
  border: 1px dashed #c7cfe0;
  border-radius: 10px;
  padding: 16px;
  background: #f9fafc;
  height: 100%;
}

.vc-nav {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}

.vc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #c9d2e8;
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.vc-nav a:hover, .vc-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.vc-nav .vc-nav-section {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #7b88a8;
  margin: 14px 12px 6px;
}

.vc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vc-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e9f2;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
}

.vc-topbar-left {
  min-width: 0;
  overflow: hidden;
}

.vc-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.vc-page-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1f2a44;
}

.vc-role-badge {
  background: var(--vc-primary, #3262a8);
  color: #fff;
}

/* Unified Notification Bell (spec: RED = "something requires urgent
   attention" - only for a genuinely critical, non-simulated condition,
   never for ordinary business events). */
.vc-bell-critical {
  color: #c1121f !important;
  border-color: #c1121f !important;
}

.vc-bell-dropdown {
  width: 360px;
  max-width: 90vw;
  max-height: 480px;
  overflow-y: auto;
  padding: 0;
}

.vc-bell-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f7;
  white-space: normal;
}

.vc-bell-item.vc-bell-unread {
  background: #f5f8ff;
}

.vc-bell-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f8;
  color: #3262a8;
  font-size: 0.9rem;
}

.vc-bell-icon.vc-bell-icon-message { background: #e8f0fe; color: #1a56c4; }
.vc-bell-icon.vc-bell-icon-email { background: #eaf7ee; color: #1a7f37; }
.vc-bell-icon.vc-bell-icon-support { background: #fff3e0; color: #b96b00; }
.vc-bell-icon.vc-bell-icon-account { background: #f3e8fd; color: #7532a8; }

.vc-content {
  padding: 24px;
  flex: 1;
}

.vc-card {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.vc-card .vc-stat {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2a44;
}

.vc-card .vc-stat-label {
  color: #6b7690;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: var(--vc-button, #3262a8);
  border-color: var(--vc-button, #3262a8);
}

.btn-primary:hover {
  filter: brightness(0.92);
  background-color: var(--vc-button, #3262a8);
  border-color: var(--vc-button, #3262a8);
}

.vc-guest {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vc-primary, #3262a8), var(--vc-secondary, #7532a8));
}

.vc-guest-platform {
  background: linear-gradient(135deg, #1f2a44, #0b1220);
}

.vc-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(180, 83, 9, 0.15);
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.vc-guest-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.vc-guest-card.wide {
  max-width: 620px;
}

.vc-guest-brand {
  text-align: center;
  margin-bottom: 24px;
}

.vc-guest-card input[type="text"],
.vc-guest-card input[type="password"],
.vc-guest-card input[type="email"] {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

.vc-guest-brand .mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-block;
  margin-bottom: 10px;
}

/* --- Language switcher: centered in the topbar on authenticated pages
   (a true grid column, so it can never overlap the title or the action
   buttons - each keeps its own space), and centered above the card on
   guest pages. Laid out in normal flow (never `position: fixed`), so it
   can't float over or hide anything on any viewport size. --- */
.vc-lang-bar {
  display: flex;
  justify-content: center;
}

.vc-lang-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc-lang-form .bi-globe2 {
  color: #6b7690;
  flex-shrink: 0;
}

.vc-lang-form select {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

/* Guest (login/password-reset) pages are a single vertically-centered
   card, not the multi-column authenticated layout - the switcher is
   pinned centered near the top instead of taking a grid column. Guest
   cards always leave headroom above them, so this can't cover the card
   or its fields at any real viewport size. */
.vc-guest-lang-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  width: 100%;
  max-width: 260px;
  padding: 0 16px;
}

.vc-guest-lang-wrap .vc-lang-form select {
  background-color: rgba(255, 255, 255, 0.95);
}

/* Below ~640px the topbar's three grid columns get tight - drop the
   centered language selector to its own full-width row rather than let it
   collide with the page title or the action buttons. */
@media (max-width: 640px) {
  .vc-topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "title actions" "lang lang";
    row-gap: 10px;
  }

  .vc-topbar-left {
    grid-area: title;
  }

  .vc-topbar-right {
    grid-area: actions;
  }

  .vc-lang-bar {
    grid-area: lang;
  }

  .vc-lang-form select {
    width: 100%;
  }
}

/* --- RTL (Arabic/Persian): the flex-based .vc-shell layout and Bootstrap's
   own RTL build mirror automatically; these are the few spots with
   direction-sensitive visuals Bootstrap RTL doesn't touch. --- */
[dir="rtl"] .vc-brand,
[dir="rtl"] .vc-nav a,
[dir="rtl"] .vc-guest-brand {
  text-align: right;
}

[dir="rtl"] .support-banner {
  direction: rtl;
}

/* --- Printing: any page can be printed cleanly via the topbar Print
   button (or Ctrl+P) - chrome (sidebar/topbar/buttons/alerts) is hidden,
   content expands to the full page width. --- */
@media print {
  .vc-sidebar,
  .vc-topbar,
  .support-banner,
  .vc-lang-bar,
  .vc-guest-lang-wrap,
  .no-print,
  .btn,
  .alert .btn-close {
    display: none !important;
  }

  .vc-shell {
    display: block;
  }

  .vc-main {
    display: block;
  }

  .vc-content {
    padding: 0;
  }

  body {
    background: #fff;
  }

  .vc-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
