:root {
    --navy: #0f1b2d;
    --charcoal: #2a3444;
    --gold: #c9a227;
    --off-white: #f7f4ec;
    --white: #ffffff;
    --success: #1f7a4f;
    --danger: #b42318;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(180deg, var(--off-white) 0%, #ece7db 100%);
    color: var(--charcoal);
    line-height: 1.5;
}
.container { width: min(920px, 92vw); margin: 0 auto; }
.site-header {
    background: var(--navy);
    color: var(--off-white);
    padding: 1rem 0;
    border-bottom: 3px solid var(--gold);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 50%;
    border: 2px solid var(--gold); display: grid; place-items: center;
    font-weight: 700; color: var(--gold);
}
.brand-text { font-weight: 600; letter-spacing: .04em; }
.admin-nav a { color: var(--off-white); margin-left: 1rem; text-decoration: none; opacity: .9; }
.main-content { padding: 2rem 0 4rem; }
.site-footer { text-align: center; padding: 1.5rem; color: #6b7280; font-size: .9rem; }
.card {
    background: var(--white);
    border: 1px solid #e5dfd2;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 27, 45, .08);
}
.hero-card, .step-card { max-width: 640px; margin: 0 auto; }
.step-label {
    display: inline-block; font-size: .8rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--gold); font-weight: 700; margin-bottom: .5rem;
}
h1 { color: var(--navy); margin-top: 0; font-size: 1.6rem; }
.lead { font-size: 1.05rem; }
.muted { color: #6b7280; }
.small { font-size: .9rem; }
.badge {
    display: inline-block; background: var(--navy); color: var(--gold);
    padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; margin-bottom: 1rem;
}
.price-box {
    font-size: 2rem; font-weight: 700; color: var(--navy);
    margin: 1rem 0; padding: 1rem; background: var(--off-white); border-radius: 12px;
}
.price-box span { font-size: 1rem; font-weight: 500; color: var(--charcoal); }
.feature-list { padding-left: 1.2rem; }
.btn {
    display: inline-block; border: none; border-radius: 10px;
    padding: .8rem 1.2rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--navy); color: var(--off-white); }
.btn-secondary { background: #e8e2d6; color: var(--navy); }
.btn-block { display: block; width: 100%; text-align: center; margin-top: 1rem; }
.contract-box {
    max-height: 360px; overflow: auto; padding: 1rem;
    background: #faf8f3; border: 1px solid #e5dfd2; border-radius: 12px; margin: 1rem 0;
}
.checkbox-row { display: flex; gap: .75rem; align-items: flex-start; margin: 1rem 0; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.success-card { text-align: center; }
.icon-shield {
    width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%;
    background: var(--off-white); border: 3px solid var(--gold);
    display: grid; place-items: center; font-size: 2rem; color: var(--navy); font-weight: 700;
}
.icon-shield.active { border-color: var(--success); color: var(--success); }
.meta-grid, .info-box { display: grid; gap: .75rem; margin: 1rem 0; }
.info-box > div, .meta-grid > div {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .75rem 1rem; background: var(--off-white); border-radius: 10px;
}
.info-box span, .meta-grid span { color: #6b7280; font-size: .9rem; }
.lock-note { background: #fff8e6; border-left: 4px solid var(--gold); padding: .75rem 1rem; border-radius: 8px; }
.payment-option {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem; border: 1px solid #e5dfd2; border-radius: 12px; margin-bottom: .75rem;
}
.payment-option:has(input:checked) { border-color: var(--gold); background: #fffdf7; }
.error-text { color: var(--danger); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .75rem; border-bottom: 1px solid #eee; text-align: left; }
.status-pill { padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; background: #eee; }
.status-active { background: #d1fae5; color: var(--success); }
.status-pending_deposit, .status-signed_pending_payment, .status-pending_signature { background: #fff3cd; }
.stack-form label { display: block; margin-bottom: 1rem; }
.stack-form input, .stack-form textarea { width: 100%; margin-top: .35rem; padding: .7rem; border: 1px solid #ddd; border-radius: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.copy-box input { width: 100%; padding: .7rem; margin-top: .35rem; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: .6rem 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; gap: 1rem; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert.success { background: #d1fae5; color: var(--success); }
.auth-card { max-width: 420px; margin: 2rem auto; }

/* Login page */
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201, 162, 39, .18), transparent),
        linear-gradient(180deg, var(--off-white) 0%, #e8e2d6 100%);
}
.login-body .main-content {
    min-height: calc(100vh - 0px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-page {
    width: min(420px, 100%);
}
.login-card {
    padding: 2rem 2rem 1.75rem;
    border-top: 4px solid var(--gold);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.brand-mark-lg {
    width: 56px;
    height: 56px;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.login-eyebrow {
    margin: 0;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gold);
    font-weight: 700;
}
.login-brand h1 {
    margin: .15rem 0 0;
    font-size: 1.75rem;
    line-height: 1.1;
}
.login-subtitle {
    margin: 0 0 1.5rem;
    color: #6b7280;
    font-size: .95rem;
    line-height: 1.5;
}
.login-form .field {
    margin-bottom: 1.1rem;
}
.login-form label {
    display: block;
    margin-bottom: .4rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: .02em;
}
.login-form input {
    display: block;
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid #d8d0c0;
    border-radius: 10px;
    font-size: 1rem;
    background: #faf8f3;
    color: var(--navy);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-form input::placeholder {
    color: #a8a196;
}
.login-form input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .2);
}
.login-submit {
    margin-top: .5rem;
    padding: .9rem 1.2rem;
    font-size: 1rem;
    letter-spacing: .03em;
    transition: transform .1s, box-shadow .15s;
}
.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 27, 45, .25);
}
.alert-error {
    background: #fde8e8;
    color: var(--danger);
    border: 1px solid #f5c2c2;
    margin-bottom: 1.25rem;
    font-size: .9rem;
}
.login-footer-note {
    text-align: center;
    margin-top: 1.25rem;
    font-size: .8rem;
    color: #9ca3af;
    letter-spacing: .04em;
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .actions { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
