/* public/assets/css/main.css */
/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  /* Colors */
  --primary: #0f3460;
  --primary-light: #1a4a8a;
  --primary-dark: #0a2340;
  --accent: #e94560;
  --accent-light: #ff6b81;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --info: #74b9ff;

  /* Sidebar */
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --sidebar-active: #0f3460;
  --sidebar-text: #a0a0b0;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;

  /* General Backgrounds & Typography */
  --bg-main: #f0f2f5;
  --bg-card: #ffffff;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --border-color: #e0e0e0;
  --border-radius: 10px;
  --border-radius-sm: 6px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;

  /* Font sizes */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

small { font-size: var(--font-size-sm); color: var(--text-secondary); }
strong { font-weight: 600; }

/* Grid / Flex Layout System */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Helper Grid column classes */
.col-12 { width: 100%; padding: 0 15px; }
.col-8 { width: 66.666%; padding: 0 15px; }
.col-6 { width: 50%; padding: 0 15px; }
.col-4 { width: 33.333%; padding: 0 15px; }
.col-3 { width: 25%; padding: 0 15px; }

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled {
  background-color: #f5f6fa;
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Custom Checkbox/Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.form-check-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn:disabled {
  background-color: var(--text-muted);
  color: #ffffff;
  border-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-primary { background-color: var(--primary); color: #ffffff; }
.btn-success { background-color: var(--success); color: #ffffff; }
.btn-danger { background-color: var(--danger); color: #ffffff; }
.btn-warning { background-color: var(--warning); color: #2d3436; }
.btn-info { background-color: var(--info); color: #ffffff; }

/* Outlined buttons */
.btn-outline-primary { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: #ffffff; }

.btn-outline-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-outline-danger:hover { background: var(--danger); color: #ffffff; }

.btn-outline-success { border-color: var(--success); color: var(--success); background: transparent; }
.btn-outline-success:hover { background: var(--success); color: #ffffff; }

/* Button Sizes */
.btn-sm { padding: 6px 12px; font-size: var(--font-size-xs); }
.btn-lg { padding: 14px 28px; font-size: var(--font-size-base); }
.btn-icon { padding: 10px; border-radius: 50%; }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background-color: var(--bg-card);
}

.table th {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 500;
  text-align: left;
  padding: 12px 16px;
  font-size: var(--font-size-sm);
  border-bottom: 2px solid var(--primary-dark);
}

.table td {
  padding: 12px 16px;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(even) {
  background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
  background-color: rgba(15, 52, 96, 0.03);
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 15px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid var(--border-color);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: 20px;
  text-align: center;
  white-space: nowrap;
}

.badge-success { background-color: rgba(0, 184, 148, 0.15); color: #00b894; }
.badge-danger { background-color: rgba(225, 112, 85, 0.15); color: #e17055; }
.badge-warning { background-color: rgba(253, 203, 110, 0.2); color: #d68910; }
.badge-info { background-color: rgba(116, 185, 255, 0.15); color: #0984e3; }

/* Status Indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.status-indicator::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-active::before { background-color: var(--success); }
.status-inactive::before { background-color: var(--text-muted); }
.status-maintenance::before { background-color: var(--warning); }
.status-blocked::before { background-color: var(--danger); }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #ffffff;
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background-color: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Flash alerts */
.alerts-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  width: 320px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert {
  background-color: #ffffff;
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: slideDownIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-close {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.alert-close:hover {
  color: var(--text-secondary);
}

.alert-success { border-left: 4px solid var(--success); }
.alert-danger { border-left: 4px solid var(--danger); }
.alert-warning { border-left: 4px solid var(--warning); }
.alert-info { border-left: 4px solid var(--info); }

.alert-success .alert-icon { color: var(--success); }
.alert-danger .alert-icon { color: var(--danger); }
.alert-warning .alert-icon { color: var(--warning); }
.alert-info .alert-icon { color: var(--info); }

.alert-content h4 {
  font-size: var(--font-size-sm);
  margin-bottom: 2px;
}

.alert-content p {
  font-size: var(--font-size-xs);
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Progress bar */
.progress {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background-color: #ffffff;
  transition: var(--transition);
}

.pagination-item:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.pagination-item.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.pagination-item.disabled {
  color: var(--text-muted);
  border-color: var(--border-color);
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Utility classes */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Margins */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

/* Padding */
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Flexbox utilities */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.align-center { align-items: center !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

.w-100 { width: 100% !important; }
.w-50 { width: 50% !important; }

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }

/* Custom Scrollbar for modern design */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}
