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

:root {
    --brand-dark: #0f2438;
    --brand-blue: #1e3f66;
    --brand-light: #90b8d8;
    --bg-light: #f4f6f8;
    --text-color: #333;
    --border-color: #e0e6ed;
    --danger: #dc3545;
    --success: #28a745;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Auth Login */
.login-container {
    display: flex;
    height: 100vh;
}

.login-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.login-right {
    flex: 1;
    background-color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 5%;
    right: 5%;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(var(--brand-blue) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.login-form-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-logo {
    max-width: 200px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9fbfd;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(144, 184, 216, 0.2);
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    width: 100%;
    background-color: var(--brand-dark);
}
.btn-primary:hover {
    background-color: var(--brand-blue);
}

.btn-secondary {
    background-color: var(--brand-dark);
}
.btn-secondary:hover { opacity: 0.9; }

.btn-success {
    background-color: var(--success);
}
.btn-success:hover { opacity: 0.9; }

.btn-danger {
    background-color: var(--danger);
}
.btn-danger:hover { opacity: 0.9; }

/* Dashboard UI */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--brand-dark);
    color: #fff;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 0 1.5rem 2rem;
}

.sidebar-logo img {
    max-width: 150px;
    /* Convertimos el fondo blanco en negro (transparente por el blend) y forzamos el texto a blanco intenso */
    filter: grayscale(1) invert(1) brightness(3);
    mix-blend-mode: screen;
}

.nav-item {
    padding: 0.75rem 1.5rem;
    color: #a0aec0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
    border-left: 3px solid var(--brand-light);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.header {
    background-color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.page-title {
    margin: 1.5rem 2rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.search-box {
    display: flex;
    gap: 10px;
    background: #c3d5e5;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 2rem 0;
    align-items: center;
}

.search-box input {
    flex: 1;
}

.search-box select {
    width: auto;
    min-width: 150px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin: 1.5rem 2rem;
    overflow: hidden;
}

.card-header {
    background-color: var(--brand-dark);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    position: relative;
}

/* Light blue diagonal stripe matching reference "consulta.jpeg" */
.card-header::after {
    content: '';
    position: absolute;
    right: 50px;
    top: 0;
    bottom: 0;
    width: 60px;
    background-color: var(--brand-light);
    transform: skewX(-30deg);
}
.card-header::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    bottom: 0;
    width: 60px;
    background-color: var(--brand-blue);
    transform: skewX(-30deg);
}

.card-body {
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.info-item label {
    display: block;
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.info-item span {
    font-weight: 600;
    color: var(--brand-dark);
    font-size: 0.95rem;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th, .table-custom td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.table-custom th {
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 600;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}
.alert-danger { background-color: #f8d7da; color: #721c24; }
.alert-success { background-color: #d4edda; color: #155724; }
.alert-warning { background-color: #fff3cd; color: #856404; }
