/* * Freedom House Ministry - Clinical Portal Style
 * Version: 8.0 - Direct Overwrite & High-Performance UI
 */

:root { 
    --primary: #2563eb; 
    --primary-hover: #1d4ed8;
    --dark: #0f172a; 
    --darker: #020617;
    --bg: #f1f5f9; 
    --sidebar-w: 260px; 
    --transition: 0.25s ease-in-out;
    --danger: #dc2626;
    --success: #059669;
    --border: #e2e8f0;
}

body { 
    background: var(--bg); 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    color: #334155;
    margin: 0;
    overflow-x: hidden;
}

/* --- 1. LOGIN & CONNECTION OVERLAY --- */
.login-page { 
    position: fixed; 
    inset: 0; 
    background: radial-gradient(circle at top left, var(--dark), var(--darker)); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; 
}

.login-card { 
    background: #ffffff; 
    padding: 2.5rem; 
    border-radius: 24px; 
    width: 100%;
    max-width: 420px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- 2. SIDEBAR NAVIGATION --- */
.sidebar { 
    background: var(--dark); 
    color: white; 
    width: var(--sidebar-w); 
    height: 100vh; 
    position: fixed; 
    left: 0; 
    top: 0; 
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.nav-link { 
    color: #94a3b8; 
    padding: 0.8rem 1rem; 
    border-radius: 12px; 
    margin-bottom: 0.5rem; 
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 500;
}

.nav-link:hover { 
    background: rgba(255,255,255,0.08); 
    color: white; 
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* --- 3. NAS CONTROL BOX (Status Feedback) --- */
.nas-control-box {
    background: rgba(255,255,255,0.03);
    border-radius: 18px;
    padding: 1.25rem;
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.status-indicator {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.95); }
}

/* --- 4. MAIN CONTENT AREA --- */
main { 
    margin-left: var(--sidebar-w); 
    padding: 3rem; 
    min-height: 100vh;
}

.card-custom {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* --- 5. CLINICAL NOTES DESIGN --- */
.note-entry { 
    background: #ffffff;
    border-radius: 12px; 
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary); 
    padding: 1.5rem; 
    margin-bottom: 1.25rem; 
}

.note-entry small {
    display: block;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.note-entry p {
    white-space: pre-wrap;
    line-height: 1.6;
    margin: 0;
}

.animate-in {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 6. FORMS & BUTTONS --- */
.btn {
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* --- 7. UTILITIES --- */
.restricted { display: none !important; }

.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
}

/* Responsive Handling */
@media (max-width: 992px) {
    .sidebar { width: 80px; padding: 1.5rem 0.5rem; }
    .nav-text, .status-indicator, .nas-control-box div, .nas-control-box button span { display: none; }
    main { margin-left: 80px; padding: 1.5rem; }
    .nas-control-box button i { margin: 0 !important; font-size: 1.2rem; }
}