:root {
  color-scheme: light dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #0f172a;
  color: #f8fafc;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: min(1100px, 95vw);
  margin: 32px auto;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

header {
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.brand {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #0f172a;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

nav a {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  color: #cbd5f5;
  transition: background 0.2s ease, color 0.2s ease;
}

.user-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #f8fafc;
  font-weight: 500;
}

nav a.active,
nav a:hover {
  background: rgba(96, 165, 250, 0.16);
  color: #f1f5f9;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.35);
}

.view-container {
  padding: clamp(20px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: #cbd5f5;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

table th,
table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.overdue {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.status-pill.upcoming {
  background: rgba(134, 239, 172, 0.16);
  color: #bbf7d0;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: none;
  font-size: 0.95rem;
}

.toast.visible {
  display: block;
}

.login-options {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.login-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  color: #94a3b8;
}

.fine-print {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 8px;
}

.maintenance-entry {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.5);
}

.maintenance-entry header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.attachments {
  margin-top: 12px;
}

.attachments ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 6px;
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }

  nav a {
    flex: 1;
    text-align: center;
  }
}
