/* Matches the Marine PPE Compliance Android app's palette for a consistent
   look between the vessel app and the shore-side dashboard. */
:root {
  --navy: #123F67;
  --navy-deep: #0A2740;
  --navy-container: #DCE7F0;
  --green: #28A745;
  --green-container: #D9F2E1;
  --red: #DC3545;
  --red-container: #F9DADD;
  --orange: #F59E0B;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #16232E;
  --text-secondary: #5B6B78;
  --outline: #B9C6D2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--navy);
  color: white;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h1 { font-size: 18px; font-weight: 600; margin: 0; }
.topbar a, .topbar button {
  color: white; text-decoration: none; background: none; border: none;
  font-size: 14px; cursor: pointer; opacity: 0.85;
}
.topbar nav { display: flex; gap: 20px; align-items: center; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.summary-row { display: flex; gap: 12px; margin-bottom: 20px; }
.summary-card {
  flex: 1; background: var(--surface); border-radius: 12px; padding: 16px;
  text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.summary-card .count { font-size: 26px; font-weight: 600; }
.summary-card .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.summary-card.pending .count { color: var(--orange); }
.summary-card.approved .count { color: var(--green); }
.summary-card.rejected .count { color: var(--red); }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--bg); }
th { color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
tr:hover { background: var(--bg); }
a.row-link { color: inherit; text-decoration: none; display: block; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; color: white;
}
.pill.draft, .pill.expired { background: var(--text-secondary); }
.pill.pending_approval { background: var(--orange); }
.pill.approved { background: var(--green); }
.pill.rejected, .pill.closed { background: var(--red); }

.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.filters select, .filters input {
  padding: 8px 12px; border: 1px solid var(--outline); border-radius: 8px; font-size: 14px;
}
.filters button {
  background: var(--navy); color: white; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 14px; cursor: pointer;
}

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy-deep);
}
.login-card {
  background: var(--surface); border-radius: 14px; padding: 32px; width: 340px;
}
.login-card h1 { color: var(--navy); font-size: 20px; margin-bottom: 20px; text-align: center; }
.login-card input {
  width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--outline);
  border-radius: 8px; font-size: 14px;
}
.login-card button {
  width: 100%; background: var(--navy); color: white; border: none; border-radius: 8px;
  padding: 12px; font-size: 15px; cursor: pointer;
}
.error { color: var(--red); font-size: 13px; margin-bottom: 12px; }

.badge-offline { color: var(--red); font-size: 12px; }
.badge-online { color: var(--green); font-size: 12px; }

.detail-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; margin-top: 14px; }
.detail-value { font-size: 15px; margin-top: 2px; }
