/* ============================================
   MUFC ERP - Main Stylesheet
   ============================================ */

:root {
  --sidebar-width: 260px;
  --sidebar-collapsed: 60px;
  --navbar-height: 58px;
  --primary: #1a56db;
  --primary-dark: #1242b0;
  --primary-light: #e8effc;
  --secondary: #6b7280;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --dark: #0f172a;
  --light: #f9fafb;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 3px 7px rgba(0,0,0,0.08);
  --radius: 6px;
  --radius-lg: 10px;
  --transition: all 0.15s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-body);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ============================================
   App Layout
   ============================================ */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-width: 0;
}

.content-area {
  padding: 18px 20px;
  min-height: calc(100vh - var(--navbar-height));
}

/* Page titles - compact size */
.content-area > .d-flex > h4,
.content-area > .d-flex > div > h4,
.content-area > h4,
.content-area > .d-flex > h5,
.content-area > h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ============================================
   Breadcrumb
   ============================================ */

.app-breadcrumb {
  margin-bottom: 12px;
  padding: 6px 12px;
  background: #fff;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.app-breadcrumb .breadcrumb {
  font-size: 0.72rem;
  margin-bottom: 0;
}

.app-breadcrumb .breadcrumb-item a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.15s;
}

.app-breadcrumb .breadcrumb-item a:hover {
  color: var(--pt-color, var(--primary));
}

.app-breadcrumb .breadcrumb-item.active {
  color: #343a40;
  font-weight: 500;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: #adb5bd;
  font-size: 0.85rem;
}

.app-breadcrumb .bi-house-door {
  font-size: 0.85rem;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--dark);
  color: #fff;
  z-index: 1040;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.sidebar-brand i {
  font-size: 1.1rem;
  color: #fff;
  background: var(--primary);
  padding: 5px;
  border-radius: 6px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  display: none;
}

.sidebar-nav {
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Thin scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 2px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-section {
  padding: 14px 16px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255,255,255,0.5);
}

.nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,0.86);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-item .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-item .nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ============================================
   Navbar
   ============================================ */

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  padding: 0 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.82rem;
}

.card-body {
  padding: 14px 16px;
}

/* Stats card */
.stat-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg-card);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-card .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
  font-weight: 500;
}

/* ============================================
   Tables
   ============================================ */

.table {
  font-size: 0.78rem;
}

.table thead th {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  padding: 8px 10px;
  white-space: nowrap;
  background: #fafbfc;
}

.table tbody td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
  background: var(--primary-light);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 5px 12px;
  transition: var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ============================================
   Forms
   ============================================ */

.form-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.form-control, .form-select {
  font-size: 0.8rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

/* ============================================
   Badges
   ============================================ */

.badge {
  font-weight: 600;
  font-size: 0.68rem;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

.bg-purple {
  background-color: #7c3aed !important;
}

/* ============================================
   Auth Page
   ============================================ */

.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* ============================================
   Fullscreen Split Layout
   ============================================ */
.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Left Panel: Branding --- */
.auth-left {
  position: relative;
  width: 50%;
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 40%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-left-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.auth-left-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 48px;
  max-width: 480px;
}

.auth-brand-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.2rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.auth-brand-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.auth-brand-subtitle {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 40px;
  line-height: 1.6;
}

.auth-brand-features {
  text-align: left;
  display: inline-block;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.92rem;
  opacity: 0.85;
}

.auth-feature i {
  color: #60a5fa;
  font-size: 1rem;
}

/* --- Right Panel: Form --- */
.auth-right {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #f8fafc;
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 480px;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo-sm {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: #fff;
}

.auth-form-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-form-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.auth-form-container .input-group-text {
  background: #fff;
  border-right: 0;
}

.auth-form-container .form-control {
  border-left: 0;
}

.auth-form-container .form-control:focus {
  box-shadow: none;
  border-color: var(--primary);
}

.auth-form-container .form-control:focus ~ .input-group-text,
.auth-form-container .input-group:focus-within .input-group-text {
  border-color: var(--primary);
}

.auth-form-container .btn-primary {
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.auth-form-container .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.auth-form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* PT Selector (in split form) */
.auth-form-container .pt-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-container .pt-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}

.auth-form-container .pt-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.auth-form-container .pt-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.auth-form-container .pt-option input[type="radio"] {
  display: none;
}

.auth-form-container .pt-option .pt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-form-container .pt-option .pt-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.auth-form-container .pt-option .pt-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
}

/* --- Responsive: Mobile (compact, no-scroll) --- */
@media (max-width: 992px) {
  .auth-left {
    display: none;
  }
  .auth-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  .auth-split {
    height: 100vh;
    height: 100dvh;
    min-height: unset;
  }
  .auth-right {
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #2563eb 100%);
    overflow: hidden;
    align-items: center;
  }
  .auth-form-container {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
  }
  .auth-form-header {
    margin-bottom: 16px;
  }
  .auth-form-header h3 {
    font-size: 1.2rem;
    margin-bottom: 2px;
  }
  .auth-form-header p {
    font-size: 0.82rem;
  }
  /* Shrink inputs from lg to default */
  .auth-form-container .input-group-lg > .form-control,
  .auth-form-container .input-group-lg > .input-group-text,
  .auth-form-container .input-group-lg > .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    min-height: unset;
  }
  .auth-form-container .form-select-lg {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    min-height: unset;
  }
  .auth-form-container .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
  }
  /* Tighten spacing between fields */
  .auth-form-container .mb-3 {
    margin-bottom: 0.6rem !important;
  }
  .auth-form-container .mb-4 {
    margin-bottom: 0.75rem !important;
  }
  /* Compact PT selector */
  .auth-form-container .pt-selector {
    gap: 5px;
  }
  .auth-form-container .pt-option {
    padding: 8px 12px;
    gap: 8px;
  }
  .auth-form-container .pt-option .pt-name {
    font-size: 0.82rem;
  }
  .auth-form-container .pt-option .pt-code {
    font-size: 0.7rem;
    padding: 1px 6px;
  }
  .auth-form-container .pt-option .pt-dot {
    width: 10px;
    height: 10px;
  }
  /* Shrink submit button from lg */
  .auth-form-container .btn-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  .auth-form-container .btn-lg.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  /* Compact footer */
  .auth-form-footer {
    margin-top: 12px;
    padding-top: 12px;
  }
  .auth-form-footer small {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .auth-right {
    padding: 12px;
  }
  .auth-form-container {
    padding: 20px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .auth-form-header {
    margin-bottom: 12px;
  }
  .auth-form-header h3 {
    font-size: 1.1rem;
  }
  .auth-form-header p {
    font-size: 0.78rem;
  }
  .auth-form-container .mb-3 {
    margin-bottom: 0.5rem !important;
  }
  .auth-form-container .mb-4 {
    margin-bottom: 0.6rem !important;
  }
  .auth-form-container .pt-option {
    padding: 7px 10px;
  }
  .auth-form-footer {
    margin-top: 10px;
    padding-top: 10px;
  }
}

/* Extra-short screens (small phones, landscape) */
@media (max-height: 700px) and (max-width: 992px) {
  .auth-right {
    padding: 8px;
  }
  .auth-form-container {
    padding: 16px 18px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .auth-form-header {
    margin-bottom: 8px;
  }
  .auth-form-header h3 {
    font-size: 1.05rem;
  }
  .auth-form-header p {
    font-size: 0.75rem;
  }
  .auth-form-container .mb-3 {
    margin-bottom: 0.35rem !important;
  }
  .auth-form-container .mb-4 {
    margin-bottom: 0.5rem !important;
  }
  .auth-form-container .form-label {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
  }
  .auth-form-container .input-group-lg > .form-control,
  .auth-form-container .input-group-lg > .input-group-text,
  .auth-form-container .input-group-lg > .btn {
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
  }
  .auth-form-container .pt-selector {
    gap: 3px;
  }
  .auth-form-container .pt-option {
    padding: 5px 8px;
  }
  .auth-form-container .btn-lg {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  .auth-form-footer {
    margin-top: 8px;
    padding-top: 8px;
  }
}

/* ============================================
   Unit Cards (Marketing Siteplan)
   ============================================ */

.unit-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.unit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.unit-card.status-open { border-color: var(--success); }
.unit-card.status-booked { border-color: var(--warning); background: #fffbeb; }
.unit-card.status-batal_booking { border-color: #f87171; background: #fef2f2; }
.unit-card.status-akad { border-color: var(--primary); background: var(--primary-light); }
.unit-card.status-sp3k_proses { border-color: var(--info); background: #ecfeff; }
.unit-card.status-sp3k_approved { border-color: #7c3aed; background: #f5f3ff; }
.unit-card.status-selesai { border-color: var(--secondary); background: #f9fafb; }
.unit-card.status-komplain { border-color: var(--danger); background: #fef2f2; }

.unit-card .unit-number {
  font-weight: 700;
  font-size: 0.9rem;
}

.unit-card .unit-status {
  font-size: 0.7rem;
  margin-top: 4px;
}

.unit-card .unit-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
  .content-area {
    padding: 16px;
  }
}

/* ============================================
   Company Indicator (Navbar)
   ============================================ */

.company-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--company-color, var(--primary)) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--company-color, var(--primary)) 20%, transparent);
}

.company-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--company-color, var(--primary));
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--company-color, var(--primary)) 40%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--company-color, var(--primary)) 10%, transparent); }
}

.company-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.company-code {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.navbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

/* ============================================
   Company Switch Button & Dropdown
   ============================================ */

.company-switch-btn {
  background: color-mix(in srgb, var(--company-color, var(--primary)) 10%, white);
  border: 1px solid color-mix(in srgb, var(--company-color, var(--primary)) 25%, transparent);
  color: var(--company-color, var(--primary));
  font-weight: 500;
  font-size: 0.78rem;
}

.company-switch-btn:hover {
  background: color-mix(in srgb, var(--company-color, var(--primary)) 18%, white);
  border-color: var(--company-color, var(--primary));
  color: var(--company-color, var(--primary));
}

.company-dropdown {
  min-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 4px;
}

.company-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  transition: var(--transition);
}

.company-dropdown-item:hover {
  background: var(--light);
}

.company-dropdown-item.active {
  background: color-mix(in srgb, var(--item-color, var(--primary)) 10%, white);
  font-weight: 600;
}

.company-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.company-item-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.company-item-name {
  font-size: 0.82rem;
}

.company-item-code {
  font-size: 0.7rem;
}

/* ============================================
   Sidebar Company Card
   ============================================ */

.sidebar-company-stripe {
  height: 2px;
  width: 100%;
}

.sidebar-company-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 8px 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-company-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-company-info {
  overflow: hidden;
  min-width: 0;
}

.sidebar-company-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-company-meta {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

/* ============================================
   Dashboard Company Banner
   ============================================ */

.company-banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--banner-color, var(--primary)) 8%, white) 0%,
    color-mix(in srgb, var(--banner-color, var(--primary)) 14%, white) 100%);
  border: 1px solid color-mix(in srgb, var(--banner-color, var(--primary)) 20%, transparent);
  border-left: 3px solid var(--banner-color, var(--primary));
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Dynamic Theme Color Accents
   ============================================ */

.nav-item .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.11);
  border-left-color: var(--pt-color, var(--primary));
  font-weight: 700;
}

.nav-item .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-left-color: color-mix(in srgb, var(--pt-color, var(--primary)) 50%, transparent);
}

/* Override sidebar nav styles for Bootstrap .nav-tabs used in page content */
.nav-tabs .nav-link {
  color: var(--bs-body-color, #333);
  background: transparent;
  border-left: none;
}
.nav-tabs .nav-link:hover {
  color: var(--bs-primary, #0d6efd);
  background: transparent;
  border-left-color: transparent;
}
.nav-tabs .nav-link.active {
  color: var(--bs-primary, #0d6efd);
  background: #fff;
  border-left-color: transparent;
  font-weight: 500;
}

/* ============================================
   Global Modal Scroll Fix
   ============================================ */
.modal-dialog {
  max-height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
}
.modal-content {
  max-height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: auto;
}
.modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
}
.modal-header,
.modal-footer {
  flex-shrink: 0;
}
