/* =========================================================
   UNIVERSAL BUTTON SYSTEM (Strict Standardized Heights & Borders)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  vertical-align: middle;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

/* Control / Panel Header / Filter buttons */
.btn-sm {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 5px;
  gap: 5px;
}

/* Table Row / Inline Micro Actions */
.btn-xs {
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 4px;
  gap: 4px;
}

/* Square / Icon-Only Buttons */
.btn-icon {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0;
  border-radius: 6px;
}

.btn-icon-sm {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0;
  border-radius: 5px;
}

.btn-icon-xs {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  padding: 0;
  border-radius: 4px;
}

/* Button Color Variants - All with exactly 1px border */
.btn-primary {
  background: var(--blue, #1557ff);
  border: 1px solid var(--blue, #1557ff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(21, 87, 255, 0.22);
}
.btn-primary:hover {
  background: var(--blue-hover, #0f46d2);
  border-color: var(--blue-hover, #0f46d2);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--navy, #1e293b);
  border: 1px solid var(--line, #28374d);
  color: var(--ink, #f1f5f9);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--blue, #1557ff);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--surface, #131c2a);
  border: 1px solid var(--line, #28374d);
  color: var(--ink, #f1f5f9);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.btn-danger {
  background: var(--danger, #ff4655);
  border: 1px solid var(--danger, #ff4655);
  color: #fff;
}
.btn-danger:hover {
  background: #e03b49;
  border-color: #e03b49;
  color: #fff;
  text-decoration: none;
}

.btn-success {
  background: var(--success, #1bb68a);
  border: 1px solid var(--success, #1bb68a);
  color: #fff;
}
.btn-success:hover {
  background: #159b75;
  border-color: #159b75;
  color: #fff;
  text-decoration: none;
}

/* Stat Grid (Fragger Dashboard Style) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.stat-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card b {
  display: block;
  font: 700 28px 'Space Grotesk', sans-serif;
  margin-top: 6px;
  color: var(--ink);
}

.stat-card em {
  font-size: 10px;
  color: var(--success);
  font-style: normal;
  margin-top: 4px;
  font-weight: 600;
}

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
}

.panel-header h3 {
  font-size: 18px;
  margin: 0;
}

.panel-header p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(21, 87, 255, 0.02);
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status.available {
  background: #eaf0ff;
  color: var(--blue);
}
.status.available i { background: var(--blue); }

.status.claimed {
  background: #e1f7fc;
  color: #007e9e;
}
.status.claimed i { background: #00b4d8; }

.status.in_progress {
  background: #fff8e7;
  color: #b37400;
}
.status.in_progress i { background: #ffb528; }

.status.completed {
  background: var(--success-bg);
  color: var(--success-text);
}
.status.completed i { background: var(--success); }

.status.locked,
.status.cancelled {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.status.locked i,
.status.cancelled i { background: var(--danger); }

.status.paused {
  background: #edf1f7;
  color: #64748b;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control,
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s;
}

.form-control:focus,
.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 87, 255, 0.12);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  accent-color: var(--blue, #1557ff);
  vertical-align: middle;
}

/* Bulk Allotment Modal Enhancements */
.bulk-acc-list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 4px;
}

.bulk-acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  margin-bottom: 2px;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.12s ease;
  user-select: none;
}

.bulk-acc-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.bulk-acc-row.selected {
  background: rgba(21, 87, 255, 0.09);
  border-color: rgba(21, 87, 255, 0.35);
}

.bulk-acc-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
  text-transform: none !important;
  letter-spacing: normal;
}

.bulk-allot-summary {
  background: rgba(21, 87, 255, 0.06);
  border: 1px solid rgba(21, 87, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
}

.bulk-allot-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: left;
}

.bulk-summary-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 2px;
}

.bulk-summary-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

/* Search and Filters Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.search-input-wrap span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
}

/* Modals (Fragger Style) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 38, 0.75);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: min(520px, calc(100% - 32px));
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 24px 16px 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  z-index: 2;
  transform: translateY(15px);
  transition: transform 0.2s ease;
}

.modal.active .modal-card {
  transform: translateY(0);
}

.modal-card.wide {
  width: min(740px, calc(100% - 32px));
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: 0;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  z-index: 3;
}

#modalTitle {
  flex-shrink: 0;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  padding-right: 28px;
}

#modalBody {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 6px;
  min-height: 50px;
}

.modal-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.modal-actions .btn {
  height: 36px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  padding: 0 18px;
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.25s ease forwards;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--cyan); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline component */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
  margin: 18px 0;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  font-size: 12px;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item time {
  color: var(--muted);
  font-size: 10px;
  display: block;
}

.timeline-item b {
  color: var(--ink);
}

/* Alert Boxes */
.alert-box {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-box.danger {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 70, 85, 0.3);
  color: var(--danger-text);
}

.alert-box.warning {
  background: var(--warning-bg);
  border: 1px solid rgba(255, 181, 40, 0.3);
  color: var(--warning-text);
}

.alert-box.info {
  background: #eaf0ff;
  border: 1px solid rgba(21, 87, 255, 0.2);
  color: #0b265a;
}

/* Responsive */
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}



/* Dark Mode Enhanced Status Badges */
.status.assigned {
  background: #fff8e7;
  color: #b37400;
}
.status.assigned i { background: #ffb528; }

body.dark .status.assigned,
body.dark .status.in_progress {
  background: rgba(255, 181, 40, 0.12);
  color: #ffca60;
  border: 1px solid rgba(255, 181, 40, 0.25);
}
body.dark .status.assigned i,
body.dark .status.in_progress i {
  background: #ffb528;
}

body.dark .status.available {
  background: rgba(21, 87, 255, 0.12);
  color: #70a1ff;
  border: 1px solid rgba(21, 87, 255, 0.25);
}
body.dark .status.available i {
  background: #3b82f6;
}

body.dark .status.completed {
  background: rgba(27, 182, 138, 0.12);
  color: #45d6a7;
  border: 1px solid rgba(27, 182, 138, 0.25);
}
body.dark .status.completed i {
  background: #1bb68a;
}

body.dark .status.locked {
  background: rgba(255, 70, 85, 0.12);
  color: #ff7a86;
  border: 1px solid rgba(255, 70, 85, 0.25);
}
body.dark .status.locked i {
  background: #ff4655;
}

/* Valorant-Style Underline Sub-tabs */
.vault-tabs-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.vault-tabs {
  display: flex;
  gap: 4px;
}

.vault-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  bottom: -1px;
}

.vault-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.vault-tab.active {
  color: #fff;
  border-bottom-color: var(--danger, #ff4655);
}

.vault-tab-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.vault-tab.active .vault-tab-count {
  background: rgba(255, 70, 85, 0.25);
  color: #ff7a86;
}

/* Clean modern rank path */
.rank-path {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rank-arrow {
  color: var(--muted);
  font-size: 12px;
}

