/* One Power brand — see one-power-style-guide.md */
:root {
  --primary-1: #27519f;
  --primary-2: #005dff;
  --primary-3: #e8ebef;
  --primary-4: #f7f8fa;
  --navy: #001943;
  --black: #040810;
  --gray: #f2f4f5;
  --white: #ffffff;
  --green: #1a7f4b;
  --red: #b3261e;
  --amber: #9a6700;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--primary-4);
  color: var(--navy);
  font-size: 16px;
  line-height: 1.5;
}

.topbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: var(--white);
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { height: 28px; width: auto; }
.topbar-user { margin-left: auto; font-size: 14px; opacity: .85; }
.topbar-logout { color: var(--white); font-size: 14px; text-decoration: underline; }

.mainnav {
  display: flex; gap: 4px; overflow-x: auto;
  background: var(--primary-1); padding: 6px 12px;
  -webkit-overflow-scrolling: touch;
}
.mainnav a {
  color: var(--white); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 6px; white-space: nowrap;
}
.mainnav a:hover { background: rgba(255,255,255,.15); }

.content { max-width: 860px; margin: 0 auto; padding: 16px; }

h1 { font-size: 26px; margin: 8px 0 16px; }
h2 { font-size: 19px; margin: 24px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.muted { color: #5a6b85; font-size: 14px; }

.card {
  display: block;
  background: var(--white); border: 1px solid var(--primary-3); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
  color: inherit; text-decoration: none;
}
a.card:hover { border-color: var(--primary-2); }
.job-row strong { display: block; }
.job-row span { display: inline-block; margin-right: 8px; font-size: 14px; }

.flash {
  background: #e6f4ea; border: 1px solid var(--green); color: var(--green);
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px;
}
.flash-error { background: #fbeae9; border-color: var(--red); color: var(--red); }

label { display: block; margin: 10px 0; font-size: 14px; font-weight: 600; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--primary-3); border-radius: 8px;
  background: var(--white); color: var(--navy);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-2); border-color: var(--primary-2); }

.btn {
  display: inline-block; cursor: pointer;
  background: var(--primary-2); color: var(--white);
  border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 15px; font-weight: 700;
  margin-top: 8px;
}
.btn:hover { background: var(--primary-1); }
.btn-outline { background: transparent; color: var(--primary-2); border: 2px solid var(--primary-2); }
.btn-outline:hover { background: var(--primary-3); color: var(--primary-1); }
.btn-big { width: 100%; padding: 18px; font-size: 18px; }
.btn-out { background: var(--navy); }

.badge {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 3px 9px; border-radius: 999px;
  background: var(--primary-3); color: var(--primary-1); text-decoration: none;
}
.badge-active, .badge-in_progress { background: var(--primary-2); color: var(--white); }
.badge-complete, .badge-approved, .badge-fulfilled { background: #e6f4ea; color: var(--green); }
.badge-cancelled, .badge-declined, .badge-rejected { background: #fbeae9; color: var(--red); }
.badge-on_hold, .badge-pending, .badge-submitted, .badge-requested { background: #fff4d6; color: var(--amber); }

.filter-row { display: flex; gap: 8px; margin-bottom: 14px; }

.clock-card { text-align: center; }
.clock-status { font-weight: 700; margin: 4px 0 10px; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 110px; text-align: center; }
.stat-num { display: block; font-size: 26px; font-weight: 800; color: var(--primary-2); }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5a6b85; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--primary-3); }

.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; font-size: 14px; }
.table th { background: var(--navy); color: var(--white); text-align: left; padding: 10px 12px; }
.table td { padding: 9px 12px; border-top: 1px solid var(--primary-3); }
.table .num { text-align: right; }
.row-me { background: #e9f1ff; }

.inline-form { display: inline-block; margin-right: 8px; }
.inline-form input, .inline-form select { display: inline-block; width: auto; }
details { margin-top: 8px; font-size: 14px; }
details summary { cursor: pointer; color: var(--primary-2); font-weight: 600; }

.auth-card { max-width: 420px; margin: 40px auto; }

.bar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 13px; }
.bar-label { width: 52px; color: #5a6b85; text-align: right; }
.bar-track { flex: 1; background: var(--primary-3); border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--primary-2); border-radius: 6px; min-width: 2px; }
.bar-value { width: 56px; font-weight: 700; }

@media (max-width: 600px) {
  .content { padding: 12px; }
  .topbar-user { display: none; }
  .table { font-size: 13px; }
}
