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

/* Global Reset & Typography */
body {
    font-family: 'Inter', sans-serif !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Materialize components override */
.mn-header nav {
    background: linear-gradient(to right, #1e3a8a 0%, #3b82f6 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
}

.mn-header nav .chapter-title img {
    max-height: 40px;
    margin-top: 12px;
}

/* Sidebar Styling */
.side-nav {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

/* Solo en pantallas grandes (Escritorio) aplicamos el ancho personalizado, la posición fija debajo del header y quitamos rellenos */
@media only screen and (min-width: 993px) {
    .side-nav {
        width: 220px !important;
        top: 60px !important;
        height: calc(100% - 60px) !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .side-nav-wrapper {
        padding-top: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .side-nav.fixed {
        transform: translateX(0);
    }
}

.sidebar-profile {
    padding: 24px 16px !important;
    background: linear-gradient(to right, #1e3a8a 0%, #3b82f6 100%) !important;
    color: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 10px;
}

.sidebar-profile-image img {
    border: 3px solid rgba(255, 255, 255, 0.2);
    width: 64px !important;
    height: 64px !important;
}

.sidebar-profile-info p {
    font-weight: 600 !important;
    font-size: 15px !important;
    margin: 8px 0 2px 0 !important;
    color: #ffffff !important;
}

.sidebar-profile-info span {
    font-size: 12px !important;
    opacity: 0.85;
    color: #f1f5f9 !important;
}

.sidebar-menu li a {
    font-weight: 500 !important;
    color: #475569 !important;
    padding: 0 24px !important;
    display: flex !important;
    align-items: center !important;
    height: 48px !important;
    line-height: 48px !important;
    font-size: 14px !important;
}

.sidebar-menu li a i {
    color: #64748b !important;
    margin-right: 16px !important;
    font-size: 20px !important;
}

.sidebar-menu li.active a,
.sidebar-menu li a:hover {
    background-color: #f1f5f9 !important;
    color: #1e3a8a !important;
}

.sidebar-menu li.active a i,
.sidebar-menu li a:hover i {
    color: #1e3a8a !important;
}

/* Premium Card Styles */
.card, .page-header-card {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 24px !important;
    overflow: hidden;
}

.page-header-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    padding: 32px !important;
    border: none !important;
}

.page-header-card h4 {
    color: #ffffff !important;
    font-size: 24px !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.page-header-card p {
    color: #e0f2fe !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.card-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin-bottom: 20px !important;
}

/* Forms & Inputs redesign */
.input-field {
    margin-bottom: 20px !important;
}

input[type=text]:not(.browser-default),
input[type=password]:not(.browser-default),
input[type=email]:not(.browser-default),
input[type=url]:not(.browser-default),
input[type=time]:not(.browser-default),
input[type=date]:not(.browser-default),
input[type=datetime]:not(.browser-default),
input[type=datetime-local]:not(.browser-default),
input[type=tel]:not(.browser-default),
input[type=number]:not(.browser-default),
input[type=search]:not(.browser-default),
textarea.materialize-textarea {
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #334155 !important;
}

input[type=text]:not(.browser-default):focus:not([readonly]),
input[type=password]:not(.browser-default):focus:not([readonly]),
input[type=email]:not(.browser-default):focus:not([readonly]),
input[type=url]:not(.browser-default):focus:not([readonly]),
input[type=time]:not(.browser-default):focus:not([readonly]),
input[type=date]:not(.browser-default):focus:not([readonly]),
input[type=datetime]:not(.browser-default):focus:not([readonly]),
input[type=datetime-local]:not(.browser-default):focus:not([readonly]),
input[type=tel]:not(.browser-default):focus:not([readonly]),
input[type=number]:not(.browser-default):focus:not([readonly]),
input[type=search]:not(.browser-default):focus:not([readonly]),
textarea.materialize-textarea:focus:not([readonly]) {
    border-bottom: 1px solid #2563eb !important;
    box-shadow: 0 1px 0 0 #2563eb !important;
}

input[type=text]:not(.browser-default):focus:not([readonly]) + label,
input[type=password]:not(.browser-default):focus:not([readonly]) + label,
input[type=email]:not(.browser-default):focus:not([readonly]) + label,
input[type=tel]:not(.browser-default):focus:not([readonly]) + label,
textarea.materialize-textarea:focus:not([readonly]) + label {
    color: #2563eb !important;
}

/* Styled Select */
select.browser-default {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    height: 42px;
    padding: 0 12px;
    font-family: 'Inter', sans-serif;
    color: #334155;
    outline: none;
    transition: border-color 0.2s;
}

select.browser-default:focus {
    border-color: #2563eb;
}

/* Modern Buttons */
.btn, .btn-large, .btn-flat {
    font-family: 'Inter', sans-serif !important;
    text-transform: none !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s !important;
}

.btn:hover, .btn-large:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px);
}

.btn-primary, .btn.indigo.darken-2 {
    background-color: #2563eb !important; /* Premium Blue */
}

/* Alerts / Wrappers */
.errorWrap {
    padding: 16px !important;
    margin-bottom: 20px !important;
    background: #fef2f2 !important;
    border-left: 4px solid #ef4444 !important;
    color: #991b1b !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 500;
}

.succWrap {
    padding: 16px !important;
    margin-bottom: 20px !important;
    background: #f0fdf4 !important;
    border-left: 4px solid #22c55e !important;
    color: #166534 !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 500;
}

/* Status Badges */
.badge-state {
    padding: 6px 12px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-state.pendiente {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
}

.badge-state.aprobado {
    background-color: #dcfce7 !important;
    color: #15803d !important;
}

.badge-state.rechazado {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
}

.badge-state.en-proceso {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}

/* Tables Redesign */
table.striped > tbody > tr:nth-child(odd) {
    background-color: #f8fafc !important;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600 !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155;
}

/* Grid for solicite_informe menu */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.menu-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.menu-card-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.menu-card-icon i {
    font-size: 24px;
}

.menu-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.menu-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    flex-grow: 1;
}

/* Section divider inside forms */
.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #2563eb;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    margin-top: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.form-section-title i {
    margin-right: 8px;
    font-size: 18px;
}