/* ============================================================
   BisOS - Modern UI Theme
   ============================================================ */

/* ---------- Font & Base ---------- */
body {
  background-color: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e;
  min-height: 100vh;
  padding-top: 70px; /* Prevent content from hiding behind fixed navbar */
}

/* ---------- Fixed Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
  padding: 0.75rem 0;
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: #fff !important;
  padding: 0;
}

.navbar-brand span {
  color: #00b4d8;
}

/* Navbar buttons - Desktop */
.navbar .btn {
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

.navbar .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.navbar .btn-success {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

.navbar .btn-success:hover {
  background: #c73652;
  border-color: #c73652;
}

.navbar .btn-outline-danger {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.navbar .btn-outline-danger:hover {
  background: rgba(233, 69, 96, 0.2);
  border-color: #e94560;
  color: #fff;
}

/* ---------- Special Nav Links (Desktop & Mobile) ---------- */
.nav-order {
  background: #e94560;
  color: #fff !important;
  border-radius: 8px;
  padding: 0.4rem 1rem !important;
  font-weight: 600;
  transition: background 0.2s ease;
}

.nav-order:hover {
  background: #c73652 !important;
  color: #fff !important;
}

.nav-logout {
  color: rgba(255, 255, 255, 0.5) !important;
  transition: color 0.2s ease;
}

.nav-logout:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ---------- Mobile Navbar Overlay ---------- */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0.5rem 0;
  }

  body {
    padding-top: 60px;
  }

  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4rem 1.5rem 2rem;
    z-index: 1040;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
  }

  .navbar-collapse.show {
    transform: translateY(0);
  }

  /* Real close button inside the collapse */
  .navbar-close {
    position: fixed;
    top: 0.9rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1050;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0.5rem;
  }

  .navbar-close:hover {
    opacity: 1;
  }

  /* Hide hamburger when menu is open */
  .navbar-toggler[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
  }

  .navbar-toggler {
    z-index: 1050;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.5rem;
  }

  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }

  .navbar-nav .nav-link {
    padding: 0.8rem 0.75rem !important;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: all 0.15s ease;
  }

  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
  }

  .navbar-nav .nav-link.active {
    background: rgba(0, 180, 216, 0.15);
    color: #00b4d8 !important;
  }

  /* Mobile specific overrides for special links */
  .navbar-nav .nav-link.nav-order {
    background: #e94560;
    color: #fff !important;
    font-weight: 600;
    text-align: center;
    border: none;
    margin-top: 0.5rem;
    padding: 0.8rem !important;
  }

  .navbar-nav .nav-link.nav-order:hover {
    background: #c73652 !important;
    color: #fff !important;
  }

  .navbar-nav .nav-link.nav-logout {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
  }

  .navbar-nav .nav-link.nav-logout:hover {
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
  }

  .navbar-text {
    font-size: 0.7rem !important;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Desktop spacing for special links ---------- */
@media (min-width: 992px) {
  .nav-order {
    margin-left: 0.25rem;
  }

  .nav-logout {
    margin-left: 0.25rem;
  }
}

/* ---------- Cards ---------- */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(26, 26, 46, 0.1);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a2e;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: transparent;
  border-top: 1px solid rgba(26, 26, 46, 0.06);
  padding: 1rem 1.5rem;
}

/* ---------- Stats Cards ---------- */
.stats-card {
  text-align: center;
  padding: 1.25rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(26, 26, 46, 0.04);
  transition: all 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 26, 46, 0.08);
}

.stats-card .stats-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.stats-card h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a8aa8;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.stats-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

/* Stats card colors */
.stats-card.primary .stats-icon,
.stats-card.primary h2 {
  color: #00b4d8;
}

.stats-card.success .stats-icon,
.stats-card.success h2 {
  color: #2ecc71;
}

.stats-card.warning .stats-icon,
.stats-card.warning h2 {
  color: #f39c12;
}

.stats-card.danger .stats-icon,
.stats-card.danger h2 {
  color: #e94560;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btn-primary {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}

.btn-primary:hover {
  background: #0f0f1a;
  border-color: #0f0f1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

.btn-success {
  background: #2ecc71;
  border-color: #2ecc71;
  color: #fff;
}

.btn-success:hover {
  background: #27ae60;
  border-color: #27ae60;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-danger {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

.btn-danger:hover {
  background: #c73652;
  border-color: #c73652;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn-outline-primary {
  border-color: #1a1a2e;
  color: #1a1a2e;
}

.btn-outline-primary:hover {
  background: #1a1a2e;
  color: #fff;
}

.btn-outline-secondary {
  border-color: #d0d0d8;
  color: #4a4a6a;
}

.btn-outline-secondary:hover {
  background: #f0f2f5;
  border-color: #b0b0b8;
}

.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

/* ---------- Tables ---------- */
.table {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.table thead th {
  border-bottom: 2px solid rgba(26, 26, 46, 0.06);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #8a8aa8;
  padding: 0.75rem 1rem;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(26, 26, 46, 0.04);
}

.table tbody tr:hover {
  background: rgba(0, 180, 216, 0.03);
}

/* ---------- Badges ---------- */
.badge {
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
}

.badge.bg-warning {
  background: #f39c12 !important;
  color: #fff;
}

.badge.bg-success {
  background: #2ecc71 !important;
}

.badge.bg-danger {
  background: #e94560 !important;
}

.badge.bg-info {
  background: #00b4d8 !important;
}

/* ---------- Forms ---------- */
.form-control {
  border-radius: 8px;
  border: 1px solid #e0e0e8;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-select {
  border-radius: 8px;
  border: 1px solid #e0e0e8;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.9rem;
}

.form-select:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #4a4a6a;
  margin-bottom: 0.3rem;
}

/* ---------- Alerts ---------- */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.alert-info {
  background: rgba(0, 180, 216, 0.08);
  color: #0f3460;
}

.alert-success {
  background: rgba(46, 204, 113, 0.08);
  color: #1a7a4a;
}

.alert-danger {
  background: rgba(233, 69, 96, 0.08);
  color: #a82a45;
}

.alert-warning {
  background: rgba(243, 156, 18, 0.08);
  color: #8a6d0a;
}

/* ---------- Calendar Overrides ---------- */
.fc {
  font-family: inherit !important;
}

.fc .fc-toolbar-title {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
}

.fc .fc-button {
  background: #f0f2f5 !important;
  border: 1px solid #e0e0e8 !important;
  color: #4a4a6a !important;
  border-radius: 8px !important;
  padding: 0.4rem 0.8rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  transition: all 0.2s ease !important;
}

.fc .fc-button:hover {
  background: #e0e0e8 !important;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #1a1a2e !important;
  border-color: #1a1a2e !important;
  color: #fff !important;
}

.fc .fc-daygrid-day {
  border-color: rgba(26, 26, 46, 0.06) !important;
}

.fc .fc-daygrid-day-number {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #4a4a6a !important;
  padding: 0.3rem 0.5rem !important;
}

.fc .fc-daygrid-day.fc-day-today {
  background: rgba(0, 180, 216, 0.04) !important;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: #00b4d8 !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fc .fc-daygrid-day-events {
  min-height: 30px !important;
}

.fc .fc-event {
  border-radius: 4px !important;
  border: none !important;
  padding: 2px 6px !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  margin-bottom: 2px !important;
}

.fc .fc-event:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fc .fc-event .fc-event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Mobile Calendar ---------- */
@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
  }

  .fc .fc-toolbar-title {
    font-size: 1rem !important;
    text-align: center !important;
  }

  .fc .fc-toolbar-chunk {
    display: flex !important;
    justify-content: center !important;
  }

  .fc .fc-button-group {
    flex-wrap: nowrap !important;
  }

  .fc .fc-button {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .fc .fc-daygrid-day {
    min-height: 60px !important;
  }

  .fc .fc-daygrid-day-number {
    font-size: 0.7rem !important;
  }

  .fc .fc-event {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
  }

  .fc .fc-daygrid-day-events {
    min-height: 20px !important;
  }
}

/* ---------- Misc ---------- */
.text-muted {
  color: #8a8aa8 !important;
}

/* ---------- Polish: cards, tables, buttons, focus ---------- */
.card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
  font-weight: 600;
}

.table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid #00b4d8;
  outline-offset: 2px;
}

.form-control:focus,
.form-select:focus {
  border-color: #00b4d8;
  box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.15);
}

.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Print styles — invoices / order detail print cleanly */
@media print {
  .navbar,
  .btn,
  form,
  .d-grid,
  .no-print {
    display: none !important;
  }
  body {
    padding-top: 0;
    background: #fff;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}


.list-group-item {
  border: none;
  border-bottom: 1px solid rgba(26, 26, 46, 0.04);
  padding: 0.75rem 1rem;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item-action:hover {
  background: rgba(0, 180, 216, 0.04);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h5 {
  font-weight: 600;
  color: #1a1a2e;
}

.empty-state p {
  color: #8a8aa8;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* ---------- Welcome Banner ---------- */
.welcome-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.welcome-banner h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.welcome-banner p {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.welcome-banner .btn {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

.welcome-banner .btn:hover {
  background: #c73652;
  border-color: #c73652;
}

.welcome-banner .btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.welcome-banner .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}