/* ============================================================
   SLASHCODE ATTENDANCE ADMIN — Design System
   Premium dark theme with glassmorphism & micro-interactions
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: rgba(30, 41, 59, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  --accent-success: #10b981;
  --accent-success-glow: rgba(16, 185, 129, 0.2);
  --accent-warning: #f59e0b;
  --accent-warning-glow: rgba(245, 158, 11, 0.2);
  --accent-danger: #f43f5e;
  --accent-danger-glow: rgba(244, 63, 94, 0.2);
  --border-color: rgba(148, 163, 184, 0.1);
  --border-color-hover: rgba(148, 163, 184, 0.2);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Layout --- */
#app-container {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #818cf8, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: var(--accent-primary);
  border-radius: 0 4px 4px 0;
  transition: transform 0.2s ease;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.sidebar-link:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar-link.active {
  color: var(--accent-primary-hover);
  background: rgba(99, 102, 241, 0.12);
}

.sidebar-link.active::before {
  transform: translateY(-50%) scaleY(1);
  background: var(--accent-primary-hover);
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: var(--transition);
}

.sidebar-link:hover svg,
.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  width: 100%;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.btn-logout:hover {
  color: var(--accent-danger);
  background: rgba(244, 63, 94, 0.1);
}

/* --- Main Content --- */
#main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* --- Top Bar --- */
#top-bar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-toggle-btn {
  display: none;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Page Content --- */
#page-content {
  padding: 28px;
  flex: 1;
}

.page-enter {
  animation: fadeIn 0.3s ease forwards;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition-slow);
}

.card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* --- Stat Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.stat-card.stat-primary::before { background: linear-gradient(180deg, var(--accent-primary), var(--accent-primary-hover)); }
.stat-card.stat-success::before { background: linear-gradient(180deg, var(--accent-success), #34d399); }
.stat-card.stat-warning::before { background: linear-gradient(180deg, var(--accent-warning), #fbbf24); }
.stat-card.stat-danger::before  { background: linear-gradient(180deg, var(--accent-danger), #fb7185); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-hover);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-primary .stat-card-icon { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary-hover); }
.stat-success .stat-card-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.stat-warning .stat-card-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.stat-danger .stat-card-icon  { background: rgba(244, 63, 94, 0.15); color: var(--accent-danger); }

.stat-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn:hover::after {
  opacity: 0.06;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--accent-success);
  color: white;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #34d399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
  box-shadow: 0 1px 3px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: #fb7185;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--accent-warning);
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

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

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border-color-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
  padding: 5px;
}

/* --- Data Tables --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: var(--bg-tertiary);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

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

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(51, 65, 85, 0.4);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 6px;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

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

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.modal-body {
  padding: 24px;
}

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

/* --- Toasts --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  min-width: 300px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  border-left: 4px solid transparent;
  font-size: 13px;
}

.toast.toast-success { border-left-color: var(--accent-success); }
.toast.toast-error   { border-left-color: var(--accent-danger); }
.toast.toast-warning { border-left-color: var(--accent-warning); }

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast.toast-success .toast-icon { color: var(--accent-success); }
.toast.toast-error .toast-icon   { color: var(--accent-danger); }
.toast.toast-warning .toast-icon { color: var(--accent-warning); }

.toast-message {
  flex: 1;
  color: var(--text-primary);
}

.toast-dismiss {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-active, .badge-in {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-inactive {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

.badge-used, .badge-out {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-revoked, .badge-expired {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.badge-pending {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary-hover);
}

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

.page-header-actions {
  display: flex;
  gap: 8px;
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

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

.filter-group .form-control {
  padding: 8px 12px;
  font-size: 13px;
}

/* --- Search Input --- */
.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrapper .form-control {
  padding-left: 38px;
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 340px;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(51, 65, 85, 0.6) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-xs);
}

.skeleton-row {
  display: flex;
  gap: 16px;
  padding: 16px;
}

.skeleton-cell {
  height: 16px;
  border-radius: 4px;
  flex: 1;
}

.skeleton-cell.w-sm { max-width: 60px; }
.skeleton-cell.w-md { max-width: 120px; }
.skeleton-cell.w-lg { max-width: 200px; }

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: var(--border-color-hover);
}

.pagination-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

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

.pagination-info {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 8px;
}

/* --- Login Page --- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: loginGlow1 8s ease-in-out infinite alternate;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: loginGlow2 10s ease-in-out infinite alternate;
}

@keyframes loginGlow1 {
  to { transform: translate(-50px, 80px); }
}
@keyframes loginGlow2 {
  to { transform: translate(60px, -60px); }
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #f1f5f9, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.login-card .form-control {
  padding: 12px 16px;
}

.login-card .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.login-error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #fb7185;
  display: none;
}

.login-error.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --- Copy Button --- */
.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.copy-btn:hover {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.copy-btn.copied {
  color: var(--accent-success);
}

/* --- Monospace --- */
.mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
}

/* --- Section title --- */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  margin-top: 28px;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  #main-content {
    margin-left: 0 !important;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  #page-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 16px;
    max-width: calc(100vw - 32px);
  }

  .login-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .data-table {
    font-size: 12px;
  }

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