/* =================================================================
   Fluid Adventures Members Portal — Styles
   Navy #1a5276, Orange #e67e22, matching FA brand
   ================================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.portal-header {
    background: #1a5276;
    color: white;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.header-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
}
.portal-nav {
    display: flex;
    gap: 0.25rem;
}
.portal-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.portal-nav a:hover { background: rgba(255,255,255,0.1); color: white; }
.portal-nav a.active { background: rgba(255,255,255,0.15); color: white; font-weight: 600; }

/* ===== Container ===== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    flex: 1;
    width: 100%;
}

/* ===== Footer ===== */
.portal-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
    color: #999;
}
.portal-footer a { color: #1a5276; text-decoration: none; }
.portal-footer a:hover { text-decoration: underline; }

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf0;
    margin-bottom: 1rem;
}
.card h1 { font-size: 1.35rem; font-weight: 700; color: #1a5276; margin-bottom: 0.5rem; }
.card h2 { font-size: 1.1rem; font-weight: 600; color: #1a5276; margin-bottom: 0.5rem; }

.card-success {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.card-success .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #27ae60;
    color: white;
    font-size: 1.8rem;
    line-height: 60px;
    margin: 0 auto 1rem;
}
.card-success p { color: #666; margin-bottom: 1.5rem; line-height: 1.5; }

/* ===== Forms ===== */
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 1.25rem; line-height: 1.4; }

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
    background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a5276;
    box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}
.form-group small {
    display: block;
    font-size: 0.78rem;
    color: #999;
    margin-top: 0.25rem;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #999;
}
.form-footer a { color: #1a5276; text-decoration: none; font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: #e67e22; color: white; }
.btn-primary:hover { background: #d35400; }
.btn-outline { background: transparent; color: #1a5276; border: 1.5px solid #1a5276; }
.btn-outline:hover { background: rgba(26,82,118,0.05); }
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-danger-outline { background: transparent; color: #e74c3c; border: 1.5px solid #e74c3c; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; }

/* ===== Alerts ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #ccc;
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ===== Status Pills ===== */
.status-pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.status-green { background: #d1fae5; color: #065f46; }
.status-amber { background: #fef3c7; color: #92400e; }
.status-blue { background: #dbeafe; color: #1e40af; }
.status-red { background: #fee2e2; color: #991b1b; }
.status-grey { background: #f3f4f6; color: #6b7280; }

/* ===== Dashboard ===== */
.welcome-card {
    background: linear-gradient(135deg, #1a5276, #2980b9);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.welcome-card h1 { color: white; font-size: 1.3rem; margin-bottom: 0.5rem; }
.welcome-card .status-pill { margin-bottom: 0.5rem; }
.renewal-date { font-size: 0.85rem; opacity: 0.8; margin-top: 0.35rem; }

.codes-section { margin-bottom: 1.25rem; }
.codes-section h2 { font-size: 1.1rem; color: #1a5276; margin-bottom: 0.25rem; }
.codes-help { font-size: 0.82rem; color: #999; margin-bottom: 0.75rem; }

.codes-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.code-card {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
}
.code-card.disabled { opacity: 0.5; }
.code-label { font-size: 0.8rem; color: #666; flex: 1; min-width: 0; }
.code-value {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a5276;
    letter-spacing: 0.02em;
}
.btn-copy {
    background: #1a5276;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-copy:hover { background: #2980b9; }
.code-disabled-label {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

.quick-links { display: flex; flex-direction: column; gap: 0.5rem; }
.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: #333;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-link:hover { border-color: #1a5276; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ql-icon { font-size: 1.3rem; opacity: 0.5; }

/* ===== QR Page ===== */
.card-qr { text-align: center; }
.card-qr p { color: #666; font-size: 0.9rem; margin-bottom: 1.25rem; }
.qr-container { margin: 0 auto 1rem; display: inline-block; }
.qr-name { font-size: 1.1rem; font-weight: 600; color: #1a5276; margin-bottom: 0.35rem; }
.qr-status { margin: 0 auto; }

/* ===== Account ===== */
.account-section {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid #f0f0f0;
}
.account-section:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}
.info-label { color: #999; }

.danger-section { border-top-color: #fecaca; }
.danger-section h2 { color: #e74c3c; }
.danger-section p { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; line-height: 1.4; }

.cancel-confirm { margin-top: 0.75rem; }
.cancel-confirm summary { list-style: none; cursor: pointer; }
.cancel-confirm summary::-webkit-details-marker { display: none; }
.cancel-inner { margin-top: 0.75rem; }

/* ===== Benefits Grid (Join) ===== */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
}
.benefit {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    text-align: center;
}
.benefit strong { display: block; color: #1a5276; font-size: 1rem; }
.benefit span { font-size: 0.78rem; color: #666; }

/* ===== T&C Box ===== */
.tc-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.tc-box h3 { font-size: 0.95rem; color: #1a5276; margin-bottom: 0.5rem; }
.tc-summary { font-size: 0.85rem; color: #555; line-height: 1.5; margin-bottom: 0.5rem; }
.tc-box details summary {
    color: #1a5276;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
}
.tc-content {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* ===== Trips ===== */
.trips-page .card + .card { margin-top: 1rem; }
.trip-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.trip-item:last-child { border-bottom: none; }
.trip-name { font-weight: 600; color: #1a5276; font-size: 0.95rem; }
.trip-desc { font-size: 0.85rem; color: #666; margin-top: 0.2rem; }
.trip-meta { font-size: 0.78rem; color: #999; margin-top: 0.2rem; }
.trip-status {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}
.trip-status-new { background: #dbeafe; color: #1e40af; }
.trip-status-reviewed { background: #fef3c7; color: #92400e; }
.trip-status-scheduled { background: #d1fae5; color: #065f46; }
.trip-status-declined { background: #f3f4f6; color: #6b7280; }

/* ===== Loading ===== */
.loading { text-align: center; color: #999; padding: 1rem; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .portal-nav a { font-size: 0.72rem; padding: 0.3rem 0.45rem; }
    .code-card { flex-wrap: wrap; }
    .code-value { font-size: 0.8rem; }
}
