body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  min-width: 250px;
  max-width: 250px;
  background: #198754; /* Green theme */
  color: white;
  transition: all 0.3s;
}

.sidebar .nav-link {
  color: white;
}

.sidebar .nav-link:hover {
  background: #146c43;
}

.content {
  flex-grow: 1;
  padding: 20px;
}

/* Mobile view */
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    left: -250px;
    top: 0;
    height: 100%;
    z-index: 1000;
  }
  .sidebar.active {
    left: 0;
  }
}

/* Responsive adjustments for Customers page */
@media (max-width: 576px) {
    .card-body form .form-label {
        font-size: 0.9rem; /* Smaller labels on tiny screens */
    }

    .card-body form input,
    .card-body form select {
        font-size: 0.9rem; /* Smaller inputs */
    }

    #customersTable td,
    #customersTable th {
        font-size: 0.85rem; /* Table font smaller */
        padding: 0.3rem;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .editBtn, .deleteBtn {
        padding: 0.25rem 0.5rem; /* smaller buttons */
        font-size: 0.8rem;
    }
}

.dashboard-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap; /* allows stacking on small screens */
}

/* Cards column */
.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 400px; /* min width before wrapping */
}

/* Each card */
.dashboard-cards .card {
  flex: 0 0 20%; /* 5 cards in a row */
  min-width: 150px;
}

/* Chart */
.dashboard-chart {
  flex: 1 1 400px;
  min-width: 300px;
  height: 100%;
}

/* Small screens: stack vertically */
@media (max-width: 768px) {
  .dashboard-flex {
    flex-direction: column;
  }
  .dashboard-cards .card {
    flex: 1 1 100%;
  }
  .dashboard-chart {
    width: 100%;
    height: 300px;
  }
}
.release-history-row {
  background-color: #f8f9fa;
}
.release-history-container {
  border-top: 2px solid #dee2e6;
}
.history-toggle {
  transition: all 0.3s ease;
}

.dropdown-item {
  position: relative;
}

.dropdown-item:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: -30px;
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1060;
  font-size: 0.875rem;
}


/* Loading spinner styles */
.btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Ensure proper spacing between text and spinner */
.btn .btn-text {
  display: inline-block;
}

.btn .spinner-border-sm {
  margin-left: 0.5rem;
}


/* ============================================ */
/* COLLAPSIBLE SIDEBAR - ICON RAIL (DESKTOP)    */
/* ============================================ */

.sidebar {
    transition: all 0.3s ease;
    overflow-x: hidden;
    white-space: nowrap;
}

.sidebar .sidebar-header h4,
.sidebar .nav-link span {
    transition: opacity 0.2s ease, width 0.3s ease;
    display: inline-block;
    opacity: 1;
    max-width: 200px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 4px;
    gap: 12px;
}

.sidebar .nav-link i {
    min-width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ---- Collapsed state (desktop only) ---- */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar {
        min-width: 60px;
        max-width: 60px;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* Hide text labels in collapsed mode */
    body.sidebar-collapsed .sidebar .sidebar-header span,
    body.sidebar-collapsed .sidebar .nav-link span {
        display: none !important;
    }

    /* Center the header icon when collapsed */
    body.sidebar-collapsed .sidebar .sidebar-header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    body.sidebar-collapsed .sidebar .sidebar-header i {
        display: inline-block;
        font-size: 1.5rem;
        margin: 0;
        text-align: center;
    }

    body.sidebar-collapsed .sidebar .nav-link {
        justify-content: center;
        padding: 12px 0;
    }

    body.sidebar-collapsed .sidebar hr {
        margin: 12px 4px;
    }

    /* Tooltip on hover */
    body.sidebar-collapsed .sidebar .nav-link {
        position: relative;
    }
    body.sidebar-collapsed .sidebar .nav-link::after {
        content: attr(data-title);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 12px;
        padding: 6px 12px;
        background: #1f2937;
        color: #fff;
        border-radius: 6px;
        font-size: 0.8rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 1100;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    body.sidebar-collapsed .sidebar .nav-link:hover::after {
        opacity: 1;
    }

    /* Toggle floating button (desktop) */
    .sidebar-toggle-btn {
        position: fixed;
        top: 15px;
        left: 265px;
        z-index: 1050;
        width: 38px;
        height: 38px;
        border-radius: 8px;
        border: none;
        background: #198754;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        transition: left 0.3s ease, background 0.2s ease;
        cursor: pointer;
    }
    .sidebar-toggle-btn:hover {
        background: #146c43;
    }
    body.sidebar-collapsed .sidebar-toggle-btn {
        left: 75px;
    }
}

/* Hide desktop toggle on mobile */
@media (max-width: 768px) {
    .sidebar-toggle-btn {
        display: none !important;
    }
}