:root {
  --navy: #0f2540;
  --navy-2: #16345a;
  --accent: #0b6bcb;
  --accent-dark: #0954a1;
  --bg: #f1f4f8;
  --card: #ffffff;
  --text: #1c2a3a;
  --muted: #64748b;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / navigation */
.topbar { background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; padding: 1rem 0; font-weight: 600; font-size: 1.1rem; letter-spacing: .02em; }
.brand svg { width: 40px; height: 20px; }
.brand small { display: block; font-weight: 400; font-size: .75rem; color: #9fb3cc; letter-spacing: .06em; text-transform: uppercase; }
nav a { color: #cbd8e8; text-decoration: none; padding: 1.3rem 1rem; display: inline-block; font-size: .95rem; border-bottom: 3px solid transparent; }
nav a:hover { color: #fff; background: var(--navy-2); }
nav a.active { color: #fff; border-bottom-color: #4aa3ff; }

/* Layout */
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; font-size: 1.7rem; color: var(--navy); }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem; border-top: 1px solid var(--border); background: #fff; }

/* Hero (start page) */
.hero { background: linear-gradient(120deg, var(--navy), var(--accent)); color: #fff; border-radius: 12px; padding: 3rem 2.5rem; margin-bottom: 2rem; }
.hero h1 { margin: 0 0 .5rem; font-size: 2.2rem; }
.hero p { margin: 0; max-width: 560px; color: #dbe9f9; font-size: 1.1rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(15,37,64,.06); }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15,37,64,.12); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: #e6f0fb; color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.card .icon svg { width: 24px; height: 24px; }
.card h2 { margin: 0 0 .35rem; font-size: 1.2rem; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .more { display: inline-block; margin-top: 1rem; color: var(--accent); font-weight: 600; font-size: .9rem; }

/* Tables */
.table-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(15,37,64,.06); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8fafc; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f3f8fe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-note { color: var(--muted); font-size: .85rem; margin-top: .75rem; }

/* Buttons, forms */
.btn { display: inline-block; font: inherit; font-size: .9rem; font-weight: 600; padding: .45rem 1rem; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-sm { padding: .3rem .8rem; font-size: .85rem; }
.form-card { max-width: 520px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.75rem; box-shadow: 0 1px 3px rgba(15,37,64,.06); }
.form-card label { display: block; margin-top: 1rem; font-weight: 600; font-size: .9rem; color: var(--navy); }
.form-card label:first-of-type { margin-top: 0; }
.form-card input { width: 100%; margin-top: .3rem; padding: .6rem .75rem; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.form-card input:focus { outline: 2px solid #9cc9f5; border-color: var(--accent); }
.form-actions { margin-top: 1.5rem; display: flex; gap: .75rem; }
.error { margin-top: 1rem; padding: .6rem .9rem; background: #fdecec; color: #b42318; border-radius: 6px; font-size: .9rem; }

@media (max-width: 640px) {
  .hero { padding: 2rem 1.25rem; }
  .hero h1 { font-size: 1.7rem; }
  nav a { padding: .8rem .7rem; }
}

/* Customer profile pictures */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: inline-block; vertical-align: middle; }
.avatar-lg { width: 120px; height: 120px; }
.avatar-empty { display: flex; align-items: center; justify-content: center; color: #64748b; font-size: .8rem; text-align: center; }
.profile-details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 1.25rem 0 0; }
.profile-details dt { font-weight: 600; color: #64748b; }
.profile-details dd { margin: 0; }
.profile-table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; }
.profile-table th, .profile-table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.profile-table th { width: 10rem; color: #64748b; font-weight: 600; }
.profile-subtitle { margin: 1.75rem 0 0; font-size: 1.1rem; }
