/* Override container-xxl max-width for wider displays */
@media (min-width: 1400px) {
    .container-xxl {
        max-width: 1600px;
    }
}

/* SIM Card Status Badges - Bootstrap doesn't have these specific colors */

/* Status badge base style */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* In Use - Blue badge */
.status-in-use,
.badge-status-in-use {
    background-color: #cce5ff !important;
    color: #004085 !important;
}

/* Stock - Green badge */
.status-stock,
.badge-status-stock {
    background-color: #d4edda !important;
    color: #155724 !important;
}

/* Lost - Red badge */
.status-lost,
.badge-status-lost {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Recalled - Yellow badge */
.status-recalled,
.badge-status-recalled {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

/* Terminated - Gray badge */
.status-terminated,
.badge-status-terminated {
    background-color: #d6d8d9 !important;
    color: #1b1e21 !important;
}

/* Unknown - Light gray badge */
.status-unknown,
.badge-status-unknown {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
}

/* Legacy status classes (for backward compatibility) */
.status-available {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.status-in_use {
    background-color: #cce5ff !important;
    color: #004085 !important;
}

.status-suspended {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.status-expired {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Toast notification styling */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 9999;
    display: none;
}

.toast.toast-success {
    background-color: #28a745;
}

.toast.toast-error {
    background-color: #dc3545;
}

.toast.toast-info {
    background-color: #17a2b8;
}

/* Page title styling if Bootstrap h1/h2 doesn't match */
.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
}

/* SIM Table Column Sizing - Flexbox with Min-Width */
#sims-table {
    table-layout: auto;
    min-width: 100%;
}

#sims-table th,
#sims-table td {
    white-space: nowrap;
    vertical-align: middle;
}

/* Fixed-width columns - badges, buttons, IP addresses */
#sims-table th:nth-child(1),  /* ICCID */
#sims-table th:nth-child(5),  /* Data Plan */
#sims-table th:nth-child(8) { /* Device Name */
    min-width: 130px;
}

#sims-table th:nth-child(2),  /* Phone Number */
#sims-table th:nth-child(6),  /* IP */
#sims-table th:nth-child(7) { /* Project Code */
    min-width: 110px;
}

#sims-table th:nth-child(3),  /* Status */
#sims-table th:nth-child(4) { /* Operator */
    min-width: 90px;
}

#sims-table th:nth-child(9) {  /* Actions */
    min-width: 140px;
    text-align: center;
}

#sims-table td:last-child {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #sims-table th:nth-child(5),  /* Data Plan */
    #sims-table th:nth-child(8) { /* Device Name */
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    #sims-table th,
    #sims-table td {
        min-width: 80px;
    }
}

/* Status Cards - Prevent text wrapping to fit 6 cards in one row */
.status-card {
    min-width: 0;
}

.status-card .card-body {
    padding: 0.5rem;
}

.status-card .card-label {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.status-card .display-6 {
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

/* User Dropdown Styles */
.navbar .user-dropdown-toggle {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
}

.navbar .user-dropdown-toggle:hover,
.navbar .user-dropdown-toggle:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar .dropdown-menu {
  min-width: 14rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar .dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.navbar .dropdown-item i {
  font-size: 1.125rem;
  width: 1.5rem;
  opacity: 0.6;
}

.navbar .dropdown-item:hover i {
  opacity: 1;
}

.navbar .user-email {
  font-size: 0.875rem;
  font-weight: 500;
}

.navbar .user-greeting {
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.6;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
  .navbar .user-dropdown {
    margin-top: 0.5rem;
  }
}
