/* =======================================================
   DENTAL CMS - SaaS 2025 Visual System
   Global override layer loaded last to restyle the app
   ======================================================= */

:root {
    /* Brand palette */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #312e81;
    --primary-900: #1e1b4b;

    --accent-50: #ecfeff;
    --accent-100: #cffafe;
    --accent-200: #a5f3fc;
    --accent-300: #67e8f9;
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;
    --accent-600: #0891b2;
    --accent-700: #0e7490;
    --accent-800: #155e75;
    --accent-900: #164e63;

    /* Neutral slate */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5f5;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Status scales */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-200: #a7f3d0;
    --success-300: #6ee7b7;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    --success-800: #065f46;
    --success-900: #064e3b;

    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-300: #fcd34d;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;

    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-200: #fecaca;
    --error-300: #fca5a5;
    --error-400: #f87171;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    --error-800: #991b1b;
    --error-900: #7f1d1d;

    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-200: #bfdbfe;
    --info-300: #93c5fd;
    --info-400: #60a5fa;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    --info-700: #1d4ed8;
    --info-800: #1e40af;
    --info-900: #1e3a8a;

    --surface-0: #eef2ff;
    --surface-50: #f5f7fb;
    --surface-100: #f1f4ff;
    --surface-200: rgba(255, 255, 255, 0.9);
    --surface-300: rgba(248, 250, 255, 0.95);
    --surface-400: rgba(4, 7, 29, 0.4);
    --surface-glass: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(99, 102, 241, 0.15);
    --border-strong: rgba(15, 23, 42, 0.08);
    --border-dark: rgba(15, 23, 42, 0.35);

    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.08), 0 12px 30px rgba(15, 23, 42, 0.18);
    --blur-lg: blur(20px);
    --blur-md: blur(14px);
    --blur-sm: blur(8px);

    --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.75) 100%);
    --gradient-dark: linear-gradient(160deg, #0f172a 0%, #111826 100%);

    --radius-card: 8px;
    --radius-pill: 9999px;
    --radius-xl: 8px;
    --radius-lg: 8px;
    --radius-md: 4px;
    --radius-sm: 4px;
}

/* === GLOBAL SURFACE === */
body {
    background: radial-gradient(circle at 5% 25%, rgba(99, 102, 241, 0.18), transparent 40%),
                radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.15), transparent 55%),
                linear-gradient(180deg, #edf2ff 0%, #f8fafc 100%);
    color: var(--gray-800);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    background: transparent;
}

.app-layout {
    min-height: 100vh;
    display: flex;
    gap: 0;
    background: transparent;
}

/* === SIDEBAR === */
.sidebar {
    background: rgba(10, 16, 33, 0.88);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 40px rgba(2, 6, 23, 0.45);
    backdrop-filter: var(--blur-lg);
}

.sidebar-header {
    padding: 1.5rem;
}

.logo-icon {
    background: var(--gradient-brand);
    border-radius: var(--radius-container);
    box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.3);
}

.logo-text {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.sidebar-nav {
    padding: 1.25rem;
}

.nav-link {
    background: transparent;
    color: rgba(226, 232, 240, 0.65);
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-link span {
    text-transform: none;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(99, 102, 241, 0.12);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.user-profile {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.logout-btn {
    color: rgba(226, 232, 240, 0.8);
    border: 1px solid transparent;
    background: rgba(99, 102, 241, 0.08);
}

.logout-btn:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
    color: #fee2e2;
}

.sidebar-overlay {
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(6px);
}

/* === MAIN CONTENT === */
.main-content {
    background: transparent;
}

.topbar {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-container);
    margin: 1.5rem 2rem 0;
    box-shadow: var(--shadow-soft);
    backdrop-filter: var(--blur-md);
}

.mobile-menu-btn,
.sidebar-toggle {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-600);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.page-title {
    font-size: clamp(1.25rem, 1.6vw, 1.5rem);
    color: var(--gray-900);
}

.topbar-right {
    gap: 1.25rem;
}

.search-box input {
    background: rgba(241, 245, 249, 0.8);
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.search-box input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.search-results {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-container);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    backdrop-filter: var(--blur-md);
}

.topbar-date {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-pill);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-700);
    font-weight: 500;
}

.content-area {
    padding: 2.5rem clamp(1rem, 3vw, 3rem) 3rem;
    width: 100%;
    margin: 0;
    max-width: none;
}

/* === CARDS & SURFACES === */
.card,
.table-container {
    background: var(--surface-300);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: var(--blur-md);
}

.card-header,
.card-footer {
    background: transparent;
    border: none;
    padding: 1.5rem 1.75rem;
}

.card-body {
    padding: 1.75rem;
}

.card h3,
.card-header h3 {
    color: var(--gray-900);
    font-weight: 600;
}

.badge {
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7 !important;
    color: #d97706 !important;
}

.badge-confirmed {
    background: #d1fae5 !important;
    color: #059669 !important;
}

.badge-completed {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
}

.badge-cancelled {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* === BUTTONS === */
.btn {
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    box-shadow: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-brand);
    box-shadow: 0 12px 22px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--primary-700);
}

.btn-secondary:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.15);
}

.btn-ghost {
    color: var(--gray-600);
    border-radius: var(--radius-pill);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    box-shadow: 0 12px 20px rgba(6, 182, 212, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-500), var(--error-600));
    box-shadow: 0 12px 20px rgba(239, 68, 68, 0.3);
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.06);
    color: var(--gray-600);
}

/* === FORMS === */
.form-group label {
    color: var(--gray-600);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
}

.form-control {
    background: rgba(248, 250, 255, 0.9);
    border-radius: var(--radius-container);
    border: 1px solid rgba(99, 102, 241, 0.12);
    padding: 0.85rem 1rem;
    transition: border var(--transition-base), box-shadow var(--transition-base);
}

.form-control:hover {
    border-color: rgba(99, 102, 241, 0.35);
}

.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* === DASHBOARD === */
.dashboard-page {
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.stats-section {
    background: transparent;
    border-radius: var(--radius-card);
    border: none;
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white !important; /* Carduri albe, nu transparente */
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    display: none; /* Elimină overlay-ul transparent */
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    transition: all var(--transition-fast);
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-container);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-600);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
}

.stat-info p {
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.4fr);
    gap: var(--space-6);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dashboard-sidebar {
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-calendar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.quick-actions {
    gap: 0.75rem;
}

.quick-action-btn {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-container);
    color: var(--gray-800);
    font-weight: 600;
}

.quick-action-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--primary-700);
}

.upcoming-item {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.upcoming-item:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateX(2px);
}

/* === CALENDAR === */
.calendar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.5rem 1.5rem 0;
}

.calendar-header-mobile h3 {
    font-size: 1.15rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.calendar-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.05);
    padding: 0.35rem;
    border-radius: var(--radius-pill);
}

.calendar-nav span#calendar-title {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0 0.75rem;
    color: var(--gray-900);
}

.calendar-nav .btn-icon {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: none;
}

.calendar-nav .btn-icon:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.calendar-nav .btn-secondary {
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.25rem;
}

.view-toggle {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-pill);
    padding: 0.2rem;
}

.view-btn {
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.95rem;
    font-weight: 600;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft);
}

.calendar-day,
.calendar-week,
.calendar-month {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-container);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.calendar-appointment {
    border-radius: var(--radius-container);
    border: 1px solid transparent;
    font-size: 0.78rem;
    padding: 0.65rem;
    line-height: 1.3;
}

.calendar-appointment.status-pending {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
}

.calendar-appointment.status-confirmed {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.6);
}

.calendar-appointment.status-completed {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.6);
}

.week-header,
.month-header,
.day-header {
    background: rgba(241, 245, 249, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.day-header.today {
    background: rgba(99, 102, 241, 0.15);
    border-bottom: 1px solid rgba(99, 102, 241, 0.4);
}

.month-day {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(226, 232, 240, 0.5);
}

.month-day.today {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.4);
}

/* === TABLES === */
.data-table th {
    background: rgba(241, 245, 249, 0.7);
    color: var(--gray-600);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

.data-table td {
    border-bottom-color: rgba(226, 232, 240, 0.6);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.table-actions .btn-icon {
    width: 36px;
    height: 36px;
}

/* === APPOINTMENTS FILTERS === */
.filters-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filters-row {
    gap: 1rem;
}

.filter-group label {
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

/* === PATIENTS GRID === */
.patients-grid {
    gap: 1.5rem;
}

.grid-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(15, 23, 42, 0.1);
}

.grid-card:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 32px rgba(15, 23, 42, 0.12);
}

.patient-card {
    padding: 0;
}

.patient-card-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.patient-card-info h3 {
    font-size: 1.2rem;
    color: var(--gray-900);
}

.patient-card-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    padding: 1.25rem 1.75rem;
    background: rgba(248, 250, 255, 0.7);
}

/* === PATIENT DETAIL === */
.patient-detail-page {
    gap: 1.5rem;
}

.patient-header {
    background: var(--gradient-surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
}

.patient-tabs {
    border: none;
    padding: 0;
    gap: 0.5rem;
}

.tab-btn {
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.7);
    color: var(--gray-500);
}

.tab-btn.active {
    background: var(--gradient-brand);
    color: white;
    border-color: transparent;
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.35);
}

.alert {
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-container);
    background: rgba(99, 102, 241, 0.05);
}

.records-list .card {
    border-radius: var(--radius-container);
}

/* === DOCTORS === */
.doctors-grid {
    gap: 1.5rem;
}

.doctor-card {
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-card);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.doctor-card-header {
    background: var(--gradient-brand);
}

.doctor-card-body {
    padding: 1.5rem;
}

.doctor-specialties .specialty-tag {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-600);
}

/* === INVENTORY === */
.inventory-app {
    background: radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.18), transparent 55%),
                linear-gradient(180deg, rgba(248, 250, 255, 0.95), rgba(241, 245, 249, 0.9));
}

.inventory-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 2.5rem clamp(1rem, 3vw, 3rem) 3rem;
}

.inv-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: var(--blur-md);
    padding: 1.75rem clamp(1rem, 3vw, 3rem);
}

.inv-header-content {
    max-width: none !important;
    width: 100%;
    margin: 0;
}

.inv-nav {
    background: transparent;
    border: none;
    margin: 0;
    margin-top: 0.5rem;
    padding: 0 clamp(1rem, 3vw, 3rem);
    width: 100%;
}

.inv-nav-item {
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: rgba(148, 163, 184, 0.12);
    color: var(--gray-600);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.inv-nav-item.active {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-700);
}

.inventory-panel,
.inventory-content > .dashboard-view,
.inventory-content > .articles-view,
.inventory-app .dashboard-card,
.inventory-app .stat-card,
.articles-toolbar,
.articles-filters,
.articles-list-view,
.articles-grid .article-card,
.critical-items-table,
.categories-list .category-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    backdrop-filter: var(--blur-md);
}

.critical-items-table {
    padding: 1.25rem;
}

.critical-items-table table {
    width: 100%;
}

.categories-list .category-item {
    padding: 1.25rem;
}

.articles-toolbar,
.articles-filters {
    padding: 1.25rem 1.5rem;
    gap: 1rem;
}

.filter-search input,
.filter-select {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(248, 250, 255, 0.95);
    padding: 0.8rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.filter-search input:focus,
.filter-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.view-mode-switcher {
    display: inline-flex;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-pill);
    padding: 0.25rem;
}

.view-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-mode-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--gray-700);
}

.view-mode-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-700);
    box-shadow: var(--shadow-sm);
}

.inventory-app .btn-outline {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-700);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.inventory-app .btn-outline:hover {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.15);
}

.inventory-app .btn-ghost {
    border-radius: var(--radius-pill);
    color: var(--gray-600);
    padding: 0.5rem 0.9rem;
}

.inventory-app .btn-ghost:hover {
    background: rgba(15, 23, 42, 0.05);
}

.articles-grid {
    gap: 1.5rem;
}

.article-card-header,
.article-card-footer,
.articles-table thead th {
    background: transparent;
    border-color: rgba(226, 232, 240, 0.7);
}

.articles-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.inventory-app .stat-card,
.inventory-app .dashboard-card {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.stock-progress-track {
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(226, 232, 240, 0.8);
}

.stock-progress-fill,
.stock-bar-fill {
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.inventory-table {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-card);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.inventory-table thead {
    background: rgba(241, 245, 249, 0.9);
}

.inventory-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.low-stock {
    background: rgba(248, 113, 113, 0.15);
    color: var(--error-600);
}

.stock-warning {
    background: rgba(251, 191, 36, 0.18);
    color: var(--warning-600);
}

.stock-safe {
    background: rgba(34, 197, 94, 0.18);
    color: var(--success-600);
}

/* === MODALS & TOASTS === */
.modal {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-card);
}

.modal-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(248, 250, 255, 0.8);
}

.modal-overlay {
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: var(--blur-lg);
}

.toast {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-soft);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        inset: 0 auto auto 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .topbar {
        margin: 1rem;
    }

    .content-area {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .topbar {
        border-radius: var(--radius-md);
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .card,
    .table-container {
        border-radius: var(--radius-container);
    }

    .dashboard-calendar .card-body {
        padding: 1rem;
    }

    .patients-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .topbar {
        margin: 0.75rem;
        padding: 0.5rem 0.85rem;
    }

    .content-area {
        padding: 1rem;
    }

    .card,
    .table-container {
        border-radius: var(--radius-container);
    }
}

