/* Portal del cliente - Servicable Rio Acarigua */
:root {
    --p-bg: #0f172a;
    --p-surface: #1e293b;
    --p-surface-2: #263548;
    --p-border: #334155;
    --p-text: #e2e8f0;
    --p-muted: #94a3b8;
    --p-primary: #3b82f6;
    --p-green: #22c55e;
    --p-amber: #f59e0b;
    --p-red: #ef4444;
}

/* Layout */
body { background: var(--p-bg); color: var(--p-text); font-family: system-ui, -apple-system, sans-serif; }
.p-topbar { background: var(--p-surface); border-bottom: 1px solid var(--p-border); }
.p-wrap { padding: 1.5rem 1rem 3rem; }
.p-col { max-width: 640px; margin: 0 auto; gap: 1.25rem; }
.p-card { background: var(--p-surface); border: 1px solid var(--p-border); border-radius: .5rem; }
.p-card-body { padding: 1.5rem; }
.p-footer { padding: 1rem; color: var(--p-muted); font-size: .8rem; }

/* Forms */
.p-field { margin-bottom: 1rem; }
.p-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--p-muted); margin-bottom: .5rem; }
.p-input { width: 100%; padding: .6rem .8rem; background: var(--p-surface-2); border: 1px solid var(--p-border); border-radius: .375rem; color: var(--p-text); font-size: 1rem; }
.p-input:focus { outline: none; border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.p-input[readonly] { background: var(--p-surface); border-color: var(--p-border); color: var(--p-muted); }
.p-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath stroke='var(--p-text)' stroke-width='2' d='M5 3l5 5L5 13'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-right: 1rem center; padding-right: 2.5rem; }
.p-select:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.p-file { overflow: hidden; }
.p-file::file-selector-button { padding: .5rem 1rem; background: var(--p-primary); color: white; border: none; border-radius: .375rem; cursor: pointer; font-size: .875rem; }
.p-file::file-selector-button:hover { background: #2563eb; }

/* Buttons */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1rem; font-size: .875rem; font-weight: 500; border-radius: .375rem; cursor: pointer; border: none; }
.p-btn-primary { background: var(--p-primary); color: white; }
.p-btn-primary:hover { background: #2563eb; }
.p-btn-secondary { background: var(--p-surface-2); color: var(--p-text); }
.p-btn-secondary:hover { background: var(--p-surface); }
.p-btn-danger { background: var(--p-red); color: white; }
.p-btn-block { width: 100%; }
.p-btn-wa { background: #25d366; color: #0b1a10; font-weight: 600; gap: .6rem; }
.p-btn-wa:hover { background: #1eb257; color: #0b1a10; }
.p-btn-wa i { font-size: 1.25rem; }

/* Resumen del monto a pagar */
.p-resumen { background: var(--p-surface-2); border: 1px solid var(--p-border); border-radius: .5rem; padding: .85rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.p-resumen-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .875rem; color: var(--p-muted); }
.p-resumen-row strong, .p-resumen-row span:last-child { color: var(--p-text); }
.p-resumen-monto { font-size: 1.15rem; color: var(--p-green) !important; }

/* banners */
.p-banner { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .75rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; }
.p-banner-ok { background: rgba(34,197,94,.12); border: 1px solid var(--p-green); color: var(--p-green); }
.p-banner-warning { background: rgba(245,158,11,.12); border: 1px solid #fbbf24; color: #fbbf24; }
.p-banner-danger { background: rgba(239,68,68,.12); border: 1px solid #fca5a5; color: #fca5a5; }

/* Validation */
.p-error-msg { color: var(--p-red); font-size: .75rem; margin-top: .25rem; display: none; }
.p-field.p-error { border-color: var(--p-red) !important; }
.p-shake { animation: p-shake .18s ease 2; }
@keyframes p-shake { 0% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-8px); } 80% { transform: translateX(8px); } 100% { transform: translateX(0); } }

/* SweetAlert2 oscuro (mismos colores del portal) */
.swal2-popup.dark-swal {
    background: var(--p-surface) !important;
    color: var(--p-text) !important;
    border: 1px solid var(--p-border);
    border-radius: .5rem !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.swal2-popup.dark-swal .swal2-title { color: var(--p-text) !important; font-weight: 700; }
.swal2-popup.dark-swal .swal2-html-container { color: var(--p-muted) !important; }
.swal2-popup.dark-swal .swal2-icon { border-color: var(--p-border); }
.swal2-popup.dark-swal .swal2-confirm {
    background: var(--p-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: .375rem !important;
    padding: .5rem 1.5rem !important;
    font-weight: 600 !important;
    cursor: pointer;
}
.swal2-popup.dark-swal .swal2-confirm:hover { background: #2563eb !important; }
.swal2-popup.dark-swal .swal2-cancel {
    background: transparent !important;
    border: 1px solid var(--p-border) !important;
    color: var(--p-text) !important;
    border-radius: .375rem !important;
}
.swal2-container { z-index: 2000; }

/* Mejoras de estilo del dashboard del portal */
.p-topbar {
    padding: 1rem 1.25rem;
    border-radius: .6rem;
    background: linear-gradient(135deg, #1b2b45 0%, var(--p-surface) 60%);
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.p-topbar-inner { display: flex; align-items: center; gap: .85rem; }
.p-brand-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: .65rem;
    background: rgba(59,130,246,.16);
    border: 1px solid rgba(59,130,246,.35);
    color: #93c5fd;
    font-size: 1.25rem;
}
.p-brand-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5));
}
.p-title { font-size: 1.35rem; font-weight: 700; margin: 0; letter-spacing: .01em; }
.p-sub { font-size: .82rem; color: var(--p-muted); margin: .15rem 0 0; }
.p-card { box-shadow: 0 4px 18px rgba(0,0,0,.25); border-radius: .6rem; }
.p-card-body { padding: 1.6rem; }
.p-banner { border-radius: .5rem; padding: .65rem .9rem; }
.p-banner-info { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.35); color: #93c5fd; }
.p-banner strong { color: inherit; }

/* Datos del pago móvil */
.p-datos-card {
    padding: 1rem 1.15rem;
    border-radius: .55rem;
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.35);
}
.p-datos-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: .5rem;
}
.p-datos-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .35rem 0;
    border-top: 1px solid rgba(148,163,184,.15);
    font-size: .92rem;
}
.p-datos-row:first-child { border-top: 0; }
.p-datos-row span { color: var(--p-muted); }
.p-datos-row strong {
    color: var(--p-text);
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.p-datos-nota { font-size: .78rem; color: var(--p-muted); margin: .6rem 0 0; }

/* Monto destacado */
.p-monto-card {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1rem 1.15rem;
    border-radius: .55rem;
    background: linear-gradient(135deg, rgba(34,197,94,.14) 0%, rgba(34,197,94,.04) 100%);
    border: 1px solid rgba(34,197,94,.35);
}
.p-monto-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #86efac; font-weight: 700; }
.p-monto-valor { font-size: 1.9rem; font-weight: 700; line-height: 1.15; color: var(--p-green); text-shadow: 0 0 14px rgba(34,197,94,.35); }
.p-monto-plan { font-size: .8rem; color: var(--p-muted); }

.p-btn { transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.p-btn:hover { transform: translateY(-1px); }
.p-btn:active { transform: translateY(0); }
.p-btn-primary { box-shadow: 0 4px 12px rgba(59,130,246,.35); }
.p-btn-primary:hover { box-shadow: 0 6px 16px rgba(59,130,246,.45); }
.p-input, .p-select { transition: border-color .15s ease, box-shadow .15s ease; }
.p-input:focus, .p-select:focus { box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.p-input-lg { padding: .8rem .9rem; font-size: 1.15rem; font-weight: 600; letter-spacing: .12em; }
.p-input-lg::placeholder { font-weight: 400; letter-spacing: normal; color: #64748b; }
.p-resumen { box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.p-resumen-monto { font-size: 1.35rem; text-shadow: 0 0 10px rgba(34,197,94,.3); }
.p-footer { border-top: 1px solid var(--p-border); padding-top: 1rem; }

/* Responsive */
@media (max-width: 520px) {
    .p-col { padding: 0 1rem; }
    .p-topbar { padding: 0 1rem; }
}