/* ================================================================
   Poliedro SRL — Portal Cliente — v3
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

/* ================================================================
   BASE
   ================================================================ */
html, body {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    background: #f5f7fa !important;
    color: #1a2744 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100% !important;
}
#container {
    background: #f5f7fa !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

/* ================================================================
   HEADER
   ================================================================ */
#header {
    background: #ffffff !important;
    border-bottom: 2px solid #e2e8f4 !important;
    padding: 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 2px 8px rgba(30,60,140,0.07) !important;
    min-height: 64px !important;
    flex-shrink: 0 !important;
}
#header #logo {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    float: none !important;
    margin: 0 !important;
}
#header #logo .valign-helper { display: none !important; }
#header #logo img {
    height: 48px !important;
    width: auto !important;
    max-width: 200px !important;
    vertical-align: middle !important;
    object-fit: contain !important;
}
.pull-left { float: none !important; }
.pull-right { float: none !important; }
#header .pull-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}
#header p {
    color: #4a5568 !important;
    font-size: 13px !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    line-height: 1.6 !important;
}
#header p a { color: #1e5aad !important; text-decoration: none !important; font-weight: 500 !important; }
#header p a:hover { text-decoration: underline !important; }

/* ================================================================
   NAV — padding-left 32px para que el ícono no tape el texto
   ================================================================ */
#nav {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f4 !important;
    margin: 0 !important;
    padding: 0 20px !important;
    height: auto !important;
    box-shadow: none !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
}
#nav li {
    display: block !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
#nav li a {
    display: inline-block !important;
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 16px 0 32px !important;
    background-position: 8px center !important;
    background-repeat: no-repeat !important;
    background-size: 18px 18px !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border-bottom: 3px solid transparent !important;
    transition: color 0.15s, border-bottom-color 0.15s !important;
}
#nav li a:hover {
    background-color: #f0f4ff !important;
    color: #1e5aad !important;
    border-bottom-color: #1e5aad !important;
}
#nav li a.active {
    background-color: #f0f4ff !important;
    color: #1e5aad !important;
    font-weight: 600 !important;
    border-bottom-color: #1e5aad !important;
}

/* ================================================================
   CONTENIDO GENERAL
   ================================================================ */
.clear { clear: both !important; }

#content {
    background: transparent !important;
    padding: 28px 32px !important;
    width: 100% !important;
    flex: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Mensajes sistema */
#msg_error {
    background: #fff1f0 !important;
    border: 1px solid #fca5a5 !important;
    color: #b91c1c !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    font-size: 14px !important;
    max-width: 900px !important;
}
#msg_notice {
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    max-width: 900px !important;
}
#msg_warning {
    background: #fffbeb !important;
    border: 1px solid #fcd34d !important;
    color: #92400e !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    max-width: 900px !important;
}

/* ================================================================
   PÁGINA DE LOGIN — layout centrado, sin el h1/p de bienvenida
   ================================================================ */

/* Ocultar el h1 "Sign in to..." y el p "To better serve you..."
   que aparecen encima del formulario y comprimen la pantalla */
#content:has(#clientLogin) > h1 { display: none !important; }
#content:has(#clientLogin) > p:first-of-type { display: none !important; }

/* Cuando el formulario de login está presente, centrar verticalmente */
#content:has(#clientLogin) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 112px) !important;
    padding: 32px 20px !important;
}

/* Fix del div con inline style display:table-row */
#clientLogin > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
}

#clientLogin {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Tarjeta principal con los inputs */
.login-box {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 40px 40px 32px !important;
    box-shadow: 0 4px 24px rgba(30,60,140,0.10), 0 1px 4px rgba(0,0,0,0.05) !important;
    border: 1px solid #e2e8f4 !important;
    backdrop-filter: none !important;
}

/* Inputs */
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"],
#clientLogin input[type="text"],
#clientLogin input[type="password"],
#clientLogin input[type="email"] {
    width: 100% !important;
    background: #f8fafc !important;
    border: 1.5px solid #d0d9ef !important;
    border-radius: 10px !important;
    padding: 13px 16px !important;
    font-size: 15px !important;
    color: #1a2744 !important;
    font-family: 'Inter', sans-serif !important;
    margin-bottom: 14px !important;
    display: block !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.login-box input:focus, #clientLogin input:focus {
    border-color: #1e5aad !important;
    box-shadow: 0 0 0 3px rgba(30,90,173,0.10) !important;
    background: #ffffff !important;
    outline: none !important;
}
input::placeholder { color: #9baac8 !important; }

/* Botón Iniciar sesión */
#clientLogin .btn,
#clientLogin input[type="submit"],
#clientLogin button[type="submit"] {
    width: 100% !important;
    background: linear-gradient(135deg, #1e5aad 0%, #1749a0 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    margin-top: 4px !important;
    transition: opacity 0.2s, transform 0.1s !important;
    box-shadow: 0 4px 16px rgba(30,90,173,0.25) !important;
    display: block !important;
}
#clientLogin .btn:hover,
#clientLogin input[type="submit"]:hover { opacity: 0.92 !important; transform: translateY(-1px) !important; }

/* Sección de links "¿Aún no registrado?" y "Soy un agente"
   (tiene inline style display:table-cell que override con !important) */
#clientLogin > div > div:last-child {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f4 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-top: 10px !important;
    text-align: left !important;
    box-shadow: 0 2px 8px rgba(30,60,140,0.04) !important;
    vertical-align: top !important;
}
#clientLogin > div > div:last-child > div {
    color: #4a5568 !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
    line-height: 1.5 !important;
}
#clientLogin > div > div:last-child > div:last-child { margin-bottom: 0 !important; }
#clientLogin > div > div:last-child a { color: #1e5aad !important; text-decoration: none !important; font-weight: 500 !important; }
#clientLogin > div > div:last-child a:hover { text-decoration: underline !important; }
#clientLogin > div > div:last-child b { color: #1a2744 !important; }

/* Párrafo "Si es la primera vez..." */
#content > p,
#content > br ~ p {
    width: 100% !important;
    max-width: 480px !important;
    text-align: center !important;
    color: #64748b !important;
    font-size: 13px !important;
    margin: 12px auto 0 !important;
    display: block !important;
}
#content > p a { color: #1e5aad !important; }

/* ================================================================
   TICKETS / TABLAS
   ================================================================ */
table.list {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    border: 1px solid #e2e8f4 !important;
    width: 100% !important;
    max-width: 900px !important;
}
table.list th {
    background: #f0f4ff !important;
    color: #1a2744 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid #e2e8f4 !important;
}
table.list td {
    padding: 10px 14px !important;
    color: #374151 !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f0f4f8 !important;
}
table.list tr:hover td { background: #f8faff !important; }
table.list a { color: #1e5aad !important; text-decoration: none !important; }
table.list a:hover { text-decoration: underline !important; }

/* ================================================================
   FORMULARIOS GENERALES
   ================================================================ */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
    background: #f8fafc !important;
    border: 1.5px solid #d0d9ef !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-family: 'Inter', sans-serif !important;
    color: #1a2744 !important;
    font-size: 14px !important;
    transition: border-color 0.2s !important;
}
form input:focus, form textarea:focus, form select:focus {
    border-color: #1e5aad !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(30,90,173,0.10) !important;
    background: #ffffff !important;
}

/* Botones generales */
.btn.btn-primary, .btn-primary {
    background: linear-gradient(135deg, #1e5aad, #1749a0) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

/* ================================================================
   FOOTER
   ================================================================ */
#footer {
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 12px !important;
    padding: 20px !important;
    background: transparent !important;
    flex-shrink: 0 !important;
}
#footer a { color: #94a3b8 !important; }
[class*="poweredby"], .poweredby, #poweredBy { display: none !important; }
