@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');

body {
    margin: 0;
    font-family: "Source Sans Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #BADCDD; /* light brand blue-green */
    color: #212B40;      /* primary navy */
}

.layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(33, 43, 64, 0.18);
    padding: 24px 28px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(33, 43, 64, 0.08);
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px 16px;
}

header h1 {
    font-size: 1.4rem;
    margin: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand img {
    height: 32px;
}

.brand h1 {
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    font-weight: 700;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid #547B97;
    background: #EFF6F7;
    color: #212B40;
    font-size: 0.9rem;
    font-weight: 600;
}

nav a:hover {
    background: #547B97;
    color: #ffffff;
}

h2 {
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

form .field {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

button, form .btn {
    margin-top: 1rem;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #212B40;
    color: #f9fafb;
    font-size: 0.95rem;
    cursor: pointer;
}

button:hover {
    background: #46635D;
}

.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #C2E078;
    color: #212B40;
}

ul {
    padding-left: 1.1rem;
}

li {
    margin-bottom: 0.4rem;
}

.muted {
    color: #46635D;
    font-size: 0.85rem;
}

input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: #212B40;
    color: #f9fafb;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: #46635D;
}

.stat-row {
    display: flex;
    gap: 24px;
    margin: 1rem 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    background: #EFF6F7;
    min-width: 100px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212B40;
}

.stat-label {
    font-size: 0.8rem;
    color: #46635D;
    font-weight: 600;
}

.review-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(33, 43, 64, 0.08);
}

.review-item label {
    display: inline;
    font-weight: 400;
}

.scope-box {
    background: #EFF6F7;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    margin: 0.75rem 0 0.25rem;
}

hr {
    border: none;
    border-top: 1px solid rgba(33, 43, 64, 0.1);
    margin: 1.5rem 0;
}

h3 {
    font-size: 1rem;
    margin-top: 1.25rem;
}

a {
    color: #547B97;
}

a:hover {
    color: #212B40;
}

/* --- Loading overlay --- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 43, 64, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.loading-overlay.active { display: flex; }
.spinner {
    width: 40px; height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #C2E078;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay .loading-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

/* --- Flash banners --- */
.flash {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flash-success {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}
.flash-error {
    background: #fbe9e7;
    border: 1px solid #e57373;
    color: #c62828;
}
.flash .close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
    margin: 0;
    padding: 0 4px;
}

/* --- Confirm dialog --- */
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 43, 64, 0.55);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
.confirm-overlay.active { display: flex; }
.confirm-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(33, 43, 64, 0.25);
    text-align: center;
}
.confirm-box p {
    font-size: 0.95rem;
    margin: 0 0 20px;
    color: #212B40;
}
.confirm-box .confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-box .btn-cancel {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #212B40;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.confirm-box .btn-cancel:hover { background: #f3f4f6; }
.confirm-box .btn-confirm {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: #212B40;
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.confirm-box .btn-confirm:hover { background: #46635D; }

/* --- Cancel link styled as button --- */
.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #547B97;
    background: transparent;
    color: #547B97;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    margin-top: 1rem;
}
.btn-outline:hover {
    background: #EFF6F7;
    color: #212B40;
}

/* --- Error page --- */
.error-page {
    text-align: center;
    padding: 40px 20px;
}
.error-page h2 {
    font-size: 1.5rem;
    color: #c62828;
}
.error-page p {
    font-size: 1rem;
    color: #46635D;
    max-width: 480px;
    margin: 12px auto;
}

/* --- Review toggle bar --- */
.review-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.review-toggle button {
    margin-top: 0;
    padding: 4px 12px;
    font-size: 0.8rem;
    background: #EFF6F7;
    color: #212B40;
    border: 1px solid #d1d5db;
}
.review-toggle button:hover {
    background: #547B97;
    color: #fff;
}

