/* ===========================================================
   DedicaQR — Sprint 6 CSS
   Checkout, pagos, cuenta, GDPR, badges, admin forms
   =========================================================== */

/* --------------------------------------------------------------- */
/* CHECKOUT                                                         */
/* --------------------------------------------------------------- */
.checkout {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.checkout-head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.checkout-head h1 {
    font-family: 'Playfair Display', serif;
    color: #C9184A;
    margin: 0 0 0.5rem;
}
.checkout-sub {
    color: #6c757d;
    margin: 0;
    font-size: 1.05rem;
}

.checkout-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.checkout-field {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.checkout-field legend {
    font-weight: 700;
    color: #C9184A;
    margin-bottom: 0.75rem;
    padding: 0;
}
.checkout-radio-card {
    display: block;
    padding: 0.85rem 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: all 0.18s;
}
.checkout-radio-card:hover { border-color: #FFB3C1; }
.checkout-radio-card:has(input:checked) { border-color: #C9184A; background: #fff7fa; }
.checkout-radio-card input { margin-right: 0.5rem; }

.checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0e6ea;
}
.checkout-help {
    text-align: center;
    color: #888;
    margin-top: 1rem;
}

/* RESULT (success / cancel / gdpr-result) */
.checkout-result {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.checkout-result__icon { font-size: 4rem; margin-bottom: 0.5rem; }
.checkout-result h1 {
    color: #C9184A;
    font-family: 'Playfair Display', serif;
    margin: 0 0 1rem;
}
.checkout-result--success h1 { color: #28a745; }
.checkout-result--warn h1    { color: #d4a24c; }
.checkout-result__msg {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}
.checkout-result__hint {
    font-size: 0.9rem;
    color: #888;
    background: #fff8f0;
    padding: 0.75rem;
    border-radius: 8px;
    margin: 1rem 0;
}
.checkout-result__details {
    background: #fff7fa;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1.5rem auto;
    text-align: left;
    max-width: 400px;
}
.checkout-result__details dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0;
}
.checkout-result__details dt { font-weight: 700; color: #6c757d; font-size: 0.9rem; }
.checkout-result__details dd { margin: 0; font-size: 0.9rem; }
.checkout-result__actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------- */
/* PAYMENTS HISTORY                                                 */
/* --------------------------------------------------------------- */
.user-subscription-card {
    border-left: 4px solid #C9184A;
}
.user-subscription__details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0 0 1rem;
}
.user-subscription__details dt { font-weight: 600; color: #6c757d; }
.user-subscription__details dd { margin: 0; }
.user-subscription__actions {
    display: flex;
    gap: 0.5rem;
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.payments-table th,
.payments-table td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}
.payments-table th {
    color: #6c757d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------- */
/* BADGES                                                           */
/* --------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warn    { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }
.badge-muted   { background: #e9ecef; color: #6c757d; }

/* --------------------------------------------------------------- */
/* ACCOUNT (GDPR)                                                   */
/* --------------------------------------------------------------- */
.user-gdpr-card {
    border-left: 4px solid #5C8001;
}
.user-gdpr-card--danger {
    border-left-color: #dc3545;
    background: #fff8f8;
}
.user-gdpr-warning {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0 1rem;
}
.user-gdpr-notice {
    padding: 0.75rem 1rem;
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    margin: 0.5rem 0;
}
.user-gdpr-notice--ok {
    background: #d4edda;
    color: #155724;
}
.user-gdpr-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.empty-state {
    color: #888;
    text-align: center;
    padding: 2rem 1rem;
    font-style: italic;
}

/* --------------------------------------------------------------- */
/* ADMIN tables + filters                                           */
/* --------------------------------------------------------------- */
.adm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.adm-table th,
.adm-table td {
    padding: 0.7rem;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.92rem;
}
.adm-table th {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.adm-empty {
    text-align: center;
    color: #888;
    padding: 2rem;
}

.adm-filters {
    display: flex;
    gap: 0.5rem;
}
.adm-filters select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.adm-results-meta { color: #6c757d; margin: 0.5rem 0; }

.adm-pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.adm-pagination a {
    padding: 0.4rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #555;
}
.adm-pagination a.is-active {
    background: #C9184A;
    color: #fff;
    border-color: #C9184A;
}

.adm-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.adm-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}
.adm-card h2 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: #444;
}
.adm-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}
.adm-dl dt { font-weight: 700; color: #6c757d; }
.adm-dl dd { margin: 0; word-break: break-word; }

/* --------------------------------------------------------------- */
/* FORM helpers (Sprint 6)                                          */
/* --------------------------------------------------------------- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 540px) {
    .form-row { grid-template-columns: 1fr; }
}
