/* Login Page */
.login-page {
  background: linear-gradient(135deg, #1a1c2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}
.login-container .card {
  border: none;
  border-radius: 12px;
}

/* Layout */
body { padding-top: 56px; }
.sidebar {
  width: 220px;
  min-height: calc(100vh - 56px);
  position: fixed;
  top: 56px;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  transition: width 0.2s;
}
.sidebar .nav-link {
  color: #adb5bd;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-left-color: #0d6efd;
}
.sidebar .nav-link i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}
.page-content {
  margin-left: 220px;
  width: calc(100% - 220px);
  min-height: calc(100vh - 56px);
}

/* Stats Cards */
.stat-card {
  border: none;
  border-radius: 10px;
  transition: transform 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.8;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Tables */
.table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  border-bottom-width: 1px;
}

/* Table headers */
.table thead th {
  background: #fff;
}

/* Toast tweaks */
#toastBox .toast {
  min-width: 280px;
  pointer-events: auto;
}

/* Status Badges */
.badge-in-transit,
.badge-arrived,
.badge-cleared,
.badge-in-stock,
.badge-completed,
.badge-pending,
.badge-partial,
.badge-paid {
  border-radius: 50rem;
  padding: 0.4em 0.8em;
  font-size: 0.8em;
}
.badge-in-transit::before,
.badge-arrived::before,
.badge-cleared::before,
.badge-in-stock::before,
.badge-completed::before,
.badge-pending::before,
.badge-partial::before,
.badge-paid::before {
  font-family: 'bootstrap-icons';
  margin-right: 0.35em;
  font-style: normal;
}
.badge-in-transit { background-color: #ffc107; color: #000; }
.badge-in-transit::before { content: "\f5ea"; }
.badge-arrived { background-color: #17a2b8; color: #fff; }
.badge-arrived::before { content: "\f1bc"; }
.badge-cleared { background-color: #28a745; color: #fff; }
.badge-cleared::before { content: "\f26b"; }
.badge-in-stock { background-color: #6f42c1; color: #fff; }
.badge-in-stock::before { content: "\f685"; }
.badge-completed { background-color: #6c757d; color: #fff; }
.badge-completed::before { content: "\f26f"; }
.badge-pending { background-color: #ffc107; color: #000; }
.badge-pending::before { content: "\f293"; }
.badge-partial { background-color: #fd7e14; color: #fff; }
.badge-partial::before { content: "\f288"; }
.badge-paid { background-color: #28a745; color: #fff; }
.badge-paid::before { content: "\f26b"; }

/* DGFT Progress bars */
.dgft-progress {
  height: 24px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Form tabs */
.nav-tabs .nav-link { font-size: 0.9rem; }

/* Cards */
.card { border-radius: 10px; border: 1px solid #e9ecef; }
.card-header { font-weight: 600; }

/* Charts */
.chart-container {
  position: relative;
  height: 280px;
}

/* Collapsible Sidebar */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link i { margin-right: 0; }
.sidebar.collapsed .nav-link { text-align: center; padding: 10px 0; justify-content: center; }
.page-content.expanded { margin-left: 60px; width: calc(100% - 60px); }

/* Navbar Search */
.navbar-search { max-width: 360px; }
.navbar-search .form-control:focus {
  background-color: #343a40;
  color: #f8f9fa;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* Quick Actions FAB */
.fab-container {
  position: fixed;
  bottom: 40px;
  right: 24px;
  z-index: 1040;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #0d6efd;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
  pointer-events: auto;
}
.fab-btn:hover { background: #0b5ed7; }
.fab-btn.open { transform: rotate(45deg); background: #dc3545; }
.fab-btn.open:hover { background: #bb2d3b; }
.fab-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
}
.fab-actions.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fab-action {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.fab-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #212529;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.fab-action-label {
  background: #212529;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar .nav-link span { display: none; }
  .sidebar .nav-link i { margin-right: 0; }
  .sidebar .nav-link { text-align: center; padding: 10px 0; justify-content: center; }
  .page-content { margin-left: 60px; width: calc(100% - 60px); }
}
