:root {
    --navy: #0a1f5c;
    --navy-dark: #14315e;
    --blue: #2f6db5;
    --blue-link: #2f7fc1;
    --green: #6aa84f;
    --green-d: #5d9444;
    --red: #c0392b;
    --grey: #7b8794;
    --bg: #9fc1e4;
    --panel-border: #d4dce6;
    --text: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", "Open Sans", Tahoma, Arial, sans-serif;
    color: var(--text);
    /* The real site sits on a soft blue gradient */
    background: linear-gradient(180deg, #7db0e0 0%, #aecbe8 40%, #ffffff 100%);
    background-attachment: fixed;
    font-size: 15px;
}

a { color: var(--blue-link); }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--navy);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 34px; width: 34px; object-fit: contain; border-radius: 3px; }
.brand-text { font-size: 22px; font-weight: 500; letter-spacing: .2px; }
.topbar-links { font-size: 14px; }
.topbar-links a { color: #fff; text-decoration: none; }
.topbar-links a:hover { text-decoration: underline; }
.topbar-links .sep { margin: 0 10px; color: #6b82b8; }

/* ---------- Layout ---------- */
.layout {
    display: flex;
    max-width: 1180px;
    margin: 0 auto;
    background: transparent;
    min-height: calc(100vh - 95px);
}
.sidebar {
    width: 250px;
    background: #fdfdfd;
    border-right: 1px solid var(--panel-border);
    flex-shrink: 0;
}
.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 18px;
    color: #2d2d2d;
    text-decoration: none;
    border-bottom: 1px solid #eef2f7;
    font-size: 15px;
}
.nav-item:hover { background: #eef4fb; color: var(--navy); }
.nav-item.active { color: var(--blue-link); font-weight: 700; }
.nav-item .caret { color: #9aa7b5; font-size: 11px; }
.nav-staff { border-top: 3px solid var(--navy); margin-top: 10px; background: #f4f7fb; }
.nav-staff-label { padding: 10px 18px 4px; font-size: 12px; color: #667; }
.nav-item.staff { font-size: 14px; color: var(--navy); }

/* ---------- Content ---------- */
.content { flex: 1; background: #fff; border-right: 1px solid var(--panel-border); }
.crumb {
    background: #f4f6f9;
    padding: 12px 22px;
    border-bottom: 1px solid var(--panel-border);
    color: #555;
    font-size: 14px;
}
.crumb-home { color: #555; }
.panel { padding: 26px 30px 60px; min-height: 460px; }

.page-title {
    color: var(--blue-link);
    font-size: 27px;
    font-weight: 400;
    margin-bottom: 18px;
}
h1.dark, .section-title { color: var(--navy); }
.section-title { font-size: 18px; margin: 26px 0 12px; font-weight: 600; }
p { margin-bottom: 12px; line-height: 1.55; }

/* ---------- Forms ---------- */
label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
.req { color: var(--red); }
input[type=text], input[type=password], select, textarea {
    width: 100%;
    max-width: 420px;
    padding: 8px 10px;
    border: 1px solid #b9c4d2;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
}
.field-row { max-width: 420px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 14px;
}
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-d); }
.btn-blue { background: var(--blue); }
.btn-grey { background: var(--grey); }
.btn-red { background: var(--red); }
.btn-small { padding: 5px 11px; font-size: 13px; margin-top: 0; }
.btn:hover { opacity: .92; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.or { color: #555; margin: 0 4px; }

/* ---------- Alerts ---------- */
.alert { background: #fdecea; border: 1px solid #f5c6cb; color: #a33; padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; }
.notice { background: #eef4fb; border: 1px solid #cfe0f1; color: #2a527c; padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; }

/* ---------- Code / id box ---------- */
.id-box { background: #f4f6f9; border: 1px dashed #b9c4d2; padding: 13px 16px; font-family: monospace; font-size: 16px; margin: 12px 0; border-radius: 3px; word-break: break-all; }

/* ---------- Tables ---------- */
.data-table, .detail-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.data-table th, .data-table td, .detail-table th, .detail-table td {
    border: 1px solid #dde3ea; padding: 9px 11px; text-align: left; font-size: 14px; vertical-align: top;
}
.data-table th { background: #f4f6f9; color: var(--navy); }
.detail-table th { background: #f4f6f9; width: 200px; color: var(--navy); }
.status-accepted { color: var(--green-d); font-weight: 600; }
.status-denied { color: var(--red); font-weight: 600; }
.status-other { color: var(--blue-link); font-weight: 600; }
.badge-company { display: inline-block; background: #eef4fb; border: 1px solid #cfe0f1; color: #2a527c; padding: 1px 8px; border-radius: 10px; font-size: 12px; }

/* ---------- Timeline (track page) ---------- */
.timeline { margin-top: 14px; }
.timeline-day { font-weight: 700; color: #333; margin: 18px 0 6px; }
.timeline-item { display: flex; gap: 14px; padding-left: 6px; position: relative; }
.timeline-item:before {
    content: ""; position: absolute; left: 70px; top: 0; bottom: 0; width: 2px; background: #cdd7e3;
}
.timeline-time { width: 64px; text-align: right; color: #8a96a3; font-size: 13px; padding-top: 1px; }
.timeline-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--blue-link); background: #fff; margin-top: 2px; z-index: 1; }
.timeline-body { padding-bottom: 16px; }
.timeline-status { color: var(--blue-link); font-weight: 700; }
.timeline-note { color: #555; font-size: 13px; margin-top: 2px; }

.back-link { color: var(--blue-link); text-decoration: none; font-size: 14px; }
.mod-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

hr { border: none; border-top: 1px solid #e1e7ee; margin: 22px 0; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); color: #cdd7e3; text-align: left; padding: 12px 22px; font-size: 13px; }

/* Card grid for admin */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.card { border: 1px solid #dde3ea; border-radius: 5px; padding: 14px; background: #fbfcfe; }
.card h3 { color: var(--navy); font-size: 16px; margin-bottom: 6px; }
.muted { color: #8a96a3; font-size: 13px; }
details.acct { border: 1px solid #dde3ea; border-radius: 5px; margin-bottom: 8px; background: #fbfcfe; }
details.acct summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--navy); }
details.acct .acct-body { padding: 4px 14px 14px; }

@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
}
