/* Avanca-clin V21 - Design System 'The Ethereal Clinic' (No-Line) */
:root {
    --primary: #52667A;
    --background: #F4F6F8;
    --surface: #FFFFFF;
    --surface-high: rgba(0, 0, 0, 0.03);
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-premium: 0 10px 40px rgba(0,0,0,0.03);
}

* { margin:0; padding:0; box-sizing:border-box; outline:none; }
body { 
    background: var(--background); 
    color: var(--text-main); 
    font-family: var(--font-body); 
    font-size: 14px; 
    overflow-x: hidden;
}

.app-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* SIDEBAR */
.sidebar { 
    width: 280px; 
    background: var(--surface); 
    display: flex; 
    flex-direction: column; 
    padding: 30px; 
    box-shadow: 2px 0 30px rgba(0,0,0,0.01); 
    border-right: 1px solid rgba(0,0,0,0.03);
}
.logo-container { display: flex; align-items: center; gap: 12px; margin-bottom: 50px; }
.logo-orb { width: 32px; height: 32px; background: linear-gradient(135deg, var(--primary), #8E9EAB); border-radius: 50%; opacity: 0.8; }
.logo-text { font-family: var(--font-heading); font-weight: 800; font-size: 20px; color: var(--primary); letter-spacing: -0.5px; }
.logo-text span { font-weight: 200; opacity: 0.6; }

.nav-menu { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item { 
    display: flex; align-items: center; gap: 14px; 
    padding: 12px 18px; border-radius: 14px; 
    color: var(--text-muted); text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    font-weight: 600; font-size: 13px;
}
.nav-item i { width: 18px; opacity: 0.7; }
.nav-item:hover { background: var(--surface-high); color: var(--primary); }
.nav-item.active { background: var(--surface-high); color: var(--primary); }
.nav-divider { height: 1px; background: var(--surface-high); margin: 15px 0; }

.user-pill { 
    display: flex; align-items: center; gap: 12px; 
    background: var(--surface-high); padding: 10px; border-radius: 16px; 
}
.user-avatar { 
    width: 36px; height: 36px; background: var(--primary); 
    color: white; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; font-weight: 800; 
}
.user-name { font-weight: 800; font-size: 13px; font-family: var(--font-heading); }
.user-role { font-size: 10px; opacity: 0.6; font-weight: 600; letter-spacing: 0.5px; }

/* MAIN CONTENT */
.main-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    background: #F4F6F8;
}
.top-header { 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px; 
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.view-content { 
    flex: 1; 
    overflow-y: auto; 
    padding: 32px 40px;
}
#view-title { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--text-main); letter-spacing: -0.5px; margin: 0; }

/* COMPONENTS */
.card { 
    background: var(--surface); 
    border-radius: 20px; 
    padding: 25px; 
    box-shadow: var(--shadow-premium); 
    border: 1px solid rgba(255,255,255,0.8);
}
.btn-primary { 
    background: var(--primary); color: white; border: none; 
    padding: 12px 24px; border-radius: 14px; 
    font-weight: 700; cursor: pointer; font-family: var(--font-body); 
    transition: all 0.2s; 
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-secondary {
    background: #F3F4F6; color: #374151; border: none;
    padding: 10px 18px; border-radius: 12px;
    font-weight: 700; cursor: pointer; font-family: var(--font-body);
    font-size: 13px; transition: all 0.2s;
}
.btn-secondary:hover { background: #E5E7EB; transform: translateY(-1px); }
.grid-dashboard { display: grid; gap: 20px; }

.tab-btn { 
    padding: 10px 24px; border-radius: 40px; border: none; background: none; 
    color: var(--text-muted); font-weight: 700; cursor: pointer; transition: 0.3s;
}
.tab-btn.active { background: var(--surface); color: var(--primary); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.status-pill { 
    padding: 4px 12px; border-radius: 100px; font-size: 10px; 
    font-weight: 800; background: rgba(0,0,0,0.05); color: var(--text-muted); 
}
.status-active  { background: #ECFDF3; color: #047857; border: 1px solid #D1FAE5; }
.status-inactive { background: #FFF1F0; color: #BA1A1A; border: 1px solid #FCA5A5; }

.filter-pill {
    padding: 8px 18px; border-radius: 40px; border: none; background: none;
    color: var(--text-muted); font-weight: 700; font-size: 12px; cursor: pointer; transition: 0.3s;
}
.filter-pill.active {
    background: white;
    color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
.filter-pill:hover:not(.active) { background: rgba(0,0,0,0.04); }

input[type="range"] { filter: grayscale(1); opacity: 0.6; }
select, input, textarea { font-family: var(--font-body); font-size: 13px; color: var(--text-main); resize: vertical; }
label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; margin-top: 4px; }

/* MODAL & RESPONSIVE */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; animation: fadeIn 0.2s ease; }
.modal-card { background: white; border-radius: 24px; padding: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); animation: slideUp 0.3s ease; }

@media (max-width: 768px) {
    .sidebar { width: 0 !important; display: none !important; }
    .main-content { padding: 20px !important; }
    .grid-dashboard { grid-template-columns: 1fr !important; }
    .modal-card { width: 95% !important; margin: 10px !important; }
}
