/* assets/css/style.css */
:root {
    --ps-red: #b60000;
    --ps-red-dark: #7d0000;
    --ink: #161616;
    --muted: #666;
    --white: #fff;
    --shadow: 0 28px 80px rgba(85, 0, 0, .22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,246,246,.90)),
        url("../img/fondo_ps.jpg") center / cover fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(182,0,0,.12), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(125,0,0,.16), transparent 30%);
    pointer-events: none;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    position: relative;
    z-index: 1;
}

.hero-card,
.table-card {
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(182, 0, 0, .20);
    border-radius: 32px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero-card::before,
.table-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(125deg, rgba(182,0,0,.08), transparent 34%),
        linear-gradient(305deg, rgba(182,0,0,.12), transparent 30%);
    pointer-events: none;
}

.hero-card::after,
.table-card::after {
    content: "";
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -22px;
    height: 96px;
    background: linear-gradient(90deg, var(--ps-red-dark), var(--ps-red), var(--ps-red-dark));
    border-radius: 50% 50% 0 0;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 690px;
}

.hero-left,
.form-panel,
.table-card > * {
    position: relative;
    z-index: 1;
}

.hero-left {
    padding: 54px 50px 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-row {
    display: flex;
    gap: 24px;
    align-items: center;
}

.brand-row.compact { gap: 18px; }

.logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(90,0,0,.15));
}

.logo.small {
    width: 90px;
    height: 90px;
}

.brand-divider {
    width: 2px;
    height: 132px;
    background: linear-gradient(to bottom, transparent, var(--ps-red), transparent);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--ps-red);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
}

h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5vw, 5.2rem);
    line-height: .9;
    color: var(--ps-red);
    font-weight: 500;
}

.intro {
    max-width: 620px;
    margin: 42px 0 0;
    font-size: 1.18rem;
    line-height: 1.7;
    color: #2c2c2c;
}

.values {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 42px;
}

.values span,
.counter {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(182,0,0,.25);
    background: rgba(255,255,255,.72);
    color: var(--ps-red-dark);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form-panel {
    margin: 30px 30px 116px 0;
    padding: 34px;
    align-self: center;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(182,0,0,.18);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(70,0,0,.14);
}

.panel-header { margin-bottom: 24px; }

.panel-header h2 {
    margin: 0;
    font-size: 1.65rem;
    color: var(--ps-red-dark);
}

.panel-header p {
    margin: 7px 0 0;
    color: var(--muted);
}

.field { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: #262626;
}

input,
select {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(182,0,0,.25);
    border-radius: 16px;
    padding: 0 16px;
    font-size: 1rem;
    background: rgba(255,255,255,.92);
    outline: none;
    transition: .2s ease;
}

input:focus,
select:focus {
    border-color: var(--ps-red);
    box-shadow: 0 0 0 4px rgba(182, 0, 0, .10);
}

.error-msg {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    color: var(--ps-red);
    font-size: .84rem;
    font-weight: 700;
}

.field.has-error input,
.field.has-error select {
    border-color: var(--ps-red);
    background: #fff7f7;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 900;
    min-height: 50px;
    padding: 0 22px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-primary {
    width: 100%;
    color: white;
    background: linear-gradient(135deg, var(--ps-red), var(--ps-red-dark));
    box-shadow: 0 14px 28px rgba(182,0,0,.25);
    font-size: 1rem;
}

.btn-secondary {
    margin-top: 12px;
    width: 100%;
    color: var(--ps-red-dark);
    background: rgba(182,0,0,.08);
    border: 1px solid rgba(182,0,0,.22);
}

.btn-primary:hover,
.btn-secondary:hover { transform: translateY(-2px); }

.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.alert.ok {
    background: #edf9f0;
    color: #176b2c;
    border: 1px solid #b8e7c4;
}

.alert.error {
    background: #fff0f0;
    color: var(--ps-red-dark);
    border: 1px solid #f2b7b7;
}

.table-card { padding: 34px 34px 116px; }

.table-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.actions .btn-secondary {
    width: auto;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
    background: rgba(255,255,255,.92);
    border-radius: 20px;
    border: 1px solid rgba(182,0,0,.16);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th,
td {
    padding: 16px 15px;
    border-bottom: 1px solid rgba(182,0,0,.11);
    text-align: left;
}

th {
    color: var(--ps-red-dark);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: rgba(182,0,0,.06);
}

td { color: #252525; }

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px;
}

@media (max-width: 920px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-left { padding: 36px 28px 24px; }
    .form-panel { margin: 0 24px 110px; }
    .brand-row { align-items: flex-start; }
    .logo { width: 104px; height: 104px; }
    .brand-divider { height: 96px; }
    .table-top { align-items: flex-start; flex-direction: column; }
    .actions { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 18px, 1180px);
        padding: 18px 0;
    }
    .hero-card,
    .table-card { border-radius: 22px; }
    .brand-row { gap: 12px; }
    .brand-divider { display: none; }
    h1 { font-size: 2.55rem; }
    .form-panel {
        padding: 22px;
        margin: 0 12px 96px;
    }
    .hero-left { padding: 26px 20px 22px; }
}
