:root {
    --aw-primary: #0b6ea9;
    --aw-primary-dark: #084f7a;
    --aw-primary-soft: #eaf6fc;

    --aw-accent: #1ec8ff;
    --aw-success: #28b463;
    --aw-success-dark: #239b56;

    --aw-bg: #f4f8fb;
    --aw-card: #ffffff;
    --aw-card-2: #f9fcfe;
    --aw-border: #dce8f1;

    --aw-text: #0f172a;
    --aw-muted: #64748b;
    --aw-white: #ffffff;

    --aw-radius-sm: 12px;
    --aw-radius-md: 18px;
    --aw-radius-lg: 24px;

    --aw-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
    --aw-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --aw-shadow-lg: 0 18px 45px rgba(11, 110, 169, 0.12);

    --aw-transition: all 0.25s ease;
}

.hidden {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(30, 200, 255, 0.08), transparent 18%),
        radial-gradient(circle at top right, rgba(11, 110, 169, 0.08), transparent 22%),
        var(--aw-bg);
    color: var(--aw-text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================
   Layout general
========================= */
.aw-shell {
    max-width: 980px;
}

.aw-topbar {
    background: linear-gradient(135deg, var(--aw-primary-dark), var(--aw-primary));
    color: #fff;
    box-shadow: var(--aw-shadow-md);
}

.aw-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.aw-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.aw-card {
    background: var(--aw-card);
    border: 1px solid var(--aw-border);
    border-radius: var(--aw-radius-md);
    box-shadow: var(--aw-shadow-sm);
    transition: var(--aw-transition);
}

.aw-card:hover {
    box-shadow: var(--aw-shadow-md);
}

/* =========================
   Hero / bloques especiales
========================= */
.aw-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(11, 110, 169, 0.05), rgba(30, 200, 255, 0.04)),
        #fff;
    border: 1px solid rgba(11, 110, 169, 0.10);
    box-shadow: var(--aw-shadow-lg);
}

.aw-hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(30, 200, 255, 0.18), transparent 65%);
    pointer-events: none;
}

.aw-hero::after {
    content: "";
    position: absolute;
    bottom: -90px;
    left: -70px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(11, 110, 169, 0.10), transparent 65%);
    pointer-events: none;
}

.aw-soft-panel {
    background: linear-gradient(135deg, rgba(11, 110, 169, 0.04), rgba(255, 255, 255, 1));
    border: 1px solid rgba(11, 110, 169, 0.10);
}

/* =========================
   Títulos y texto
========================= */
.aw-section-title {
    font-weight: 800;
    letter-spacing: 0.2px;
    font-size: 1.1rem;
    margin: 0;
    color: var(--aw-text);
}

.aw-section-sub {
    color: var(--aw-muted);
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    line-height: 1.65;
}

.aw-display-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.15;
    color: var(--aw-text);
}

.aw-lead {
    color: var(--aw-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* =========================
   Pills / badges
========================= */
.aw-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--aw-border);
    background: #fff;
    border-radius: 999px;
    padding: 0.48rem 0.85rem;
    font-size: 0.85rem;
    color: var(--aw-muted);
    transition: var(--aw-transition);
}

.aw-pill:hover {
    border-color: rgba(11, 110, 169, 0.25);
    color: var(--aw-primary);
    box-shadow: 0 6px 16px rgba(11, 110, 169, 0.08);
}

/* =========================
   Divisores
========================= */
.aw-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--aw-border), transparent);
    margin: 1rem 0 1.15rem;
}

/* =========================
   Formularios
========================= */
label {
    display: inline-block;
    margin-bottom: 0.38rem;
    font-weight: 700;
    font-size: 0.93rem;
    color: var(--aw-text);
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid var(--aw-border);
    padding: 0.78rem 0.95rem;
    background: #fff;
    color: var(--aw-text);
    transition: var(--aw-transition);
}

.form-control::placeholder,
.form-select::placeholder {
    color: #94a3b8;
}

.form-control:hover,
.form-select:hover {
    border-color: #bfd5e4;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(11, 110, 169, 0.45);
    box-shadow: 0 0 0 0.22rem rgba(11, 110, 169, 0.12);
    outline: none;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border-color: #b8c9d8;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--aw-success);
    border-color: var(--aw-success);
}

.form-check-label {
    cursor: pointer;
    color: var(--aw-text);
    font-weight: 600;
}

.req {
    color: #d11a2a;
    display: inline-flex;
    align-items: center;
    margin-left: 0.2rem;
    font-weight: 700;
}

.help {
    color: var(--aw-muted);
    font-size: 0.84rem;
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* =========================
   Botones
========================= */
.btn {
    border-radius: 14px;
    padding: 0.82rem 1.1rem;
    font-weight: 700;
    transition: var(--aw-transition);
}

.btn-aw-primary {
    background: linear-gradient(135deg, var(--aw-primary), var(--aw-accent));
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px rgba(11, 110, 169, 0.20);
}

.btn-aw-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(11, 110, 169, 0.26);
}

.btn-aw-outline {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: transparent;
}

.btn-aw-outline:hover,
.btn-aw-outline:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-navbar-left {
    background: linear-gradient(135deg, var(--aw-success), #31c752);
    color: white;
    border: 1px solid var(--aw-success);
    border-radius: 14px;
    min-height: 3rem;
    box-shadow: 0 10px 22px rgba(40, 180, 99, 0.18);
}

.btn-navbar-left:hover,
.btn-navbar-left:focus {
    background: linear-gradient(135deg, var(--aw-success-dark), var(--aw-success));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(40, 180, 99, 0.24);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    border: 1px solid #dc2626;
    border-radius: 14px;
    min-height: 3rem;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.22);
}

/* =========================
   Upload
========================= */
.aw-upload {
    border: 1px dashed rgba(11, 110, 169, 0.28);
    background: linear-gradient(135deg, rgba(11, 110, 169, 0.05), rgba(30, 200, 255, 0.04));
    border-radius: 18px;
    padding: 18px;
}

.aw-preview {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--aw-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* =========================
   Texto legal / firma
========================= */
.aw-legal {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--aw-text);
    opacity: 0.95;
    line-height: 1.7;
}

#signature-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: auto;
    padding: 20px 10px 30px;
    background: linear-gradient(135deg, rgba(11, 110, 169, 0.03), rgba(255,255,255,1));
    border-radius: 20px;
}

.signature-pad {
    width: 100%;
    max-width: 700px;
    height: 300px;
    border: 1px solid var(--aw-border);
    border-radius: 18px;
    background-color: #fff;
    box-shadow: var(--aw-shadow-sm);
    overflow: hidden;
}

.signature-pad canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 18px;
    touch-action: none;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 700px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.signature-actions button {
    min-width: 160px;
    height: 44px;
    font-weight: 700;
}

/* =========================
   Footer
========================= */
.aw-footer {
    color: #eaf0ff;
    background: linear-gradient(135deg, var(--aw-primary-dark), var(--aw-primary));
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    overflow: hidden;
}

.aw-footer a {
    color: #d6f2ff;
    text-decoration: none;
}

.aw-footer a:hover {
    text-decoration: underline;
}

/* =========================
   Cards de confianza / proceso
========================= */
.aw-feature-card {
    text-align: center;
    height: 100%;
    padding: 1.5rem;
}

.aw-feature-card .icon-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(11, 110, 169, 0.10), rgba(30, 200, 255, 0.10));
    color: var(--aw-primary);
    box-shadow: inset 0 0 0 1px rgba(11, 110, 169, 0.08);
}

.aw-step-card {
    background: var(--aw-card-2);
    border: 1px solid var(--aw-border);
    border-radius: 18px;
    padding: 1rem;
    height: 100%;
    transition: var(--aw-transition);
}

.aw-step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--aw-shadow-sm);
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .aw-shell {
        max-width: 100%;
    }

    .aw-brand img {
        width: 56px;
        height: 56px;
    }

    .aw-section-title {
        font-size: 1rem;
    }

    .aw-display-title {
        font-size: 1.9rem;
    }

    .btn,
    .btn-navbar-left,
    .btn-danger {
        width: 100%;
    }

    .signature-pad {
        height: 240px;
    }

    .signature-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .signature-actions button {
        width: 100%;
    }
}

/******************************************************************
*                Estulo para el contenedor de la firma
******************************************************************/


#signature-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 50vh;
    padding: 20px 10px 60px;
    background-color: #f8f9fa;
}

.signature-pad {
    width: 100%;
    max-width: 700px;
    height: 300px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.signature-pad canvas {
    width: 95%;
    height: 95%;
    border-radius: 5px;
    touch-action: none;
}

.signature-actions {
    display: flex;
    justify-content: space-between;
    width: 95%;
    max-width: 700px;
}

.signature-actions button {
    flex: -1;
    width: 150px;
    height: 40px;
    font-weight: bold;
}