/* ==========================================================================
   INSTANET CONTRACTS SYSTEM - PREMIUM UI V4.0 (Glassmorphism & Tech)
   ========================================================================== */

:root {
    /* --- PALETA DE COLORES PREMIUM --- */
    --instc-primary-900: #0f172a;
    /* Azul noche profundo (Fondo principal) */
    --instc-primary-800: #1e293b;
    /* Azul grisáceo oscuro (Tarjetas fondo) */
    --instc-primary-700: #334155;
    /* Bordes sutiles */

    --instc-accent-500: #3b82f6;
    /* Azul eléctrico (Botones, acentos) */
    --instc-accent-600: #2563eb;
    /* Hover botones */
    --instc-accent-glow: rgba(59, 130, 246, 0.5);
    /* Resplandor */

    --instc-success: #10b981;
    /* Verde esmeralda */
    --instc-danger: #ef4444;
    /* Rojo brillante */
    --instc-warning: #f59e0b;
    /* Ambar */

    --instc-text-100: #f8fafc;
    /* Blanco casi puro */
    --instc-text-300: #cbd5e1;
    /* Gris claro (Textos secundarios) */
    --instc-text-400: #94a3b8;
    /* Gris medio (Muted) */

    /* --- VIDRIO / GLASSMORPHISM --- */
    --instc-glass-bg: rgba(30, 41, 59, 0.7);
    /* Fondo semitransparente */
    --instc-glass-border: rgba(255, 255, 255, 0.08);
    /* Borde sutil */
    --instc-glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    /* Sombra difusa */
    --instc-backdrop-blur: blur(12px);

    /* --- SPACING & RADIUS --- */
    --instc-radius-lg: 16px;
    --instc-radius-md: 12px;
    --instc-radius-sm: 8px;
    --instc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
.instc-app-root {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--instc-text-100);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Scrollbar moderna */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--instc-primary-900);
}

::-webkit-scrollbar-thumb {
    background: var(--instc-primary-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--instc-accent-500);
}

/* ==========================================================================
   COMPONENTES: CARDS (GLASSMORPHISM)
   ========================================================================== */
.instc-card,
.instc-search-container,
.instc-wizard-container {
    background: var(--instc-glass-bg);
    backdrop-filter: var(--instc-backdrop-blur);
    -webkit-backdrop-filter: var(--instc-backdrop-blur);
    border: 1px solid var(--instc-glass-border);
    box-shadow: var(--instc-glass-shadow);
    border-radius: var(--instc-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--instc-transition);
    position: relative;
    overflow: hidden;
}

/* Efecto de borde brillante sutil al hover */
.instc-card:hover,
.instc-search-container:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

/* Títulos de sección */
.instc-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f8fafc;
    width: fit-content;
}

.instc-subtitle {
    color: var(--instc-text-400);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ==========================================================================
   FORMULARIOS & INPUTS
   ========================================================================== */
.instc-form-group {
    margin-bottom: 1.5rem;
}

.instc-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--instc-text-300);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.instc-input,
.instc-select,
.instc-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--instc-primary-700);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--instc-radius-md);
    font-size: 1rem;
    transition: var(--instc-transition);
}

.instc-input:focus,
.instc-select:focus,
.instc-textarea:focus {
    outline: none;
    border-color: var(--instc-accent-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.instc-input::placeholder {
    color: var(--instc-text-400);
    opacity: 0.7;
}

/* ==========================================================================
   BOTONES PREMIUM
   ========================================================================== */
.instc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--instc-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--instc-transition);
    border: none;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* Efecto ripple sutil */
.instc-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.instc-btn:active::after {
    width: 300px;
    height: 300px;
}

.instc-btn-primary {
    background: linear-gradient(135deg, var(--instc-accent-500), var(--instc-accent-600));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.instc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--instc-accent-glow);
}

.instc-btn-secondary {
    background: transparent;
    border: 1px solid var(--instc-primary-700);
    color: var(--instc-text-300);
}

.instc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--instc-text-300);
    color: white;
}

.instc-btn:disabled,
.instc-btn.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* ==========================================================================
   RESULTADOS DE BÚSQUEDA (GRID SYSTEM)
   ========================================================================== */
.cliente-result-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--instc-primary-700);
    padding: 1.25rem;
    border-radius: var(--instc-radius-md);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--instc-transition);
}

.cliente-result-card:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--instc-accent-500);
    transform: scale(1.01);
}

.cliente-info h4 {
    margin: 0;
    color: var(--instc-text-100);
    font-size: 1.1rem;
}

.cliente-meta {
    font-size: 0.85rem;
    color: var(--instc-text-400);
    margin-top: 0.25rem;
    display: flex;
    gap: 1rem;
}

.cliente-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   CHECKBOXES & RADIOS PERSONALIZADOS
   ========================================================================== */
.instc-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.instc-radio-card {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.instc-radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.instc-radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--instc-primary-700);
    border-radius: var(--instc-radius-md);
    cursor: pointer;
    transition: var(--instc-transition);
    height: 100%;
    text-align: center;
}

.instc-radio-card input:checked+.instc-radio-label {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--instc-accent-500);
    color: white;
    box-shadow: 0 0 0 1px var(--instc-accent-500);
}

.instc-radio-icon {
    margin-bottom: 0.5rem;
    color: var(--instc-text-400);
    transition: var(--instc-transition);
}

.instc-radio-card input:checked+.instc-radio-label .instc-radio-icon {
    color: var(--instc-accent-500);
    transform: scale(1.1);
}

/* ==========================================================================
   MODALES (GLASSMORPHISM PURO)
   ========================================================================== */
.instc-modal-overlay {
    background: rgba(15, 23, 42, 0.85);
    /* Fondo oscuro */
    backdrop-filter: blur(8px);
}

.instc-modal-content {
    background: #1e293b;
    /* Fallback */
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--instc-primary-700);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: var(--instc-text-100);
    border-radius: var(--instc-radius-lg);
}

.instc-modal-header {
    border-bottom: 1px solid var(--instc-primary-700);
    padding: 1.5rem;
}

.instc-modal-body {
    padding: 1.5rem;
}

.instc-modal-footer {
    border-top: 1px solid var(--instc-primary-700);
    background: rgba(15, 23, 42, 0.3);
    padding: 1rem 1.5rem;
}

/* ==========================================================================
   UTILITIES & ANIMACIONES
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.text-accent {
    color: var(--instc-accent-500);
}

.text-muted {
    color: var(--instc-text-400);
}

/* Grid responsive */
.instc-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .instc-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Spinner de carga */
.instc-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--instc-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   ALIASES & COMPATIBILIDAD V4.0
   ========================================================================== */
/* Fix para el Checkmark gigante */
svg {
    max-width: 100%;
    height: auto;
}

.wizard-success-icon svg,
.step-icon svg {
    width: 64px;
    height: 64px;
}

/* Aplicar estilos Premium a elementos sin clase del Wizard */
#instc-wizard-form-step1 input:not([type="checkbox"]):not([type="radio"]),
#instc-wizard-form-step2 input:not([type="checkbox"]):not([type="radio"]),
#instc-wizard-form-step3 input:not([type="checkbox"]):not([type="radio"]),
#instc-wizard-form-step1 select,
#instc-wizard-form-step2 select,
#instc-wizard-form-step3 select,
.instc-wizard-container input[type="text"],
.instc-wizard-container input[type="email"],
.instc-wizard-container input[type="number"],
.instc-wizard-container select {
    /* Copy of .instc-input */
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--instc-primary-700);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--instc-radius-md);
    font-size: 1rem;
    transition: var(--instc-transition);
    margin-bottom: 1px;
    /* Avoid collapse */
}

/* Focus states */
#instc-wizard-form-step1 input:focus,
#instc-wizard-form-step2 input:focus,
#instc-wizard-form-step3 input:focus,
.instc-wizard-container input:focus,
.instc-wizard-container select:focus {
    outline: none;
    border-color: var(--instc-accent-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

/* Labels */
#instc-wizard-form-step1 label,
#instc-wizard-form-step2 label,
#instc-wizard-form-step3 label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--instc-text-300);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons compatibility */
.button-primary,
button[type="submit"] {
    /* Copy of .instc-btn + .instc-btn-primary */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--instc-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--instc-transition);
    border: none;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--instc-accent-500), var(--instc-accent-600));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.button-secondary,
button[type="button"] {
    /* Copy of .instc-btn + .instc-btn-secondary */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--instc-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--instc-transition);
    border: 1px solid var(--instc-primary-700);
    background: transparent;
    color: var(--instc-text-300);
}

.button-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--instc-accent-glow);
}

.button-secondary:hover,
button[type="button"]:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--instc-text-300);
    color: white;
}

/* Fix para layout de checkboxes */
input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--instc-accent-500);
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Layout container fix */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--instc-primary-700);
}

/* ==========================================================================
   PREMIUM UI ENHANCEMENTS V5.0 - NEXT LEVEL INTERFACE
   ========================================================================== */

/* --- ANIMATED GRADIENT BACKGROUNDS --- */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

/* --- ENHANCED CARD STYLES --- */
.card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.5s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent);
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.1) inset;
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card__header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.card__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.card__subtitle {
    color: var(--instc-text-400);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.card__body {
    padding: 24px 28px;
}

/* --- PREMIUM BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn--primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8);
    background-size: 200% 200%;
    color: white;
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn--primary:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--success {
    background: linear-gradient(135deg, #10b981, #059669, #047857);
    background-size: 200% 200%;
    color: white;
    box-shadow: 
        0 8px 24px rgba(16, 185, 129, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn--success:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(16, 185, 129, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    animation: glow 2s ease-in-out infinite;
}

.btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--instc-text-300);
    backdrop-filter: blur(8px);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding: 18px 32px;
    font-size: 1.05rem;
    border-radius: 14px;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.is-loading .btn__text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- FORM INPUTS PREMIUM --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--instc-text-300);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--instc-accent-500);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- DATA GRID (RESUMEN) --- */
.data-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-size: 0.9rem;
    color: var(--instc-text-400);
    font-weight: 500;
}

.data-value {
    font-size: 0.95rem;
    color: var(--instc-text-100);
    font-weight: 600;
    text-align: right;
}

/* --- CONSENT ITEMS PREMIUM --- */
.consent-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.consent-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 41, 59, 0.8));
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.consent-item.is-checked {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    border-color: rgba(59, 130, 246, 0.4);
}

.consent-item.is-required {
    border-left: 3px solid #f59e0b;
}

.consent-item.is-required.is-checked {
    border-left-color: #10b981;
}

.consent-checkbox {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border: 2px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.consent-item.is-checked .consent-checkbox {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.consent-checkbox svg {
    width: 16px !important;
    height: 16px !important;
    opacity: 0;
    color: white;
    transition: all 0.2s ease;
    transform: scale(0.5);
}

.consent-item.is-checked .consent-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.consent-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.consent-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    margin-bottom: 4px;
}

.consent-badge--required {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.consent-badge--optional {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.consent-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--instc-text-100);
}

.consent-desc {
    font-size: 0.85rem;
    color: var(--instc-text-400);
    line-height: 1.5;
}

/* --- TOAST NOTIFICATIONS PREMIUM --- */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast__icon svg {
    width: 24px !important;
    height: 24px !important;
}

.toast--success {
    border-left: 4px solid #10b981;
}
.toast--success .toast__icon { color: #10b981; }

.toast--warning {
    border-left: 4px solid #f59e0b;
}
.toast--warning .toast__icon { color: #f59e0b; }

.toast--error {
    border-left: 4px solid #ef4444;
}
.toast--error .toast__icon { color: #ef4444; }

.toast--info {
    border-left: 4px solid #3b82f6;
}
.toast--info .toast__icon { color: #3b82f6; }

.toast__message {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--instc-text-100);
}

.toast__close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--instc-text-400);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.toast__close svg {
    width: 16px !important;
    height: 16px !important;
}

/* --- MODAL PREMIUM --- */
.modal.is-open {
    display: flex;
}

.modal.is-open .modal__backdrop {
    animation: fadeIn 0.3s ease;
}

.modal.is-open .modal__content {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal__backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal__content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    color: var(--instc-text-100);
    border-radius: 20px;
}

.modal__header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal__header h2 {
    color: #f8fafc;
    font-weight: 800;
}

/* --- SIGNATURE PAD PREMIUM --- */
.signature-pad-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), #f8fafc);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) inset;
}

.signature-pad-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    transition: opacity 0.3s ease;
    gap: 8px;
}

.signature-pad-placeholder svg {
    width: 48px !important;
    height: 48px !important;
    opacity: 0.5;
}

#signature-canvas {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    cursor: crosshair;
    touch-action: none;
}

/* --- STEP INDICATORS --- */
.step {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.is-active {
    opacity: 1;
}

.step.is-done {
    opacity: 1;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.step.is-active .step-dot {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.step.is-done .step-dot {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: white;
}

.step-dot svg {
    width: 18px !important;
    height: 18px !important;
}

.step-line {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.step-line.is-done {
    background: linear-gradient(90deg, #10b981, #059669);
}

.step-line.is-active {
    background: linear-gradient(90deg, #10b981, rgba(59, 130, 246, 0.3));
}

/* --- UTILITY CLASSES --- */
.mb-4 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- RESPONSIVE ENHANCEMENTS --- */
@media (max-width: 640px) {
    .card__header,
    .card__body {
        padding: 18px 20px;
    }
    
    .btn--lg {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    #toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
    
    .consent-item {
        padding: 14px 16px;
    }

    .modal__content--otp {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
}

/* ==========================================================================
   OTP VERIFICATION MODAL
   ========================================================================== */
.modal__content--otp {
    background: #ffffff !important;
    color: #333 !important;
    max-width: 440px;
    width: 90%;
    margin: auto;
    border-radius: 16px;
    overflow: hidden;
}

.modal__content--otp .modal__header {
    padding: 20px 24px;
    border-bottom: none;
}

.modal__content--otp .modal__header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.modal__content--otp .modal__close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.modal__content--otp .modal__close:hover {
    background: rgba(255,255,255,0.35);
}

#otp-code-input {
    transition: border-color 0.2s;
}

#otp-code-input:focus {
    border-color: #2d4a6f !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 74, 111, 0.15);
}