/* ============================================
   NUBEMEDICA.APP - Estilos principales
   Versión 1.0
   ============================================ */

/* Variables globales */
:root {
    --nm-primary:      #3B3DBF;
    --nm-primary-dark: #2d2fa0;
    --nm-accent:       #2DD4A7;
    --nm-accent-dark:  #22b891;
    --nm-bg:           #f4f6fb;
    --nm-white:        #ffffff;
    --nm-text:         #1a1a2e;
    --nm-text-muted:   #6b7280;
    --nm-border:       #e5e7f0;
    --nm-danger:       #dc2626;
    --nm-warning:      #d97706;
    --nm-success:      #16a34a;
    --nm-radius:       10px;
    --nm-radius-lg:    16px;
    --nm-shadow:       0 2px 12px rgba(59, 61, 191, 0.08);
}

/* Reset base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--nm-bg);
    color: var(--nm-text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--nm-primary); text-decoration: none; }
a:hover { color: var(--nm-accent); }

/* ============================================
   PANTALLA DE LOGIN
   ============================================ */
.nm-auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Panel izquierdo - marca */
.nm-auth-brand {
    background: var(--nm-primary);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.nm-brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2.5rem;
}

.nm-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.nm-brand-name h2 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.nm-brand-name p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.nm-brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 2rem 0;
}

.nm-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

.nm-feature-item i {
    width: 20px;
    color: var(--nm-accent);
    font-size: 16px;
}

.nm-brand-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.nm-brand-footer p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

.nm-brand-footer strong {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.nm-brand-footer strong span {
    color: var(--nm-accent);
}

/* Panel derecho - formulario */
.nm-auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--nm-white);
}

.nm-auth-card {
    width: 100%;
    max-width: 420px;
}

.nm-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.nm-auth-icon {
    font-size: 40px;
    color: var(--nm-primary);
    margin-bottom: 1rem;
}

.nm-auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nm-primary);
    margin-bottom: 6px;
}

.nm-auth-header p {
    font-size: 14px;
    color: var(--nm-text-muted);
}

/* ============================================
   FORMULARIOS
   ============================================ */
.nm-form { display: flex; flex-direction: column; gap: 18px; }

.nm-form-group { display: flex; flex-direction: column; gap: 6px; }

.nm-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--nm-text);
}

.nm-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.nm-input-icon > i:first-child {
    position: absolute;
    left: 14px;
    color: var(--nm-text-muted);
    font-size: 15px;
    pointer-events: none;
}

.nm-input-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--nm-border);
    border-radius: var(--nm-radius);
    font-size: 14px;
    color: var(--nm-text);
    background: var(--nm-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.nm-input-icon input:focus {
    border-color: var(--nm-accent);
    box-shadow: 0 0 0 3px rgba(45, 212, 167, 0.15);
}

.nm-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nm-text-muted);
    padding: 4px;
}

.nm-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--nm-text-muted);
    cursor: pointer;
}

.nm-checkbox input {
    accent-color: var(--nm-accent);
    width: 15px;
    height: 15px;
}

/* ============================================
   BOTONES
   ============================================ */
.nm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--nm-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.nm-btn-primary {
    background: var(--nm-primary);
    color: white;
}
.nm-btn-primary:hover {
    background: var(--nm-primary-dark);
    color: white;
}

.nm-btn-accent {
    background: var(--nm-accent);
    color: #065f46;
}
.nm-btn-accent:hover {
    background: var(--nm-accent-dark);
}

.nm-btn-outline {
    background: transparent;
    color: var(--nm-primary);
    border: 1.5px solid var(--nm-primary);
}
.nm-btn-outline:hover {
    background: var(--nm-primary);
    color: white;
}

.nm-btn-whatsapp {
    background: #25D366;
    color: white;
}
.nm-btn-whatsapp:hover { background: #1ebe5b; color: white; }

.nm-btn-full { width: 100%; }

.nm-btn-sm { padding: 7px 14px; font-size: 13px; }

/* ============================================
   ALERTAS
   ============================================ */
.nm-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--nm-radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.nm-alert i { font-size: 16px; flex-shrink: 0; }

.nm-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.nm-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.nm-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.nm-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================
   PANTALLA BLOQUEADA
   ============================================ */
.nm-blocked-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--nm-bg);
}

.nm-blocked-card {
    background: white;
    border-radius: var(--nm-radius-lg);
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--nm-border);
}

.nm-blocked-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 36px;
    color: var(--nm-danger);
}

.nm-icon-gray { background: #f3f4f6; color: #6b7280; }

.nm-blocked-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.nm-logo-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--nm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.nm-blocked-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--nm-text);
    margin-bottom: 1rem;
}

.nm-blocked-msg {
    color: var(--nm-text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.nm-blocked-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
    text-align: left;
    background: var(--nm-bg);
    border-radius: var(--nm-radius);
    padding: 1.25rem;
}

.nm-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
}

.nm-info-item i {
    color: var(--nm-accent);
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.nm-info-item strong { display: block; font-weight: 600; color: var(--nm-text); }
.nm-info-item span   { color: var(--nm-text-muted); }

.nm-blocked-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.nm-blocked-actions p { font-size: 13px; color: var(--nm-text-muted); }

.nm-blocked-footer {
    border-top: 1px solid var(--nm-border);
    padding-top: 1rem;
    font-size: 13px;
    color: var(--nm-text-muted);
}

.nm-blocked-footer strong { color: var(--nm-accent); }

.nm-auth-help {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 13px;
    color: var(--nm-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nm-auth-wrapper {
        grid-template-columns: 1fr;
    }
    .nm-auth-brand {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    .nm-brand-features { display: none; }
    .nm-auth-form-panel { padding: 1.5rem; }
}
