:root {
  color-scheme: light;
  --surface: #f6f8fb;
  --ink: #0f172a;
  --muted: #64748b;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
  background:
    radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.18), transparent 32%),
    radial-gradient(circle at 78% 8%, rgba(16, 185, 129, 0.12), transparent 26%),
    radial-gradient(circle at 70% 85%, rgba(99, 102, 241, 0.14), transparent 34%),
    #0b1220;
}

.login-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.login-card {
  box-shadow: 0 35px 90px -30px rgba(2, 8, 23, 0.9);
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-ring 2.2s infinite;
}

.glass-tile {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 14px;
}

.tile-label {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tile-value {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 16px;
}

.form-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.35);
  padding: 13px 15px;
  color: #f8fafc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input::placeholder {
  color: #64748b;
}

.form-input:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  background: rgba(2, 6, 23, 0.5);
}

.app-shell {
  background:
    radial-gradient(circle at 85% -10%, rgba(14, 165, 233, 0.1), transparent 26%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.08), transparent 28%),
    var(--surface);
}

.topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand-mark {
  background: linear-gradient(145deg, #0ea5e9, #0284c7);
  box-shadow: 0 10px 30px -12px rgba(14, 165, 233, 0.9);
}

.tab-button {
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tab-button.active {
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 12px 24px -14px rgba(15, 23, 42, 0.8);
}

.connector-card {
  --accent: #64748b;
  --accent-soft: rgba(100, 116, 139, 0.1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 50px -36px rgba(15, 23, 42, 0.5);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.connector-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent);
}

.connector-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px -36px rgba(15, 23, 42, 0.55);
}

.connector-card.status-available {
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.1);
}

.connector-card.status-preparing {
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.12);
}

.connector-card.status-charging {
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.1);
}

.connector-card.status-paymentpending {
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.11);
}

.connector-card.status-faulted {
  --accent: #ef4444;
  --accent-soft: rgba(239, 68, 68, 0.1);
}

.connector-card.status-unavailable,
.connector-card.status-offline,
.connector-card.status-unknown {
  --accent: #64748b;
  --accent-soft: rgba(100, 116, 139, 0.1);
}

.connector-card.status-suspended,
.connector-card.status-reserved,
.connector-card.status-finishing {
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.1);
}

.connector-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.status-charging .status-badge .dot {
  animation: pulse-ring 1.6s infinite;
}

.metric-box {
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 13px 14px;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  font-weight: 700;
}

.metric-value {
  margin-top: 4px;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.metric-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.action-primary,
.action-secondary,
.action-danger,
.action-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
}

.action-primary {
  background: #0f172a;
  color: white;
}

.action-primary:hover {
  background: #1e293b;
}

.action-secondary {
  background: #e2e8f0;
  color: #334155;
}

.action-secondary:hover {
  background: #cbd5e1;
}

.action-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.action-danger:hover {
  background: #fee2e2;
}

.action-pay {
  background: #ea580c;
  color: white;
}

.action-pay:hover {
  background: #c2410c;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.stat-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: white;
  padding: 18px;
  box-shadow: 0 16px 40px -38px rgba(15, 23, 42, 0.5);
}

.panel {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: white;
  box-shadow: 0 20px 50px -44px rgba(15, 23, 42, 0.55);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(7px);
  animation: fade-in 0.18s ease-out;
}

.modal-panel {
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 24px;
  background: white;
  box-shadow: 0 40px 100px -30px rgba(2, 6, 23, 0.9);
  animation: slide-up 0.22s ease-out;
}

.payment-option {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.payment-option:hover {
  border-color: #94a3b8;
}

.payment-option.active {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.input-light {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 12px 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-light:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.table-shell {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.history-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.history-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.history-table tbody tr:hover {
  background: #f8fafc;
}

.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 280px;
  max-width: 420px;
  border-radius: 16px;
  padding: 14px 16px;
  color: white;
  box-shadow: 0 24px 60px -24px rgba(2, 6, 23, 0.75);
  animation: slide-up 0.2s ease-out;
}

.toast.success {
  background: #065f46;
}

.toast.error {
  background: #991b1b;
}

.toast.info {
  background: #075985;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 10px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmer 1.4s infinite;
}

.soc-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.soc-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
  transition: width 0.35s ease;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 35px 20px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
}

.fade-in {
  animation: fade-in 0.2s ease-out;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@media (max-width: 640px) {
  .modal-panel {
    border-radius: 20px;
  }
  .history-table {
    min-width: 860px;
  }
}

#pay-change-box.invalid {
  border-color: #fecdd3;
  background: #fff1f2;
}

#pay-change-box.invalid .text-emerald-700 {
  color: #be123c;
}

#pay-change-box.invalid #pay-change {
  color: #be123c;
}

#history-custom-dates:not(.hidden) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.modal-backdrop.hidden {
  display: none !important;
}
