﻿:root {
    --ag-primary: #0099e6;
    --ag-primary-dark: #0077b3;
    --ag-primary-light: #e6f6ff;
    --ag-accent: #00c2ff;
    --ag-success: #10b981;
    --ag-warning: #f59e0b;
    --ag-danger: #ef4444;
    --ag-text: #1e293b;
    --ag-muted: #64748b;
    --ag-border: #e2e8f0;
    --ag-bg: #f1f5f9;
    --ag-card: #ffffff;
    --ag-radius: 16px;
    --ag-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --ag-shadow-hover: 0 12px 32px rgba(0, 153, 230, 0.15);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--ag-bg);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(0, 153, 230, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 194, 255, 0.06) 0%, transparent 50%);
    color: var(--ag-text);
    min-height: 100vh;
    padding-bottom: 5rem;
}

/* Navbar */
.navbar-ag {
    background: linear-gradient(135deg, var(--ag-primary) 0%, var(--ag-accent) 100%);
    box-shadow: 0 2px 20px rgba(0, 119, 179, 0.25);
    padding: 0.75rem 0;
}

.navbar-ag .navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.navbar-ag .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover;
}

/* Layout */
.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--ag-text);
    margin-bottom: 0.35rem;
}

.page-header p {
    color: var(--ag-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Panels */
.panel {
    background: var(--ag-card);
    border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow);
    border: 1px solid var(--ag-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ag-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title i {
    color: var(--ag-primary);
}

/* Alerts */
.alert-modern {
    border: none;
    border-radius: var(--ag-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-modern-warning {
    background: #fffbeb;
    border-left-color: var(--ag-warning);
    color: #92400e;
}

.alert-modern-warning .alert-heading {
    color: #78350f;
    font-size: 1rem;
    font-weight: 700;
}

/* Table */
.servicios-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--ag-border);
}

.servicios-table {
    margin: 0;
    font-size: 0.9rem;
}

.servicios-table thead {
    background: var(--ag-primary-light);
}

.servicios-table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ag-muted);
    border: none;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.servicios-table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--ag-border);
}

.servicios-table tbody tr:hover {
    background: #f8fafc;
}

.servicios-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.1rem 0.2rem 0.1rem 0;
    white-space: nowrap;
}

.tag-ok { background: #d1fae5; color: #065f46; }
.tag-no { background: #fee2e2; color: #991b1b; }
.tag-warn { background: #fef3c7; color: #92400e; }

/* Mobile cards */
.servicio-card {
    background: #f8fafc;
    border: 1px solid var(--ag-border);
    border-radius: 12px;
    padding: 1.15rem;
    margin-bottom: 0.75rem;
}

.servicio-card .nombre {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--ag-text);
}

.servicio-card .badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.servicio-card .meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
}

.servicio-card .meta-label {
    color: var(--ag-muted);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.15rem;
}

/* Promo */
.promo-deb-alumnos {
    border: none;
    border-radius: var(--ag-radius);
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--ag-shadow);
    position: relative;
    overflow: hidden;
}

.promo-deb-alumnos::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
}

.promo-deb-alumnos .promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--ag-success);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
    position: relative;
}

.promo-deb-alumnos h5 {
    font-weight: 800;
    position: relative;
}

.promo-deb-alumnos ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
    position: relative;
}

.promo-deb-alumnos .nota-clara {
    background: rgba(255,255,255,0.85);
    border-left: 3px solid var(--ag-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.88rem;
    position: relative;
}

.deb-alumnos-tier-note {
    font-size: 0.65rem;
    color: #94a3b8;
    opacity: 0.75;
    margin: 0.85rem 0 0;
    line-height: 1.45;
    text-align: right;
}

.deb-alumnos-modal {
    border: 0;
    border-radius: var(--ag-radius);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.deb-alumnos-modal .modal-body a {
    color: var(--ag-primary);
}

.deb-alumnos-modal .modal-body a:hover {
    color: var(--ag-primary-dark);
}

.alert-modern .deb-alumnos-tier-note {
    text-align: left;
    margin-top: 0.35rem;
}

.legend-box .deb-alumnos-tier-note {
    display: block;
    text-align: left;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Legend */
.legend-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    color: var(--ag-muted);
    line-height: 1.7;
}

.legend-box strong {
    color: var(--ag-text);
}

/* Total */
.total-card {
    background: linear-gradient(135deg, var(--ag-primary) 0%, var(--ag-accent) 100%);
    border-radius: var(--ag-radius);
    padding: 1.75rem 2rem;
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 153, 230, 0.3);
}

.total-card .total-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.35rem;
}

.total-card .total-amount {
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
}

.total-card .total-hint {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Payment cards */
.pay-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ag-muted);
    margin-bottom: 1rem;
    text-align: center;
}

.pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.pay-card {
    background: var(--ag-card);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pay-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ag-shadow-hover);
    border-color: var(--ag-primary);
}

.pay-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.pay-card-icon-transfer { background: #dbeafe; color: #1d4ed8; }
.pay-card-icon-card { background: #ede9fe; color: #6d28d9; }
.pay-card-icon-mp { background: #cffafe; color: #0891b2; }

.pay-card h5 {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
}

.pay-card p {
    font-size: 0.88rem;
    color: var(--ag-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.pay-card .pay-highlight {
    background: #ecfdf5;
    color: #065f46;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.pay-card .pay-highlight strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.15rem;
}

.pay-card small {
    font-size: 0.78rem;
    color: var(--ag-muted);
    display: block;
    margin-bottom: 1rem;
}

.btn-ag {
    background: linear-gradient(135deg, var(--ag-primary) 0%, var(--ag-accent) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    border-radius: 999px;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-ag:hover {
    color: #fff;
    opacity: 0.92;
    transform: scale(1.02);
}

/* PayPal section */
.paypal-panel {
    max-width: 480px;
    margin: 0 auto;
}

.meses-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.meses-selector label {
    background: #f1f5f9;
    border: 2px solid var(--ag-border);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.meses-selector input:checked + label,
.meses-selector label:has(input:checked) {
    background: var(--ag-primary-light);
    border-color: var(--ag-primary);
    color: var(--ag-primary-dark);
    font-weight: 600;
}

.meses-selector input { display: none; }

/* WhatsApp float */
.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.6);
}

@media (max-width: 767px) {
    .page-wrap { padding: 1.25rem 0.85rem 3rem; }
    .panel { padding: 1.15rem; }
    .total-card { padding: 1.35rem 1.25rem; }
}
/* Form pages */
.page-wrap-narrow { max-width: 720px; }
.page-wrap-full {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
@media (max-width: 767px) {
    .page-wrap-full {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}
.alert-modern-info { background: #eff6ff; border-left-color: var(--ag-primary); color: #1e40af; }
.alert-modern-success { background: #ecfdf5; border-left-color: var(--ag-success); color: #065f46; }
.form-group-ag { margin-bottom: 1.25rem; }
.form-group-ag > label { font-weight: 600; font-size: 0.88rem; color: var(--ag-text); margin-bottom: 0.4rem; display: block; }
.form-control-ag { border-radius: 10px; border: 1px solid var(--ag-border); padding: 0.65rem 0.85rem; }
.form-control-ag:focus { border-color: var(--ag-primary); box-shadow: 0 0 0 3px rgba(0, 153, 230, 0.15); }
.meses-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.meses-pills label { background: #f1f5f9; border: 2px solid var(--ag-border); border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.15s; margin: 0; }
.meses-pills label:has(input:checked) { background: var(--ag-primary-light); border-color: var(--ag-primary); color: var(--ag-primary-dark); font-weight: 600; }
.meses-pills input { display: none; }
.meses-pills .off-badge { background: var(--ag-success); color: #fff; font-size: 0.62rem; padding: 0.12rem 0.4rem; border-radius: 999px; margin-left: 0.25rem; font-weight: 700; }
.total-card-compact { background: linear-gradient(135deg, var(--ag-primary) 0%, var(--ag-accent) 100%); border-radius: var(--ag-radius); padding: 1.25rem 1.5rem; color: #fff; text-align: center; margin: 1.25rem 0; box-shadow: 0 6px 24px rgba(0, 153, 230, 0.25); }
.total-card-compact .total-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.total-card-compact .total-amount { font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 800; line-height: 1.2; }
.cuenta-box { background: #f8fafc; border: 1px solid var(--ag-border); border-radius: 12px; padding: 1rem 1.25rem; font-size: 0.9rem; line-height: 1.8; margin-top: 0.75rem; }
.btn-ag-outline { background: transparent; border: 2px solid var(--ag-primary); color: var(--ag-primary); font-weight: 600; padding: 0.5rem 1.25rem; border-radius: 999px; transition: all 0.2s; }
.btn-ag-outline:hover { background: var(--ag-primary-light); color: var(--ag-primary-dark); }
.btn-ag-lg { padding: 0.75rem 2.25rem; font-size: 1rem; }
.text-hint { font-size: 0.82rem; color: var(--ag-muted); }
.secure-note { font-size: 0.82rem; color: var(--ag-muted); margin-top: 0.75rem; }
