/* BAG Admin Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #111827;
  --bg-card: #1f2937;
  --bg-sidebar: #0f172a;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: #374151;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Layout */
.layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* Header */
.admin-header {
  height: 60px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
}

.logo.logo-small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}
.logo.logo-small:hover {
  color: var(--text);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav {
  display: flex;
  gap: 1rem;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.header-nav a:hover {
  color: var(--text);
  background: var(--bg-card);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.role-badge.admin {
  background: var(--primary);
}

.role-badge.employee {
  background: var(--success);
}

.logout-btn {
  color: var(--text-muted);
  text-decoration: none;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-icon {
  font-size: 1.25rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
}

.stat-icon {
  font-size: 2rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 1.125rem;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem !important;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.upcoming {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-badge.sold {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

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

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

/* Auth Page */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-sidebar) 100%);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.auth-box {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.auth-logo {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.auth-box h1 {
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

\r\n/* LiveAuctioneers stream log */
.la-log {
  max-height: 420px;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #0b1220;
  color: #d1d5db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Card body */
.card-body {
  padding: 1.5rem;
}

/* Form controls */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Import page specific */
.import-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.import-form .form-group {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.import-form input[type="number"] {
  width: 100px;
  -moz-appearance: textfield;
}

.import-form input[type="number"]::-webkit-outer-spin-button,
.import-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Folder path */
.folder-path {
  background: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.folder-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.folder-path code {
  background: transparent;
  padding: 0;
  color: var(--primary);
  font-size: 0.875rem;
}

/* File list */
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 0.25rem;
}

.file-list li:hover {
  background: rgba(255, 255, 255, 0.02);
}

.file-list .file-name {
  font-size: 0.9rem;
  color: var(--text);
}

.file-list .badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  min-width: 28px;
  text-align: center;
  background: var(--bg);
  color: var(--text-muted);
}

.file-list .badge.bg-success {
  background: var(--success);
  color: white;
}

.file-list .badge.bg-danger {
  background: var(--error);
  color: white;
}

/* Log output */
.log-output {
  max-height: 400px;
  min-height: 200px;
  overflow-y: auto;
  background: #0d1117;
  color: #c9d1d9;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* Button variants */
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline-secondary:hover {
  background: var(--bg);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Code */
code {
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: var(--primary);
}
/* ── Thin, pretty scrollbars (global: /shipping panels, /emails lists, etc.) ── */
* { scrollbar-width: thin; scrollbar-color: rgba(127,127,127,0.35) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(127,127,127,0.30); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(127,127,127,0.55); }
*::-webkit-scrollbar-corner { background: transparent; }
