/* =============================================================
   members.css
   Auth pages + Members area styles
   Brand colour: #e05a00 (orange) — matched from book.css
   ============================================================= */

/* ------------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------------ */
:root {
    --brand:          #e05a00;
    --brand-dark:     #c44f00;
    --brand-pale:     #fff4ef;
    --text-primary:   #1a1a1a;
    --text-secondary: #555;
    --text-muted:     #888;
    --border:         #e0e0e0;
    --bg-page:        #f7f7f5;
    --bg-card:        #ffffff;
    --success:        #1a7f4b;
    --success-bg:     #edfaf3;
    --error:          #c0392b;
    --error-bg:       #fdf2f2;
    --radius:         10px;
    --radius-sm:      6px;
    --shadow:         0 2px 12px rgba(0,0,0,0.07);
    --shadow-hover:   0 4px 20px rgba(0,0,0,0.12);
}

/* ------------------------------------------------------------------
   Navbar additions — email + logout link
   ------------------------------------------------------------------ */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.nav-email {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--brand);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.nav-logout:hover {
    background: var(--brand);
    color: #fff;
}

/* ------------------------------------------------------------------
   Auth pages — shared layout
   ------------------------------------------------------------------ */
.auth-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    padding: 40px 16px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
}

.auth-card--centered {
    text-align: center;
}

.auth-logo {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.2;
}

.auth-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ------------------------------------------------------------------
   Auth form elements
   ------------------------------------------------------------------ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(224, 90, 0, 0.12);
}

.form-group input[readonly] {
    background: #f7f7f5;
    color: var(--text-secondary);
    cursor: default;
}

.form-hint {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ------------------------------------------------------------------
   Auth buttons
   ------------------------------------------------------------------ */
.btn-auth-primary {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
    box-sizing: border-box;
    margin-top: 4px;
}

.btn-auth-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.btn-auth-secondary {
    display: inline-block;
    padding: 12px 20px;
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.btn-auth-secondary:hover {
    background: var(--brand-pale);
}

/* ------------------------------------------------------------------
   Auth alerts
   ------------------------------------------------------------------ */
.auth-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #f5c6c6;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 4px;
}

.auth-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #b7eacf;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 4px;
}

/* ------------------------------------------------------------------
   Auth misc
   ------------------------------------------------------------------ */
.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-footer-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.auth-footer-note a {
    color: var(--brand);
    text-decoration: none;
}

.auth-expired-icon {
    font-size: 48px;
    margin: 8px 0 16px;
}

.auth-expired-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 28px 0 20px;
}

/* ------------------------------------------------------------------
   Members area — shared layout
   ------------------------------------------------------------------ */
.members-page {
    min-height: calc(100vh - 140px);
    background: var(--bg-page);
    padding: 40px 16px 60px;
}

.members-container {
    max-width: 900px;
    margin: 0 auto;
}

.members-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.members-breadcrumb a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.members-breadcrumb a:hover {
    text-decoration: underline;
}

.members-breadcrumb span::before {
    content: '›';
    margin-right: 10px;
    color: var(--border);
}

.members-heading {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.members-subheading {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 36px;
    line-height: 1.6;
}

/* ------------------------------------------------------------------
   Dashboard welcome bar
   ------------------------------------------------------------------ */
.members-welcome {
    background: var(--bg-card);
    border-radius: var(--radius);
    border-left: 4px solid var(--brand);
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.members-welcome .members-heading {
    margin-bottom: 4px;
}

.members-welcome .members-subheading {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
   Tier badge
   ------------------------------------------------------------------ */
.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}

.tier-badge--core {
    background: #f0f0f0;
    color: #555;
}

.tier-badge--builder {
    background: var(--brand-pale);
    color: var(--brand);
}

.tier-badge--owner {
    background: #fff8e6;
    color: #b07d00;
}

/* ------------------------------------------------------------------
   Dashboard section cards
   ------------------------------------------------------------------ */
.members-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.members-section-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    transition: box-shadow 0.15s;
}

.members-section-card:hover {
    box-shadow: var(--shadow-hover);
}

.members-section-card--locked {
    background: #fafafa;
    border: 1px dashed var(--border);
    box-shadow: none;
}

.members-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.members-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.members-section-card--locked .members-section-title {
    color: var(--text-muted);
}

.section-available-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.section-locked-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.section-locked-text {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* ------------------------------------------------------------------
   Members buttons
   ------------------------------------------------------------------ */
.btn-members-access {
    display: inline-block;
    padding: 10px 20px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-members-access:hover {
    background: var(--brand-dark);
}

.btn-members-upgrade {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-members-upgrade:hover {
    background: var(--brand-pale);
}

.btn-members-secondary {
    display: inline-block;
    padding: 9px 16px;
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-members-secondary:hover {
    background: var(--brand-pale);
}

/* ------------------------------------------------------------------
   Content pages — sections and download grid
   ------------------------------------------------------------------ */
.content-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}

.content-section--included {
    background: var(--success-bg);
    border: 1px solid #b7eacf;
    box-shadow: none;
}

.content-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
}

.content-included-note {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.included-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------
   Download cards
   ------------------------------------------------------------------ */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    gap: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.download-card:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(224,90,0,0.08);
}

.download-card--featured {
    background: var(--brand-pale);
    border-color: var(--brand);
    padding: 18px 20px;
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.download-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.download-ext {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-download {
    display: inline-block;
    padding: 9px 16px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

.btn-download:hover {
    background: var(--brand-dark);
}

.btn-download--sm {
    padding: 7px 12px;
    font-size: 13px;
}

/* ------------------------------------------------------------------
   Support footer
   ------------------------------------------------------------------ */
.members-support {
    text-align: center;
    padding: 24px 0 8px;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.members-support a {
    color: var(--brand);
    text-decoration: none;
}

/* ------------------------------------------------------------------
   Upgrade card
   ------------------------------------------------------------------ */
.upgrade-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 40px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.upgrade-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upgrade-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin: 28px 0 20px;
}

.upgrade-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ------------------------------------------------------------------
   Thank you page
   ------------------------------------------------------------------ */
.thankyou-page {
    align-items: flex-start;
    padding-top: 60px;
}

.thankyou-card {
    max-width: 520px;
}

.thankyou-icon {
    font-size: 52px;
    margin: 0 0 16px;
    text-align: center;
}

/* Steps */
.thankyou-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 28px 0 24px;
    text-align: left;
}

.thankyou-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.thankyou-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.thankyou-step-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 14px;
    line-height: 1.5;
}

.thankyou-step-text strong {
    font-size: 15px;
    color: var(--text-primary);
}

.thankyou-step-text span {
    color: var(--text-secondary);
}

/* Timing notice */
.thankyou-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--brand-pale);
    border: 1px solid #f5cdb0;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.thankyou-notice-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Order ID */
.thankyou-orderid {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 20px;
}

.thankyou-orderid code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* CTA */
.thankyou-cta {
    margin-bottom: 24px;
}

.thankyou-cta .btn-auth-primary {
    margin-top: 0;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 600px) {
    .auth-card {
        padding: 32px 20px;
    }

    .members-heading {
        font-size: 24px;
    }

    .members-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-download {
        width: 100%;
        text-align: center;
    }

    .upgrade-card {
        padding: 32px 20px;
    }
}
