/*
 * shared.css — Autobahn Motors Group Shared Design System
 * Contains: Google Font import, CSS reset, shared design tokens, and
 * reusable component styles that were previously duplicated across
 * login.html, admin.html, and index.html.
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

/* ── Shared Design Tokens (Dark-first) ────────────────────────────────────── */
:root {
  --gold:          #f5c400;
  --gold-hover:    #e0b300;
  --gold-btn-text: #000000;

  --danger:        #ff4d4f;
  --danger-bg:     rgba(255, 77, 79, 0.12);
  --danger-border: rgba(255, 77, 79, 0.3);
  --danger-text:   #ff7875;

  --success:        #52c41a;
  --success-bg:     rgba(82, 196, 26, 0.12);
  --success-border: rgba(82, 196, 26, 0.3);
  --success-text:   #73d13d;

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-base: 0.25s ease;
}

/* ── Base Typography ──────────────────────────────────────────────────────── */
body {
  font-family: var(--font-family);
  line-height: 1.6;
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Status / Alert Boxes ─────────────────────────────────────────────────── */
.status-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  line-height: 1.4;
  animation: fadeInAlert 0.3s ease;
}

.status-alert.error {
  display: block;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.status-alert.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

/* ── Shared Submit Button Base ────────────────────────────────────────────── */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
  color: var(--gold-btn-text);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(245, 196, 0, 0.35);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Shared Form Elements ─────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

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

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

@keyframes fadeInAlert {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Custom Theme Dialog / Popup Modal ────────────────────────────────────── */
:root {
  --dialog-bg: #ffffff;
  --dialog-border: #e2e8f0;
  --dialog-text: #0f172a;
  --dialog-text-muted: #64748b;
  --dialog-cancel-bg: #f1f5f9;
  --dialog-cancel-border: #cbd5e1;
  --dialog-cancel-text: #334155;
  --dialog-cancel-hover: #e2e8f0;
}

[data-theme="dark"],
body.dark-theme,
html[data-theme="dark"] {
  --dialog-bg: #15151a;
  --dialog-border: rgba(255, 255, 255, 0.12);
  --dialog-text: #f8fafc;
  --dialog-text-muted: #94a3b8;
  --dialog-cancel-bg: rgba(255, 255, 255, 0.06);
  --dialog-cancel-border: rgba(255, 255, 255, 0.12);
  --dialog-cancel-text: #e2e8f0;
  --dialog-cancel-hover: rgba(255, 255, 255, 0.12);
}

.autobahn-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-out;
}

.autobahn-dialog-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.autobahn-dialog-box {
  background: var(--dialog-bg);
  border: 1px solid var(--dialog-border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.autobahn-dialog-backdrop.active .autobahn-dialog-box {
  transform: scale(1) translateY(0);
}

.autobahn-dialog-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.autobahn-dialog-icon svg {
  width: 28px;
  height: 28px;
}

.autobahn-dialog-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.autobahn-dialog-icon.warning {
  background: rgba(245, 196, 0, 0.15);
  color: #f5c400;
  border: 1px solid rgba(245, 196, 0, 0.3);
}

.autobahn-dialog-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.autobahn-dialog-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.autobahn-dialog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dialog-text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.autobahn-dialog-msg {
  font-size: 0.94rem;
  color: var(--dialog-text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 380px;
  word-break: break-word;
}

.autobahn-dialog-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.autobahn-dialog-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.autobahn-dialog-btn-cancel {
  background: var(--dialog-cancel-bg);
  border: 1px solid var(--dialog-cancel-border);
  color: var(--dialog-cancel-text);
}

.autobahn-dialog-btn-cancel:hover {
  background: var(--dialog-cancel-hover);
  transform: translateY(-1px);
}

.autobahn-dialog-btn-confirm {
  border: none;
  color: #000;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
  box-shadow: 0 4px 12px rgba(245, 196, 0, 0.25);
}

.autobahn-dialog-btn-confirm:hover {
  box-shadow: 0 6px 18px rgba(245, 196, 0, 0.4);
  transform: translateY(-1px);
}

.autobahn-dialog-btn-confirm.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.autobahn-dialog-btn-confirm.btn-danger:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.autobahn-dialog-btn-confirm.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.autobahn-dialog-btn-confirm.btn-success:hover {
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45);
}

