/* ========================================
   ABOGADO CLICK — Professional Legal App
   Paleta: Navy + Dorado + Pergamino
   ======================================== */

/* ---- GOOGLE FONTS (Serif for legal feel) ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* COLORES PRINCIPALES */
    --navy:          #0B1A30;
    --navy-light:    #122544;
    --navy-mid:      #1B3A5C;
    --gold:          #C5A55A;
    --gold-hover:    #B3933F;
    --gold-light:    #D4BA7A;
    --gold-soft:     rgba(197, 165, 90, 0.12);
    --pergamino:     #E8DCC8;
    --pergamino-light:#F0E8D8;
    --marfil:        #F5F3EF;
    --white:         #FFFFFF;

    /* TEXTO */
    --text-primary:  #1A1D23;
    --text-secondary:#4A5060;
    --text-muted:    #6B7280;
    --text-light:    #9CA3AF;
    --text-on-dark:  #E8E0D4;

    /* FUNCIONALES */
    --success:       #2D8B5F;
    --success-soft:  rgba(45, 139, 95, 0.10);
    --danger:        #C0392B;
    --danger-soft:   rgba(192, 57, 43, 0.10);
    --warning:       #E67E22;
    --info:          #2980B9;

    /* LAYOUT */
    --radius:        14px;
    --radius-sm:     8px;
    --radius-lg:     20px;
    --shadow:        0 2px 16px rgba(11, 26, 48, 0.08);
    --shadow-lg:     0 8px 32px rgba(11, 26, 48, 0.12);
    --shadow-gold:   0 4px 16px rgba(197, 165, 90, 0.25);

    /* FONTS */
    --font-heading:  'Playfair Display', 'Georgia', serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--marfil);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ========== SPLASH SCREEN ========== */
.splash-screen {
    position: fixed; inset: 0; z-index: 10000;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy-mid) 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash-screen.fade-out { opacity: 0; visibility: hidden; }
.splash-logo {
    width: 90px; height: 90px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    animation: splashPulse 2s ease-in-out infinite;
}
.splash-logo i { font-size: 2.5rem; color: var(--gold); }
.splash-title {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 20px;
    letter-spacing: 1px;
}
.splash-slogan {
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 300;
    margin-top: 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.splash-loader {
    width: 40px; height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}
.splash-loader::after {
    content: '';
    display: block;
    width: 60%;
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    animation: splashLoad 1.5s ease-in-out infinite;
}
@keyframes splashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(197,165,90,0.3); }
    50% { transform: scale(1.03); box-shadow: 0 0 30px 10px rgba(197,165,90,0.1); }
}
@keyframes splashLoad {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ========== NAVBAR ========== */
.navbar-legal {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    box-shadow: 0 2px 12px rgba(11, 26, 48, 0.25);
    padding: 0.5rem 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--gold);
}
.navbar-legal .navbar-brand {
    font-family: var(--font-heading);
    color: var(--white) !important;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 10px;
}
.navbar-legal .brand-icon {
    width: 34px; height: 34px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.navbar-legal .brand-icon i { color: var(--gold); font-size: 0.9rem; }
.navbar-legal .nav-link {
    color: var(--text-on-dark) !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.navbar-legal .nav-link:hover,
.navbar-legal .nav-link:focus {
    color: var(--gold) !important;
    background: rgba(197, 165, 90, 0.08);
}
.navbar-legal .nav-link i { margin-right: 4px; }
.navbar-legal .navbar-toggler {
    border: 1px solid var(--gold);
    padding: 4px 8px;
}
.navbar-legal .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23C5A55A' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-spacer { height: 62px; }

/* ========== AUTH SCREENS ========== */
.auth-container {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 40%, var(--navy-mid) 100%);
    position: relative;
}
.auth-container::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C5A55A' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    border-top: 4px solid var(--gold);
}
.auth-logo {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: var(--navy);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-gold);
}
.auth-logo i { color: var(--gold); font-size: 1.8rem; }
.auth-title {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 16px;
}
.auth-slogan {
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, var(--pergamino), transparent);
}
.auth-divider span { color: var(--text-muted); font-size: 0.75rem; }

/* ========== FORMS ========== */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #D1D5DB;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--white);
    transition: all 0.25s;
    color: var(--text-primary);
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
    outline: none;
}
.form-control::placeholder { color: var(--text-light); }
.input-group-text {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--marfil);
    border: 1.5px solid #D1D5DB;
    border-right: none;
    color: var(--navy-mid);
    font-size: 0.9rem;
}

/* ========== BUTTONS ========== */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy) !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: all 0.25s;
    box-shadow: var(--shadow-gold);
}
.btn-gold:hover, .btn-gold:active {
    background: linear-gradient(135deg, var(--gold-hover), var(--gold));
    color: var(--navy) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(197, 165, 90, 0.35);
}
.btn-navy {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white) !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.25s;
}
.btn-navy:hover { background: var(--navy-mid); color: var(--white) !important; }
.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold) !important;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.25s;
}
.btn-outline-gold:hover {
    background: var(--gold-soft);
    color: var(--gold-hover) !important;
}
.btn-outline-navy {
    border: 1.5px solid var(--navy-mid);
    color: var(--navy-mid) !important;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.25s;
}
.btn-outline-navy:hover {
    background: var(--navy);
    color: var(--white) !important;
}

/* ========== CARDS ========== */
.card-legal {
    background: var(--white);
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow);
    transition: all 0.25s;
    overflow: hidden;
}
.card-legal:active { transform: scale(0.98); }
@media (hover: hover) {
    .card-legal:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}
.card-legal-gold {
    background: var(--white);
    border-radius: var(--radius);
    border: none;
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow);
    transition: all 0.25s;
}
@media (hover: hover) {
    .card-legal-gold:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
}

/* ========== ICON CIRCLES ========== */
.icon-circle-gold {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gold-soft);
    border: 2px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icon-circle-gold i { color: var(--gold); font-size: 1.2rem; }
.icon-circle-navy {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icon-circle-navy i { color: var(--gold); font-size: 1.2rem; }
.icon-circle-success {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--success-soft);
    display: flex; align-items: center; justify-content: center;
}

/* ========== PROGRESS STEPS ========== */
.step-label {
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.3s;
}
.step-label.active { color: var(--gold); }
.progress {
    border-radius: 6px;
    background: var(--pergamino);
    height: 6px;
}
.progress-bar-gold {
    background: linear-gradient(90deg, var(--gold), var(--gold-light)) !important;
    transition: width 0.4s ease;
    border-radius: 6px;
}

/* ========== BADGES ========== */
.badge-navy {
    background: var(--navy) !important;
    color: var(--white);
    font-weight: 600;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-gold {
    background: var(--gold-soft) !important;
    color: var(--gold-hover);
    font-weight: 600;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
}
.badge-inactive {
    background: var(--danger-soft) !important;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
}

/* ========== TABS (Admin) ========== */
.nav-pills-legal .nav-link {
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}
.nav-pills-legal .nav-link.active {
    background: var(--navy);
    color: var(--gold) !important;
}
.nav-pills-legal .nav-link:not(.active):hover {
    background: var(--gold-soft);
    color: var(--navy);
}

/* ========== SECTION HEADERS ========== */
.section-title {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.15rem;
    font-weight: 700;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
}
.section-divider {
    width: 40px; height: 3px;
    background: var(--gold);
    border-radius: 3px;
    margin: 8px 0 16px;
}

/* ========== CARD TIPO CONTRATO (horizontal scroll) ========== */
.contract-type-card {
    min-width: 140px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 16px 10px;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}
.contract-type-card.active-type {
    border-color: var(--gold);
    background: var(--gold-soft);
}
.contract-type-card.disabled-type {
    opacity: 0.45;
    cursor: default;
}
.contract-type-card i { font-size: 1.6rem; }
.contract-type-card p { font-size: 0.8rem; font-weight: 600; margin-top: 6px; }
.badge-soon {
    background: var(--pergamino);
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========== ACERCA DE ========== */
.about-header {
    background: linear-gradient(160deg, var(--navy), var(--navy-mid));
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--gold);
}
.about-header h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}
.about-value {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pergamino);
}
.about-value:last-child { border-bottom: none; }
.about-value-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gold-soft);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.about-value-icon i { color: var(--gold); font-size: 0.9rem; }

/* ========== TOAST ========== */
@keyframes slideIn {
    from { transform: translateY(-20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(-20px) scale(0.95); opacity: 0; }
}

/* ========== STAT CARD ========== */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 16px 8px;
    border-top: 3px solid var(--gold);
}
.stat-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 576px) {
    .auth-card { padding: 2rem 1.3rem; }
    .auth-title { font-size: 1.4rem; }
    h4 { font-size: 1.15rem; }
    .step-label { font-size: 0.6rem; }
    .contract-type-card { min-width: 120px; padding: 12px 8px; }
}

/* ========== SAFE AREA ========== */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar-legal { padding-top: env(safe-area-inset-top); }
}

/* ========== MISC ========== */
html { scroll-behavior: smooth; }
::selection { background: var(--gold-soft); color: var(--navy); }
::-webkit-scrollbar { display: none; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

/* ========== FORM STEP CARD ========== */
.step-card-header {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pergamino);
    margin-bottom: 16px;
}
.step-card-header i { color: var(--gold); }

/* ========== LINK GOLD ========== */
.link-gold { color: var(--gold); font-weight: 700; }
.link-gold:hover { color: var(--gold-hover); text-decoration: underline; }

/* FIX: Evitar que cards del formulario brinquen al tocar inputs */
.step-panel .card-legal,
.step-panel .card-legal:hover,
.step-panel .card-legal:active {
    transform: none !important;
    box-shadow: var(--shadow) !important;
    cursor: default !important;
}
