/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #5e54d6;
  --primary-hover: #4a42b8;
  --bg-color: #f4f5f7;
  --sidebar-bg: #ffffff;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-item:hover {
  background-color: #f3f4f6;
  color: var(--text-dark);
}

.nav-item.active {
  background-color: #eef2ff;
  color: var(--primary-color);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  color: inherit;
}

.main-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  overflow: hidden;
}

.topbar {
  height: 60px;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.topbar-nav {
  display: flex;
  gap: 24px;
}

.topbar-nav-item {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  padding: 20px 0;
  border-bottom: 3px solid transparent;
}

.topbar-nav-item:hover,
.topbar-nav-item.active {
  color: white;
  border-bottom: 3px solid white;
}

.content-area {
  flex: 1 1;
  padding: 24px;
  overflow: hidden;
  /* Prevent page-level scroll */
  display: flex;
  flex-direction: column;
}

.card-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 24px;
  flex: 1 1;
  /* Take up all space */
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* Let flex shrink */
}

.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
  width: 300px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1 1;
  font-size: 0.875rem;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-size: 0.875rem;
}

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

.btn-primary:hover {
  background-color: #059669;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-dark);
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.table-wrapper {
  flex: 1 1;
  /* Let it expand */
  overflow: auto;
  /* Handle both horizontal and vertical scroll here */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-height: 0;
  /* Crucial for scrolling inside flex container */
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}

.data-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: var(--text-light);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-active {
  background-color: #d1fae5;
  color: #065f46;
}

.status-active::before {
  background-color: #059669;
}

.status-die {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-die::before {
  background-color: #dc2626;
}

.status-hold {
  background-color: #fef3c7;
  color: #92400e;
}

.status-hold::before {
  background-color: #d97706;
}

.status-warning {
  background-color: #ffe4e6;
  color: #be123c;
}

.status-warning::before {
  background-color: #e11d48;
}

/* Custom Scrollbar - ALWAYS VISIBLE */
::-webkit-scrollbar {
  width: 10px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  border: 3px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

::-webkit-scrollbar-corner {
  background: #f1f5f9;
}
/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/modal.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/responsive.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   RESPONSIVE CSS - Production Mode
   Global mobile responsiveness for viewport widths ≤ 768px.
   ============================================================ */

/* ---- Default Hiding (Desktop) ---- */
.hamburger-btn,
.sidebar-close-btn {
  display: none;
}

/* ---- Mobile Breakpoint (≤ 768px) ---- */
@media (max-width: 768px) {

  /* === BODY & LAYOUT === */
  body, body.draft-mobile {
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  /* === SIDEBAR: Hidden by default, shown via toggle === */
  .sidebar, body.draft-mobile .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important;
    width: 280px !important;
    height: 100vh !important;
    height: 100dvh !important;
    transition: left 0.3s ease !important;
    z-index: 1000 !important;
    box-shadow: none !important;
  }

  .sidebar.sidebar-open, body.draft-mobile .sidebar.sidebar-open {
    left: 0 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
  }

  /* Sidebar overlay backdrop */
  .sidebar-overlay, body.draft-mobile .sidebar-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 999 !important;
  }

  .sidebar-overlay.sidebar-overlay-visible, body.draft-mobile .sidebar-overlay.sidebar-overlay-visible {
    display: block !important;
  }

  /* Hamburger button */
  .hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    position: fixed !important;
    top: 7px !important;
    left: 10px !important;
    z-index: 1000 !important;
  }

  .hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  /* Close button inside sidebar */
  .sidebar-close-btn {
    display: flex !important;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
  }

  /* === MAIN LAYOUT === */
  .main-layout {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* === TOPBAR === */
  .topbar {
    height: auto !important;
    min-height: 50px;
    padding: 8px 12px 8px 56px !important;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .topbar > div:first-child {
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }

  .topbar strong {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .user-profile {
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }

  .user-profile span {
    font-size: 0.72rem !important;
  }

  .user-profile .btn {
    padding: 3px 8px !important;
    font-size: 11px !important;
  }

  /* === CONTENT AREA === */
  .content-area {
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* === CARD CONTAINER === */
  .card-container {
    padding: 12px;
    border-radius: 8px;
  }

  /* === HEADER CONTROLS (Search + Buttons) === */
  .header-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 12px;
  }

  /* Make the inner flex containers also stack vertically */
  .header-controls > div {
    flex-wrap: wrap !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .search-box {
    width: 100% !important;
    max-width: 100% !important;
    flex: unset !important;
  }

  /* === DASHBOARD STAT CARDS === */
  /* Target the flex container for stat cards */
  div[style*="display: flex"][style*="gap: '20px'"],
  div[style*="display: flex"][style*="flex-wrap: 'wrap'"] {
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* Force stat cards to full width */
  div[style*="flex: 1"][style*="padding: '24px'"],
  div[style*="padding: '24px'"][style*="background"] {
    flex: none !important;
    width: 100% !important;
    min-width: 100% !important;
  }

  /* === DATA TABLE === */
  .table-wrapper {
    border-radius: 6px;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    width: 100%;
  }

  .data-table {
    font-size: 0.75rem;
    min-width: 600px; /* Force minimum width to trigger scroll */
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  /* Remove sticky positioning on mobile for cleaner scroll */
  .data-table th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .data-table td[style*="position: sticky"],
  .data-table th[style*="position: sticky"][style*="left"] {
    position: static !important;
  }

  /* === BUTTONS === */
  .btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 4px;
    white-space: nowrap;
  }

  /* === MODALS === */
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 14px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* === FORM INPUTS (Import modal side-by-side → stack) === */
  .form-group[style*="display: flex"] {
    flex-direction: column !important;
  }

  /* === STATUS BADGES === */
  .status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  /* === PAGE TITLE === */
  h2 {
    font-size: 1.1rem;
  }

  /* === LOGIN PAGE FIX === */
  .login-container,
  [class*="login"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
  }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {

  .topbar {
    padding: 6px 10px 6px 52px !important;
  }

  .topbar strong {
    font-size: 0.75rem;
  }

  .content-area {
    padding: 8px;
  }

  .card-container {
    padding: 10px;
  }

  .data-table {
    font-size: 0.7rem;
    min-width: 500px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
  }

  h2 {
    font-size: 1rem;
  }

  .header-controls .btn {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
}

