/* ============================================================
   Sistemi i Parkingut MPFVLÇ — stil i përbashkët
   ============================================================ */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #d9dee5;
  --text: #1a2233;
  --muted: #5b6577;
  --primary: #0b3d91;
  --primary-hover: #082d6d;
  --danger: #c62828;
  --danger-hover: #9c1f1f;
  --success: #1b7a3a;
  --warning: #b26a00;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.app-header {
  background: var(--primary);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.app-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.app-header .subtitle {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}
.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.form-field input,
.form-field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.15);
}
.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: var(--danger-hover); }
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f0f2f5; }
.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: #f7f9fc;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
tbody tr:hover { background: #fafbfd; }
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Status badges ne tabele */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-active {
  background: #d7f0dd;
  color: var(--success);
}
.status-expired {
  background: #fde0e0;
  color: var(--danger);
}
.status-warning {
  background: #ffedcc;
  color: var(--warning);
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.login-card h1 {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: var(--primary);
}
.login-card .subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.login-card .form-field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; }

/* ---------- Alerts / Messages ---------- */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert-error {
  background: #fde0e0;
  color: var(--danger);
  border: 1px solid #f5b5b5;
}
.alert-success {
  background: #d7f0dd;
  color: var(--success);
  border: 1px solid #a8dcb7;
}

/* ---------- QR Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.modal h2 {
  margin: 0 0 16px 0;
  color: var(--primary);
}
.modal-qr {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.modal-info {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Hidden utility ---------- */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .container { padding: 12px; }
  .card { padding: 14px; }
  .app-header { padding: 12px 16px; }
  th, td { padding: 8px 6px; font-size: 13px; }
}
