/*
 * assets/css/main.css
 * ─────────────────────────────────────────────────────────────
 * Global styles shared across registration, payment,
 * and login pages.
 *
 * Color palette:
 *   --green-dark   : #1a5c38  (primary brand)
 *   --green-mid    : #237a4b  (interactive states)
 *   --green-light  : #e8f5ee  (soft backgrounds)
 *   --green-accent : #2ecc71  (highlights, badges)
 *   --offwhite     : #f7f8f5  (page background)
 *   --text-dark    : #1c1c1c  (body copy)
 *   --text-muted   : #5a6472  (secondary text)
 *   --border       : #d4ddd6  (borders)
 *   --error        : #c0392b  (validation errors)
 * ─────────────────────────────────────────────────────────────
 */

/* ── Reset & Box Model ──────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
    --green-dark:   #1a5c38;
    --green-mid:    #237a4b;
    --green-light:  #e8f5ee;
    --green-accent: #2ecc71;
    --offwhite:     #f7f8f5;
    --white:        #ffffff;
    --text-dark:    #1c1c1c;
    --text-muted:   #5a6472;
    --border:       #d4ddd6;
    --error:        #c0392b;
    --error-light:  #fdf0ef;
    --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    16px;
    --transition:   180ms ease;
    --font-body:    'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
}

/* ── Base Typography & Layout ───────────────────────────────── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--offwhite);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--green-dark);
    line-height: 1.3;
}

a {
    color: var(--green-mid);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus {
    color: var(--green-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

/* ── Site Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--green-dark);
    color: var(--white);
    padding: 0 2rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.site-header .logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header .logo-wrap img {
    height: 44px;
    width: auto;
    border-radius: var(--radius-sm);
    background: var(--white);
    padding: 3px;
}

.site-header .logo-wrap .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-header .brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .3px;
}

.site-header .brand-sub {
    font-size: .72rem;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-nav a {
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    margin-left: 1.5rem;
    transition: color var(--transition);
}
.header-nav a:hover {
    color: var(--green-accent);
    text-decoration: none;
}

/* ── Page Wrapper ───────────────────────────────────────────── */
.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem 2.25rem;
}

.card-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.35rem;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    color: var(--text-dark);
    margin-bottom: .4rem;
}

.form-group label .req {
    color: var(--error);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .93rem;
    color: var(--text-dark);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(35,122,75,.12);
}

.form-control.is-invalid {
    border-color: var(--error);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6472' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    padding-right: 2.2rem;
}

.field-error {
    color: var(--error);
    font-size: .8rem;
    margin-top: .3rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: .65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .93rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}

.btn:focus-visible {
    outline: 3px solid var(--green-accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--green-dark);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--green-mid);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--green-light);
    color: var(--green-dark);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover {
    background: #d5ecdf;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}
.btn-danger:hover {
    background: #a93226;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: .8rem 2rem;
    font-size: 1rem;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    color: #1e8449;
}

.alert-error {
    background: var(--error-light);
    border: 1px solid #f5b7b1;
    color: var(--error);
}

.alert-info {
    background: #eaf4fb;
    border: 1px solid #aed6f1;
    color: #1a6fa0;
}

.alert-warning {
    background: #fef9e7;
    border: 1px solid #f9e79f;
    color: #9a7d0a;
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .4px;
}
.badge-green   { background: #d5f5e3; color: #1e8449; }
.badge-yellow  { background: #fef9e7; color: #9a7d0a; }
.badge-red     { background: #fdedec; color: #c0392b; }
.badge-blue    { background: #eaf4fb; color: #1a6fa0; }

/* ── Step Indicator ─────────────────────────────────────────── */
.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2.5rem;
    justify-content: center;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}

.step-item.active   .step-circle { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }
.step-item.done     .step-circle { background: var(--green-accent); color: var(--white); border-color: var(--green-accent); }

.step-label {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .3rem;
    white-space: nowrap;
}
.step-item.active .step-label { color: var(--green-dark); font-weight: 600; }

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    min-width: 60px;
    margin-top: -16px; /* align with circle center */
}

/* ── Modal Overlay ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    max-width: 460px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 200ms ease;
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.15rem;
    color: var(--green-dark);
    margin-bottom: .75rem;
}

.modal-body {
    font-size: .93rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.modal-actions {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .page-wrap { padding: 1.25rem .8rem 3rem; }
    .card { padding: 1.25rem 1rem; }
    .site-header { padding: 0 1rem; }
    .header-nav { display: none; }
    .step-line { min-width: 30px; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: .8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); font-size: .88rem; }
.fw-600 { font-weight: 600; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.align-center { align-items: center; }
.icon { width: 18px; height: 18px; vertical-align: middle; }