/* =========================================
   ESTILOS GOOGLE (FINAL V10 - LINK TEXTO)
   ========================================= */

html,
body {
    background-color: #f0f2f5;
    color: #202124;
    font-family: 'Google Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: antialiased;
}

/* Texto con degradado */
.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* =========================================
   1. COMPONENTES GLOBALES
   ========================================= */

/* Header Global */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5ebf4;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    height: 70px;
    display: flex;
    align-items: center;
}

.header-brand img {
    display: block;
    transition: all 0.2s;
}


/* Input Estilo Google */
.input-group-google {
    background-color: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 0 12px;
    height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    width: 100%;
}

.input-group-google:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.input-group-google input,
.input-group-google select {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
    color: #202124;
    font-size: 16px;
    background: transparent;
}

.search-label-google {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5f6368;
    margin-bottom: 6px;
    display: block;
}

/* Botones Generales */
.btn-google {
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 8px 24px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-google:hover {
    background-color: #1557b0;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.btn-outline-google {
    background-color: transparent;
    color: #1a73e8;
    border: 1px solid #dadce0;
    border-radius: 24px;
    padding: 7px 23px;
    font-weight: 500;
}

.btn-outline-google:hover {
    background-color: #f6fafe;
    border-color: #1a73e8;
    color: #1557b0;
}

.btn-doc-orange {
    border: 1px solid #ff9800;
    transition: 0.2s;
}

.btn-doc-orange:hover {
    background-color: #ffe0b2;
}

.btn-doc-green {
    border: 1px solid #4caf50;
    transition: 0.2s;
}

.btn-doc-green:hover {
    background-color: #d9f7df;
}

/* =========================================
   2. HERO & DASHBOARD
   ========================================= */

/* Contenedor principal */
.main-container {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Títulos */
.welcome-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #5f6368;
    margin-bottom: 8px;
    font-family: 'Roboto', sans-serif;
}

.welcome-title {
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 2rem;
    color: #202124;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -1px;
}

/* Barra Blanca Horizontal (Buscador) */
.search-strip {
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 64px;
}

.search-strip-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.search-strip-input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1.1rem;
    color: #202124;
    outline: none;
}

.search-strip-input::placeholder {
    color: #9aa0a6;
    font-weight: 400;
}

/* Separador vertical */
.vr-separator {
    width: 1px;
    height: 24px;
    background-color: #dadce0;
}

/* Grid de Trámites */
.tramite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

/* Tarjeta de Servicio */
.service-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    position: relative;
    border: 1px solid #e0e0e0;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.service-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: #f1f3f4;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.service-card:hover .service-icon-wrapper {
    background-color: #e8f0fe;
    color: #1557b0;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.3;
}

.service-desc {
    font-size: 0.95rem;
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f3f4;
    padding-top: 16px;
    margin-top: auto;
}

.service-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9aa0a6;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.service-action {
    color: #1a73e8;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-card-action {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 0 18px;
    height: 38px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    box-shadow: 0 6px 14px rgba(32, 33, 36, 0.08);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

.header-card-action:hover {
    color: #1557b0;
    background: #f8faff;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(32, 33, 36, 0.12);
    border-color: transparent;
}

.header-card-action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2), 0 10px 18px rgba(32, 33, 36, 0.12);
}

@media (max-width: 768px) {
    .header-card-action {
        padding: 0 12px;
        height: 34px;
        font-size: 11px;
        letter-spacing: 1.1px;
        border-radius: 14px;
        box-shadow: 0 4px 10px rgba(32, 33, 36, 0.08);
    }
}

/* =========================================
   4. UTILS ADMIN & BUILDER
   ========================================= */
.navbar-admin {
    background-color: #1F1F1F;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px auto;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-secondary.bg-opacity-10 {
    background-color: rgba(108, 117, 125, 0.1) !important;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Builder Utils */
.field-item {
    border: 1px solid #e0e0e0;
}

.toolbox {
    border-right: 1px solid #e0e0e0;
}

/* =========================================
   5. TIMELINE
   ========================================= */
.timeline-wrapper {
    position: relative;
    padding-left: 20px;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1a73e8;
    z-index: 2;
}

.timeline-dot.success {
    border-color: #198754;
    background: #198754;
}

.timeline-dot.danger {
    border-color: #dc3545;
    background: #dc3545;
}

.timeline-dot.warning {
    border-color: #ffc107;
    background: #ffc107;
}

.timeline-date {
    font-size: 0.75rem;
    color: #5f6368;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.timeline-content {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* =========================================
   6. TRAMITE PUBLIC VIEW & DOCS
   ========================================= */

/* Caja Naranja Suave (Sección Documentos) */
.box-orange-soft {
    background-color: #fff9f2;
    /* Naranja muy pálido */
    border: 1px solid #fcead4;
    /* Borde naranja sutil */
    border-radius: 16px;
    /* Coincide con rounded-4 */
}

/* Texto Naranja Personalizado */
.text-orange-custom {
    color: #f57c00 !important;
    /* Naranja fuerte para iconos/texto */
}

/* Ajuste de Tarjetas dentro de la caja naranja */
.box-orange-soft .card {
    border-color: #f0e0d0 !important;
    box-shadow: 0 2px 6px rgba(230, 100, 0, 0.03) !important;
    background-color: #ffffff;
}

/* Enlace de Tarjeta de Documento (Interacción) */
.doc-card-link {
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.doc-card-link:hover .card {
    border-color: #1a73e8 !important;
    /* Cambia a Azul Google al hover */
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.doc-card-link:hover .icon-box {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
}

/* =========================================
   7. INPUT FILE ESTILO GOOGLE (NUEVO)
   ========================================= */

.upload-area {
    border: 2px dashed #dadce0;
    /* Borde gris estilo Google */
    border-radius: 8px;
    background-color: #f8f9fa;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.upload-area:hover {
    border-color: #1a73e8;
    /* Azul Google al pasar el mouse */
    background-color: #f8fbff;
}

.upload-area.has-file {
    border-style: solid;
    border-color: #ceead6;
    /* Verde suave al cargar */
    background-color: #e6f4ea;
}

/* El input real es invisible pero cubre todo el botón para recibir el clic */
.upload-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* Contenido visual (Icono y texto) */
.upload-content {
    pointer-events: none;
    /* Para que el clic pase al input invisible */
    padding: 20px;
}
/* =========================================
   ADMIN HEADER (DASHBOARD STYLE)
   ========================================= */
.admin-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #e5ebf4;
    backdrop-filter: blur(12px);
    z-index: 1050;
    margin-top: 0 !important;
    top: 0;
    box-shadow: none;
    position: -webkit-sticky;
    position: sticky;
}

.admin-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 1px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.admin-header.admin-header--scrolled::after {
    opacity: 1;
}

.admin-header__inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #0f172a;
}

.admin-brand__logo {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.admin-brand__text {
    line-height: 1.1;
}

.admin-brand__title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.admin-brand__subtitle {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 2px;
}

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

.admin-user__toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 12px;
    border: 1px solid #e5ebf4;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-user__toggle:hover,
.admin-user__toggle:focus {
    border-color: rgba(31, 107, 255, 0.45);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
    color: #0f172a;
}

.admin-user__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.admin-user__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}

.admin-user__role {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(140deg, #1f6bff, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 16px rgba(31, 107, 255, 0.25);
    flex-shrink: 0;
}

.admin-user__menu {
    border: 1px solid #e5ebf4;
    border-radius: 16px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.admin-user__menu .dropdown-item {
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .admin-header__inner {
        height: 64px;
        padding: 0 12px;
    }

    .admin-user__toggle {
        padding: 4px 8px;
        gap: 8px;
    }

    .admin-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}
