/* RESET Y BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #7c3aed;     /* púrpura */
    --secondary: #2563eb;   /* añil */
    --background: #0f172a;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --input: #f1f5f9;
    --border: #e5e7eb;
    --error: #dc2626;

    --radius: 12px;
    --radius-sm: 10px;

    --transition: 0.2s ease;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* LAYOUT */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #312e81, #7c3aed);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text);
}

/* WRAPPER */
.login-wrapper {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: center;
}

/* CARD */
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);

    box-shadow:
        0 20px 40px rgba(0,0,0,0.25),
        0 2px 6px rgba(0,0,0,0.1);

    animation: fadeIn 0.5s ease;
}

/* LOGO */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    width: 72px;
    margin-bottom: 8px;
}

.logo-container h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.logo-container h2 span:first-child {
    color: var(--primary);
}

.logo-container h2 span:last-child {
    color: var(--secondary);
}

/* INPUTS */
.input-group {
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--input);
    font-weight: 400;
    font-size: 14px;
    transition: var(--transition);
}

/* Placeholder */
.input-group input::placeholder {
    color: var(--muted);
}

/* Focus */
.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* BOTÓN */
button {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--secondary);
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

/* Hover */
button:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

/* Active */
button:active {
    transform: scale(0.98);
}

/* Disabled (para futuro loading) */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ERROR */
.error {
    color: var(--error);
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    animation: shake 0.3s ease;
}

.hidden {
    display: none;
}

/* LAYOUT APP */
.app-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-header h2 {
    margin: 0;
}

.app-header p {
    margin: 0;
    color: var(--muted);
}

/* CARD */
.card {
    background: rgba(255,255,255,0.95);
    padding: 25px;
    border-radius: 12px;

    backdrop-filter: blur(10px);

    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* SELECTS (no estaban bien estilizados) */
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input);
    font-size: 14px;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* MENSAJE */
.feedback {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--primary);
}

/* LISTA DE NOTIFICACIONES */
.lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ITEM NOTIFICACIÓN */
.notificacion {
    background: var(--input);
    padding: 14px;
    border-radius: 10px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-left: 4px solid var(--secondary);

    transition: var(--transition);
}

/* Hover */
.notificacion:hover {
    background: #e0e7ff;
}

/* TEXTO */
.notificacion .info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.notificacion .paciente {
    font-weight: 600;
}

.notificacion .detalle {
    font-size: 12px;
    color: var(--muted);
}

/* BOTÓN ACCIÓN */
.notificacion button {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
}

/* INPUT PEQUEÑO DENTRO DE NOTIFICACIÓN */
.input-mini {
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
}

/* CONTENEDOR ACCIONES */
.notificacion .acciones {
    display: flex;
    gap: 6px;
}

/* ADMIN LAYOUT */
.admin-body{
    margin:0;
    background:#0f172a;
    color:#fff;
}

.admin-layout{
    display:flex;
    height:100vh;
}

/* SIDEBAR */
.sidebar{
    width:240px;
    background:#111827;
    padding:20px;
    display:flex;
    flex-direction:column;
}

.logo span:first-child{
    color:#7c3aed;
}

.logo span:last-child{
    color:#2563eb;
}

.menu{
    list-style:none;
    padding:0;
    margin-top:30px;
}

.menu li{
    padding:12px;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
}

.menu li:hover{
    background:rgba(255,255,255,0.05);
}

/* MAIN */
.main-content{
    flex:1;
    display:flex;
    flex-direction:column;
}

/* TOPBAR */
.topbar{
    padding:15px 25px;
    background:#111827;
    border-bottom:1px solid rgba(255,255,255,0.05);
}

/* CONTENIDO */
.contenido{
    padding:25px;
    overflow:auto;
}

/* TABLA */
.table{
    width:100%;
    border-collapse:collapse;
}

.table th, .table td{
    padding:12px;
    border-bottom:1px solid rgba(255,255,255,0.1);
}

.table th{
    text-align:left;
    color:#94a3b8;
}

/* BOTONES */
.btn{
    padding:6px 10px;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

.btn-edit{
    background:#2563eb;
    color:white;
}

.btn-delete{
    background:#dc2626;
    color:white;
}

/* MICROINTERACCIONES */

/* Fade */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shake error */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .login-card {
        padding: 24px;
        border-radius: 14px;
    }

    .logo {
        width: 60px;
    }

    .logo-container h2 {
        font-size: 20px;
    }
}