/* Baldwin Insurance - shared branding & layout
   Dark red brand colors: #8B0000 (primary) / #A61F1F (accent) */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f2f2f2;
    color: #222;
    line-height: 1.4;
}

a { color: #8B0000; }

.site-header {
    background: linear-gradient(135deg, #8B0000 0%, #A61F1F 100%);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header .brand h1 {
    font-size: 20px;
    font-weight: bold;
}

.site-header .brand p {
    font-size: 12px;
    opacity: 0.85;
}

.site-header a.header-link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.9;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 6px 12px;
    border-radius: 5px;
}
.site-header a.header-link:hover { background: rgba(255,255,255,0.15); }

.page-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 24px;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 5px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primary { background: #8B0000; color: #fff; }
.btn-primary:hover { background: #A61F1F; }
.btn-primary:disabled { background: #c99; cursor: not-allowed; }
.btn-secondary { background: #eee; color: #333; }
.btn-secondary:hover { background: #ddd; }
.btn-danger { background: #b02a2a; color: #fff; }
.btn-danger:hover { background: #8c2020; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---- Step wizard ---- */
.step-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}
.step-pill {
    flex: 1 1 auto;
    min-width: 70px;
    text-align: center;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: bold;
    color: #888;
    background: #eee;
    border-radius: 20px;
}
.step-pill.active { background: #8B0000; color: #fff; }
.step-pill.done { background: #d8d8d8; color: #555; }

.form-step { display: none; }
.form-step.active { display: block; }

.step-title {
    font-size: 22px;
    color: #8B0000;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #A61F1F;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.conditional { display: none; }
.field.conditional.visible { display: flex; }
.field.full-width { grid-column: 1 / -1; }

.field label {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}
.field .req { color: #8B0000; }

.field input[type=text],
.field input[type=number],
.field input[type=email],
.field input[type=tel],
.field input[type=date],
.field select,
.field textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: #A61F1F;
    box-shadow: 0 0 0 3px rgba(166,31,31,0.12);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    font-size: 13px;
}

.repeat-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
    background: #fafafa;
}
.repeat-card .repeat-card-title {
    font-weight: bold;
    color: #8B0000;
    margin-bottom: 12px;
}
.repeat-card .remove-entry-btn {
    position: absolute;
    top: 14px;
    right: 14px;
}
.add-entry-btn { margin-top: 4px; }

.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 10px;
}

.error-banner {
    background: #f8d7da;
    color: #842029;
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 16px;
    display: none;
}
.error-banner.visible { display: block; }

.field-error {
    color: #b02a2a;
    font-size: 12px;
    display: none;
}
.field.has-error input, .field.has-error select { border-color: #b02a2a; }
.field.has-error .field-error { display: block; }

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}
.status-badge.pending { background: #eee; color: #777; }
.status-badge.done { background: #d7f4dc; color: #1e6b30; }

.center-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B0000 0%, #A61F1F 100%);
    padding: 20px;
}
.center-card {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.center-card h1 { color: #8B0000; font-size: 26px; margin-bottom: 6px; }
.center-card p.subtitle { color: #666; font-size: 13px; margin-bottom: 26px; }
.center-card .form-group { margin-bottom: 18px; text-align: left; }
.center-card .form-group label { display: block; margin-bottom: 6px; color: #333; font-weight: bold; font-size: 13px; }
.center-card input { width: 100%; padding: 11px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.data-table th, table.data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}
table.data-table th { background: #f7f2f2; color: #8B0000; }
table.data-table tr:hover { background: #fbf6f6; }

.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-overlay.visible { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
}
.modal-box h2 { color: #8B0000; margin-bottom: 16px; }
.modal-close { float: right; cursor: pointer; font-size: 20px; color: #888; }

.muted { color: #777; font-size: 13px; }
