/**
 * SuisseMed CRM - Əsas Stil Vərəqi (CSS)
 * Şəkildəki dizayna 100% uyğunlaşdırılmışdır.
 */

:root {
    --primary: #c91929;
    --primary-hover: #b01423;
    --primary-light: #fef2f2;
    --primary-border: #fecaca;
    
    --bg-body: #f4f6fa;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f1f3f5;
    
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --info-text: #1e40af;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

/* ================== SOL YAN MENYU (SIDEBAR) ================== */
.sidebar {
    width: 250px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 40;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sidebar-brand {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(201, 25, 41, 0.16);
    background: #ffffff;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(201, 25, 41, 0.25);
}

.brand-country {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.brand-ministry {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.brand-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.sidebar-menu {
    padding: 12px 10px;
    flex-grow: 1;
}

.menu-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 10px 6px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}

.menu-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.menu-item.active {
    background-color: var(--primary);
    color: #ffffff;
}

.menu-item .menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.menu-item.active .menu-icon {
    opacity: 1;
}

.menu-badge {
    margin-left: auto;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.menu-item.active .menu-badge {
    background-color: #ffffff;
    color: var(--primary);
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border-light);
}

.slogan-card {
    background: #fff5f5;
    border: 1px dashed #fecaca;
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slogan-icon {
    font-size: 20px;
    color: var(--primary);
}

.slogan-text strong {
    display: block;
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
}

.slogan-text span {
    font-size: 10px;
    color: var(--text-muted);
}

.app-version {
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
}

/* ================== ƏSAS MƏZMUN (MAIN CONTENT) ================== */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ================== YUXARI BAŞLIQ (HEADER) ================== */
.top-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    max-width: 580px;
}

.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    font-size: 12.5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #f9fafb;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(201, 25, 41, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
}

.search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e5e7eb;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-ai-header {
    background: linear-gradient(135deg, #c91929 0%, #7c3aed 100%);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-ai-header:hover {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.5);
}

.header-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 17px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.15s;
}

.header-icon-btn:hover {
    background-color: #f3f4f6;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
}

.user-role-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    background: #fff1f2;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 6px;
}

.btn-logout:hover {
    background-color: #fee2e2;
    color: var(--danger-text);
    border-color: var(--danger);
}

/* ================== SƏHİFƏ İÇİ (DASHBOARD CONTENT) ================== */
.dashboard-container {
    padding: 20px 24px 40px;
    overflow-y: auto;
}

.welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}

.welcome-text h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.welcome-text p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.welcome-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-badge {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(201, 25, 41, 0.2);
}

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

.btn-primary:active {
    transform: scale(0.98);
}

/* ================== 5 ƏDƏD TOP KPI KARTLARI ================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s, transform 0.2s;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-red { background-color: #fee2e2; color: var(--primary); }
.icon-green { background-color: #d1fae5; color: var(--success); }
.icon-yellow { background-color: #fef3c7; color: var(--warning); }
.icon-blue { background-color: #e0f2fe; color: #0284c7; }

.kpi-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.trend-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.trend-up { background-color: #ecfdf5; color: var(--success); }
.trend-orange { background-color: #fffbeb; color: var(--warning); }

.kpi-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

/* ================== ƏSAS 2 SÜTUNLU ŞƏBƏKƏ (MAIN GRID) ================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.grid-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
}

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

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.card-tabs {
    display: flex;
    gap: 12px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.card-action-link {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.card-action-link:hover {
    text-decoration: underline;
}

/* ================== QAN EHTİYATI MATRİSİ VƏ DONUT CHART ================== */
.blood-stock-container {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: center;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.stock-table th {
    text-align: center;
    padding: 6px 4px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.stock-table th:first-child { text-align: left; padding-left: 6px; }

.stock-table td {
    text-align: center;
    padding: 5px 4px;
    border-bottom: 1px solid var(--border-light);
}

.stock-table td:first-child {
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    padding-left: 6px;
}

.stock-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    min-width: 32px;
}

.stock-pill.green { background-color: #d1fae5; color: #065f46; }
.stock-pill.yellow { background-color: #fef3c7; color: #92400e; }
.stock-pill.red { background-color: #fee2e2; color: #991b1b; }

.stock-chart-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.donut-svg { transform: rotate(-90deg); }

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-text strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.donut-center-text span {
    font-size: 10px;
    color: var(--text-muted);
}

.donut-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin-top: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 6px;
    display: inline-block;
}

.stock-footer-pills {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.indicator-pill {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-danger { background-color: #fee2e2; color: #991b1b; }
.pill-warning { background-color: #fef3c7; color: #92400e; }
.pill-info { background-color: #f1f5f9; color: #475569; }

/* ================== MALİYYƏ VƏ BAR CHART ================== */
.finance-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.finance-stat-box {
    background-color: #f9fafb;
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.finance-stat-title {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.finance-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.finance-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bar-chart-container {
    height: 140px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-bottom: 1px solid var(--border-color);
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 100%;
    justify-content: center;
    height: 110px;
}

.bar {
    width: 8px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.bar-income { background-color: var(--primary); }
.bar-expense { background-color: #fca5a5; }

.bar-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ================== XƏSTƏXANA BORCLARI CƏDVƏLİ ================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.custom-table th {
    text-align: left;
    padding: 8px 10px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background-color: #f9fafb;
}

.custom-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-track {
    flex-grow: 1;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: var(--radius-full);
    overflow: hidden;
    min-width: 60px;
}

.progress-fill { height: 100%; border-radius: var(--radius-full); }
.progress-orange { background-color: #f59e0b; }
.progress-green { background-color: var(--success); }

.status-chip {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    white-space: nowrap;
}

.status-green { background-color: #d1fae5; color: #065f46; }
.status-blue { background-color: #dbeafe; color: #1e40af; }
.status-yellow { background-color: #fef3c7; color: #92400e; }
.status-teal { background-color: #ccfbf1; color: #115e59; }

/* ================== GÖRÜŞLƏR VƏ TƏQVİM KARTLARI ================== */
.meeting-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.meeting-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.meeting-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-logo-box {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-logo-box img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.meeting-details strong {
    display: block;
    font-size: 12px;
    color: var(--text-main);
}

.meeting-time-sub {
    font-size: 10.5px;
    color: var(--text-muted);
}

.btn-join-meeting {
    background-color: #f3f4f6;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.btn-join-meeting:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ================== Aİ COPILOT ÇAT PANELİ (DRAWER) ================== */
.ai-fab-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #c91929 0%, #7c3aed 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease;
}

.ai-fab-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.6);
}

.ai-chat-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-drawer.open {
    right: 0;
}

.ai-drawer-header {
    background: linear-gradient(135deg, #c91929 0%, #7c3aed 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-drawer-title h3 {
    font-size: 15px;
    font-weight: 800;
}

.ai-drawer-title span {
    font-size: 10.5px;
    opacity: 0.85;
}

.ai-drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.8;
}

.ai-drawer-close:hover { opacity: 1; }

.ai-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8fafc;
}

.ai-bubble {
    max-width: 86%;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: 12.5px;
    line-height: 1.45;
    word-break: break-word;
}

.ai-bubble.user {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-bubble.assistant {
    align-self: flex-start;
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ai-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    margin-right: 6px;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

.ai-action-chip svg {
    width: 12px;
    height: 12px;
    color: #059669;
    flex-shrink: 0;
}

.ai-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: left;
}

.ai-table th {
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 700;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.ai-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

.ai-table tr:last-child td {
    border-bottom: none;
}

.ai-table tr:nth-child(even) {
    background: #f8fafc;
}

.ai-inline-code {
    background: #f1f5f9;
    color: #c91929;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

.ai-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    word-break: break-all;
}

.ai-link:hover {
    color: #1d4ed8;
}

.ai-h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin: 4px 0 8px;
}

.ai-list {
    margin: 6px 0 6px 18px;
    padding: 0;
    font-size: 12px;
}

.ai-list li {
    margin-bottom: 3px;
}

.ai-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 10px 0;
}

.ai-p {
    margin: 4px 0;
    line-height: 1.5;
}

.ai-quick-prompts {
    padding: 8px 14px;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.ai-prompt-pill {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s;
}

.ai-prompt-pill:hover {
    background: #fee2e2;
    border-color: var(--primary-border);
    color: var(--primary);
}

.ai-drawer-input-area {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.ai-drawer-input-area input {
    flex-grow: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12.5px;
    outline: none;
}

.ai-drawer-input-area input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.ai-drawer-send-btn {
    background: linear-gradient(135deg, #c91929 0%, #7c3aed 100%);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* ================== MODALLAR (DIALOG / OVERLAY) ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(3px);
}

.modal-overlay.active { display: flex; }

.modal-content {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body { padding: 20px; }

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    outline: none;
    background-color: #ffffff;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 25, 41, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f9fafb;
}

.btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #ffffff;
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 12.5px;
    min-width: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.search-modal { max-width: 600px; }

.search-modal-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    outline: none;
}

.search-results-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-result-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.search-result-item:hover { background-color: #f8fafc; }

/* ================== ÜMUMİ DÜYMƏLƏR VƏ FORM ELEMENTLƏRİ ================== */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
    border: 1px solid var(--success);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-success:hover { background-color: #059669; }

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    border: 1px solid var(--danger);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-danger:hover { background-color: #dc2626; }

.btn-info {
    background-color: var(--info);
    color: #ffffff;
    border: 1px solid var(--info);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-info:hover { background-color: #2563eb; }

.btn-sm {
    padding: 5px 10px;
    font-size: 11.5px;
    border-radius: var(--radius-sm);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

/* SƏHİFƏ BAŞLIĞI VƏ AKTLAR */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title-box h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title-box p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}
.page-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* FİLTER PANELİ */
.filter-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.filter-group {
    flex: 1;
    min-width: 180px;
}
.filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    outline: none;
}
.filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(201, 25, 41, 0.1);
}

/* MƏLUMAT CƏDVƏLİ */
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}
.table-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafbfc;
}
.table-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}
.data-table th {
    background-color: #f8fafc;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
}
.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* BADGELƏR */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-success { background-color: var(--success-bg); color: var(--success-text); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger-text); }
.badge-info { background-color: var(--info-bg); color: var(--info-text); }
.badge-purple { background-color: #ede9fe; color: #5b21b6; }
.badge-gray { background-color: #f3f4f6; color: #4b5563; }

/* STAT MİNİ KARTLAR */
.stat-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat-mini-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-mini-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-mini-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}
.stat-mini-lbl {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* TAB NAVİQASİYASI */
.tab-navigation {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}
.tab-item {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* BOŞLUQ VƏZİYYƏTİ */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.6;
}
.empty-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.empty-desc {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 16px;
}

/* ÇAP FORMATI */
@media print {
    .sidebar, .top-header, .page-actions, .filter-card, .ai-fab-btn, .ai-chat-drawer {
        display: none !important;
    }
    .main-wrapper, .dashboard-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .table-card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* RESPONSIVLIK */
@media (max-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        display: block;
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 10000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    }
    .sidebar.mobile-open {
        left: 0;
    }
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .ai-chat-drawer { width: 100%; }
}

/* ================== AÇILIB-BAĞLANAN SİDEBAR (COLLAPSED) ================== */
.sidebar.collapsed {
    width: 72px;
}
.sidebar.collapsed .sidebar-brand {
    padding: 14px 0;
    justify-content: center;
}
.sidebar.collapsed .brand-link {
    justify-content: center;
}
.sidebar.collapsed .brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
}
.sidebar.collapsed .brand-info,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .menu-label,
.sidebar.collapsed .menu-badge,
.sidebar.collapsed .badge-pulse,
.sidebar.collapsed .sidebar-footer {
    display: none !important;
}
.sidebar.collapsed .sidebar-menu {
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sidebar.collapsed .menu-item {
    width: 44px;
    height: 44px;
    margin: 4px 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    position: relative;
    border-left: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}
.sidebar.collapsed .menu-item:hover {
    background: #f1f5f9;
    color: var(--primary);
    transform: translateY(-1px);
}
.sidebar.collapsed .menu-item.active {
    background: rgba(201, 25, 41, 0.1);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(201, 25, 41, 0.15);
}
.sidebar.collapsed .menu-item-ai {
    background: linear-gradient(135deg, rgba(201, 25, 41, 0.08), rgba(124, 58, 237, 0.12));
    border-left: none;
    color: #7c3aed;
}
.sidebar.collapsed .menu-item-ai:hover {
    background: linear-gradient(135deg, rgba(201, 25, 41, 0.15), rgba(124, 58, 237, 0.2)) !important;
    transform: translateY(-1px);
}
.sidebar.collapsed .menu-item-ai.active {
    background: linear-gradient(135deg, rgba(201, 25, 41, 0.18), rgba(124, 58, 237, 0.24));
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.sidebar.collapsed .menu-icon {
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar.collapsed .menu-icon svg {
    width: 20px;
    height: 20px;
}
.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    animation: tooltipFadeIn 0.15s ease-out;
}
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ================== Aİ MENYU BƏNDİ VƏ PULSE BADGE ================== */
.menu-item-ai {
    background: linear-gradient(90deg, rgba(201, 25, 41, 0.06), rgba(124, 58, 237, 0.08));
    border-left: 3px solid #7c3aed;
}
.menu-item-ai:hover {
    background: linear-gradient(90deg, rgba(201, 25, 41, 0.12), rgba(124, 58, 237, 0.15)) !important;
}
.text-ai {
    color: #7c3aed !important;
}
.badge-pulse {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #c91929, #7c3aed);
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

/* ================== DİL SEÇİMİ DROPDOWN ================== */
.lang-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}
.lang-selector-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 150px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 500;
    transition: background 0.12s;
}
.lang-option:hover {
    background: #f8fafc;
    color: var(--primary);
}
.lang-option.active {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}
.lang-code {
    font-weight: 700;
    font-size: 11px;
    color: var(--text-muted);
}

/* ================== BİLDİRİŞLƏR PANELİ (DROPDOWN) ================== */
.notification-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 360px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.16);
    z-index: 1000;
    overflow: hidden;
}
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}
.dropdown-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.btn-text-link:hover {
    text-decoration: underline;
}
.dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px;
}
.alert-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: background 0.15s;
    border: 1px solid transparent;
}
.alert-item:hover {
    background: #f8fafc;
    border-color: var(--border-light);
}
.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.alert-content {
    flex-grow: 1;
}
.alert-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}
.alert-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}
.alert-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
}
.alert-resolve-btn {
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    align-self: flex-start;
}
.alert-resolve-btn:hover {
    color: var(--danger);
}
.empty-notifications {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ================== XÜSUSİ TƏSDİQLƏMƏ MODALI ================== */
.custom-confirm-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0,0,0,0.06);
    animation: confirmPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes confirmPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* ================== MÜASİR PROQRESS BARLI TOASTLAR ================== */
.toast {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #1e293b;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3b82f6; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    width: 100%;
    animation: toastTimer linear forwards;
}
@keyframes toastTimer {
    from { width: 100%; }
    to { width: 0%; }
}
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ================== ALT BÖLMƏ: SÜRƏTLİ ƏMƏLİYYATLAR VƏ SİSTEM STATİSTİKASI ================== */
.bottom-section-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 1024px) {
    .bottom-section-grid {
        grid-template-columns: 1fr;
    }
}

/* Sürətli əməliyyatlar grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 4px;
}

@media (max-width: 640px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.action-btn-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.action-btn-card:hover {
    border-color: #cbd5e1;
    background: #fafbff;
    transform: translateY(-3px);
    box-shadow: 0 10px 22px -4px rgba(0, 0, 0, 0.08);
}

.action-btn-card:hover .action-label {
    color: var(--primary);
}

.action-btn-card:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.06);
}

.action-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.action-btn-card:hover .action-icon-badge {
    transform: scale(1.1);
}

.badge-patient   { background: #eff6ff; color: #2563eb; }
.badge-order     { background: #fef2f2; color: #dc2626; }
.badge-meeting   { background: #f5f3ff; color: #7c3aed; }
.badge-payment   { background: #ecfdf5; color: #059669; }
.badge-donor     { background: #fff1f2; color: #e11d48; }
.badge-inventory { background: #fffbeb; color: #d97706; }

.action-btn-card .action-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.action-btn-card .action-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Sistem statistikası grid */
.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 4px;
}

.sys-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sys-stat-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -2px rgba(0, 0, 0, 0.07);
}

.sys-stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-blue    { background: #eff6ff; color: #3b82f6; }
.stat-icon-red     { background: #fef2f2; color: #ef4444; }
.stat-icon-emerald { background: #ecfdf5; color: #10b981; }
.stat-icon-amber   { background: #fffbeb; color: #f59e0b; }

.sys-stat-info {
    display: flex;
    flex-direction: column;
}

.sys-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.sys-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ================== PARAMETRLƏR SƏHİFƏSİ STİLLƏRİ ================== */
.settings-section-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
    margin-bottom: 18px;
}
.settings-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--text-muted);
}
.db-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #065f46;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.db-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}
.setting-help-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* ================== SUISSEMED MÜASİR PRELOADER ================== */
.suissemed-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
}

.suissemed-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    user-select: none;
}

.preloader-spinner-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    border-radius: 50%;
    box-sizing: border-box;
}

.spinner-ring.outer {
    width: 64px;
    height: 64px;
    border: 3.5px solid rgba(201, 25, 41, 0.1);
    border-top-color: #c91929;
    border-right-color: #c91929;
    animation: suisseSpin 0.85s linear infinite;
}

.spinner-ring.inner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(2, 132, 199, 0.1);
    border-bottom-color: #0284c7;
    border-left-color: #0284c7;
    animation: suisseSpinReverse 1.1s linear infinite;
}

.spinner-center {
    position: relative;
    width: 24px;
    height: 24px;
    background: #fef2f2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c91929;
    font-weight: 800;
    font-size: 15px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(201, 25, 41, 0.18);
    animation: suissePulse 1.7s ease-in-out infinite;
}

.spinner-center .cross {
    font-weight: 900;
    transform: translateY(-1px);
}

.preloader-brand {
    text-align: center;
}

.preloader-brand .brand-text {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
    display: block;
}

.preloader-brand .brand-sub {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 3px;
    display: block;
}

@keyframes suisseSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes suisseSpinReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes suissePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ================== DROPDOWN PANELLƏR VƏ BİLDİRİŞLƏR ================== */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    animation: dropdownFade 0.15s ease-out;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-dropdown {
    width: 360px;
    max-width: 90vw;
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-dropdown .dropdown-header h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.notification-dropdown .dropdown-header .btn-text-link {
    font-size: 11px;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    padding: 0;
}

.notification-dropdown .dropdown-header .btn-text-link:hover {
    text-decoration: underline;
}

.notification-dropdown .dropdown-body {
    max-height: 380px;
    overflow-y: auto;
}

.alert-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.15s;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item:hover {
    background-color: #f8fafc;
}

.alert-icon {
    flex-shrink: 0;
    padding-top: 3px;
}

.alert-content {
    flex-grow: 1;
    min-width: 0;
}

.alert-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.alert-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.alert-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
}

.alert-resolve-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
}

.alert-resolve-btn:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

.empty-notifications {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* Dil Dropdownu */
.lang-dropdown-wrapper {
    position: relative;
}

.lang-selector-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s;
}

.lang-selector-btn:hover {
    background-color: #f8fafc;
    border-color: var(--primary);
}

.lang-dropdown {
    min-width: 140px;
    padding: 6px 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.15s;
}

.lang-option:hover, .lang-option.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.lang-code {
    font-weight: 700;
    font-size: 11px;
}


