/* Mobile-first стилі для фінансового сервісу */

/* ===== БАЗОВІ СТИЛІ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Awesome іконки */
.fas, .far {
    margin-right: 0.5rem;
}

.btn .fas, .btn .far, .btn i {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
    position: relative;
}

.btn .fas::before, .btn .far::before, .btn i::before {
    position: relative;
    margin: 0;
    line-height: 1;
}

h1 .fas, h1 .far {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

/* Кольори для іконок */
.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* Темна тема (кольори як у test_template.html — NeoFinance) */
[data-theme="dark"] {
    --primary-color: #00f0ff;
    --primary-dark: #00c4d4;
    --success-color: #00ff9d;
    --danger-color: #ff0055;
    --warning-color: #ffb020;
    --bg-color: #050507;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-color: #ffffff;
    --text-light: #8b9bb4;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.6);
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-light);
}

/* Сторінка входу — той самий темний фон, без фіолетового градієнта */
[data-theme="dark"] .auth-page {
    background: var(--bg-color);
}

/* Шапка, бокове і нижнє меню — непрозорі (зручніше для користування) */
[data-theme="dark"] .header {
    background: #0e0e12 !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .sidebar {
    background: #0e0e12 !important;
    border: none !important;
    border-right: 1px solid var(--glass-border) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tabbar {
    background: #0e0e12 !important;
    border-top: 1px solid var(--glass-border) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

/* Картки — glass як у шаблону */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .partner-card,
[data-theme="dark"] .filters-card,
[data-theme="dark"] .report-section,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .modal-content {
    background: var(--glass-surface) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .stat-card {
    border-radius: 18px;
}

[data-theme="dark"] .stat-card:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .stat-card h3,
[data-theme="dark"] .stat-trend {
    color: var(--text-light);
}

[data-theme="dark"] .stat-trend {
    color: var(--text-light);
}

[data-theme="dark"] .stat-value.positive { color: #00ff9d; }
[data-theme="dark"] .stat-value.negative { color: #ff0055; }

[data-theme="dark"] .stat-card-primary .stat-card-icon { background: rgba(0, 240, 255, 0.2); color: #00f0ff; }
[data-theme="dark"] .stat-card-success .stat-card-icon { background: rgba(0, 255, 157, 0.2); color: #00ff9d; }
[data-theme="dark"] .stat-card-danger .stat-card-icon { background: rgba(255, 0, 85, 0.2); color: #ff0055; }
[data-theme="dark"] .stat-card-warning .stat-card-icon { background: rgba(255, 176, 32, 0.2); color: #ffb020; }
[data-theme="dark"] .stat-card-info .stat-card-icon { background: rgba(0, 240, 255, 0.2); color: #00f0ff; }

/* Останні операції / список операцій */
[data-theme="dark"] .recent-transactions .transaction-item,
[data-theme="dark"] .transaction-item,
[data-theme="dark"] .transactions-list .transaction-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

[data-theme="dark"] .recent-transactions .transaction-item:hover,
[data-theme="dark"] .transaction-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .recent-transactions .transaction-description-section {
    border-top-color: var(--glass-border);
}

[data-theme="dark"] .recent-transactions .transaction-description-toggle,
[data-theme="dark"] .recent-transactions .transaction-description-content p {
    color: var(--text-light);
}

/* Sidebar — непрозорий заголовок і навігація */
[data-theme="dark"] .sidebar-header {
    background: #14141a;
    border-bottom-color: var(--glass-border);
}

[data-theme="dark"] .sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .sidebar-nav a.active {
    background: rgba(0, 240, 255, 0.12);
    border-left-color: #00f0ff;
    color: #00f0ff;
}

[data-theme="dark"] .sidebar-user {
    background: #0a0a0e;
    border-top-color: var(--glass-border);
}

/* Tabbar — непрозорий, hover чіткий */
[data-theme="dark"] .tabbar-item:hover,
[data-theme="dark"] .tabbar-item:focus {
    background: rgba(255, 255, 255, 0.06);
}

/* Таблиці звітів */
[data-theme="dark"] .report-table thead {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(112, 0, 255, 0.2));
    color: #fff;
}

[data-theme="dark"] .report-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .report-table td {
    border-bottom-color: var(--glass-border);
}

[data-theme="dark"] .report-table .positive { color: #00ff9d; }
[data-theme="dark"] .report-table .negative { color: #ff0055; }

/* Модальне вікно */
[data-theme="dark"] .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(112, 0, 255, 0.2));
    border-bottom-color: var(--glass-border);
}

[data-theme="dark"] .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Профіль, інші картки */
[data-theme="dark"] .profile-card {
    background: var(--glass-surface) !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .profile-card:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .profile-header-section {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(112, 0, 255, 0.25));
}

[data-theme="dark"] .profile-header-section::before {
    opacity: 0.15;
}

[data-theme="dark"] .profile-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: #00f0ff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .profile-card:hover .profile-avatar {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .profile-avatar-ring {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .profile-name {
    color: #ffffff;
}

[data-theme="dark"] .profile-edit-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .profile-edit-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .profile-info-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
}

[data-theme="dark"] .profile-info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .profile-info-item-highlight {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .profile-info-item-highlight::before {
    background: linear-gradient(180deg, #00f0ff, #00c4d4);
}

[data-theme="dark"] .profile-info-icon {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
}

[data-theme="dark"] .profile-info-item:hover .profile-info-icon,
[data-theme="dark"] .profile-info-icon-accent {
    background: rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .profile-info-label {
    color: var(--text-light);
}

[data-theme="dark"] .profile-info-text {
    color: var(--text-color);
}

[data-theme="dark"] .profile-info-text-large {
    color: #00f0ff;
}

[data-theme="dark"] .profile-info-time {
    color: var(--text-light);
}

[data-theme="dark"] .profile-info-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
}

[data-theme="dark"] .profile-info-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .profile-info-card::before {
    background: linear-gradient(90deg, #00f0ff, rgba(112, 0, 255, 0.8));
}

[data-theme="dark"] .profile-info-card-highlight {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.15);
}

[data-theme="dark"] .profile-info-card-label {
    color: var(--text-light);
}

[data-theme="dark"] .profile-info-card-value {
    color: var(--text-color);
}

[data-theme="dark"] .profile-info-card-time {
    color: var(--text-light);
}

[data-theme="dark"] .email-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(112, 0, 255, 0.4));
    color: #fff;
}

[data-theme="dark"] .share-icon {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.4), rgba(0, 240, 255, 0.4));
    color: #fff;
}

[data-theme="dark"] .date-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(112, 0, 255, 0.3));
    color: #fff;
}

[data-theme="dark"] .profile-share-value {
    color: #00f0ff;
}

[data-theme="dark"] .profile-details,
[data-theme="dark"] .profile-detail-item label,
[data-theme="dark"] .profile-detail-item p {
    color: var(--text-color);
}

[data-theme="dark"] .profile-edit-btn-mobile {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-color: var(--glass-border);
}

[data-theme="dark"] .profile-edit-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Картка «Мій стан як партнера» */
[data-theme="dark"] .calculation-card {
    background: var(--glass-surface) !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .calculation-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .calculation-card .calc-label,
[data-theme="dark"] .calculation-card .balance-label {
    color: var(--text-light);
}

[data-theme="dark"] .calculation-card .calc-value {
    color: var(--text-color);
}

[data-theme="dark"] .calculation-card .calc-value.positive { color: #00ff9d; }
[data-theme="dark"] .calculation-card .calc-value.negative { color: #ff0055; }
[data-theme="dark"] .calculation-card .calc-value.investment { color: #00f0ff; }

[data-theme="dark"] .calculation-card .balance-value.balanced { color: #00f0ff; }
[data-theme="dark"] .calculation-card .balance-value.owes { color: #ff0055; }
[data-theme="dark"] .calculation-card .balance-value.owed { color: #00ff9d; }

[data-theme="dark"] .calculation-card .calc-balance {
    border-top-color: var(--glass-border);
}

[data-theme="dark"] .calculation-card [style*="border-top"] {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .partner-status .section-header h2 {
    color: var(--text-color);
}

/* Мобільний блок «Моя інформація» (заголовок, що згортається) */
[data-theme="dark"] .profile-info-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

[data-theme="dark"] .profile-info-header:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .profile-info-header h3 {
    color: var(--text-color);
}

[data-theme="dark"] .profile-info-section-toggle {
    color: var(--text-light);
}

[data-theme="dark"] .profile-info-grid-collapsible {
    border-color: var(--glass-border);
}

[data-theme="dark"] .profile-detail-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
}

/* Бейджі та алерти */
[data-theme="dark"] .badge-common {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
}

[data-theme="dark"] .badge-personal {
    background: rgba(255, 176, 32, 0.15);
    color: #ffb020;
}

[data-theme="dark"] .alert {
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .empty-state i {
    color: var(--text-light);
}

/* Заголовки секцій */
[data-theme="dark"] .dashboard-header h2,
[data-theme="dark"] .section-header h2,
[data-theme="dark"] .report-section h3 {
    color: var(--text-color);
}

[data-theme="dark"] .filters-header:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Таблиці users, categories тощо */
[data-theme="dark"] .users-table,
[data-theme="dark"] .report-table table {
    background: var(--glass-surface) !important;
}

[data-theme="dark"] .users-table thead,
[data-theme="dark"] table thead {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="dark"] .users-table tbody tr:hover,
[data-theme="dark"] table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .users-table td,
[data-theme="dark"] table td {
    border-color: var(--glass-border);
}

/* Кнопки (не primary) у темній темі */
[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger) {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-highlight);
}

/* Секція «Останні операції» */
[data-theme="dark"] .recent-transactions,
[data-theme="dark"] .section-header {
    color: var(--text-color);
}

[data-theme="dark"] .section-header .btn {
    color: var(--text-color);
    border-color: var(--glass-border);
}

/* Кнопка перемикача теми */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    margin-right: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle i {
    margin: 0;
    font-size: 1.1rem;
}

.auth-card-with-theme {
    position: relative;
}

.auth-card-with-theme .theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* ===== HEADER ===== */
.header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hamburger menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--bg-color);
}

.menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header nav a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.header nav a .fas {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.header nav a:hover,
.header nav a.active {
    background: var(--primary-color);
    color: white;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px; /* Touch-friendly */
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-block {
    width: 100%;
}

/* ===== МІНІМАЛІСТИЧНІ КАРТКИ ===== */
.stat-card,
.partner-card {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
}

/* Мінімалістичний дизайн */
.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 140px;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Світіння при наведенні */
.stat-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    pointer-events: none;
}

.stat-card:hover .stat-card-glow {
    width: 200px;
    height: 200px;
}

/* Мінімалістичні іконки */
.stat-card-icon {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.stat-card-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    position: relative;
}

.stat-card-icon i::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.icon-bg {
    display: none;
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Кольори для карток */
.stat-card-primary {
    color: #667eea;
}

.stat-card-primary .stat-card-icon {
    background: #667eea;
}

.stat-card-success {
    color: #10b981;
}

.stat-card-success .stat-card-icon {
    background: #10b981;
}

.stat-card-danger {
    color: #ef4444;
}

.stat-card-danger .stat-card-icon {
    background: #ef4444;
}

.stat-card-warning {
    color: #f59e0b;
}

.stat-card-warning .stat-card-icon {
    background: #f59e0b;
}

.stat-card-info {
    color: #3b82f6;
}

.stat-card-info .stat-card-icon {
    background: #3b82f6;
}

/* Контент карток */
.stat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card h3 {
    font-size: 0.7rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: inherit;
    transition: all 0.3s;
}

.stat-card:hover .stat-value {
    transform: scale(1.03);
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

/* Тренд індикатор */
.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
}

.stat-trend i {
    font-size: 0.65rem;
    opacity: 0.6;
}

/* ===== СІТКА СТАТИСТИКИ ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0;
}

/* ===== СЕКЦІЯ ОПИСУ ОПЕРАЦІЙ (Десктоп) ===== */
.recent-transactions .transaction-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    margin-bottom: 0.75rem;
}

.recent-transactions .transaction-item:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.recent-transactions .transaction-main-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.recent-transactions .transaction-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.recent-transactions .transaction-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.recent-transactions .transaction-details strong {
    display: block;
    margin-bottom: 0.25rem;
}

.recent-transactions .transaction-details small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recent-transactions .transaction-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.recent-transactions .transaction-meta-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
    flex-wrap: nowrap;
    line-height: 1.4;
}

.recent-transactions .transaction-date-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.recent-transactions .transaction-type {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.recent-transactions .transaction-type .fas {
    margin: 0;
    font-size: 1.2rem;
}

.recent-transactions .transaction-amount {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: right;
    flex-shrink: 0;
}

.recent-transactions .transaction-description-section {
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    order: 999;
    flex-shrink: 0;
}

.recent-transactions .transaction-description-toggle {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: color 0.2s ease;
}

.recent-transactions .transaction-description-toggle:hover {
    color: var(--primary-color);
}

.recent-transactions .transaction-description-toggle i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.recent-transactions .transaction-description-section.expanded .transaction-description-toggle i {
    transform: rotate(180deg);
}

.recent-transactions .transaction-description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.recent-transactions .transaction-description-section.expanded .transaction-description-content {
    max-height: 500px;
    padding: 0.75rem 0 0 0;
    margin: 0.5rem 0 0 0;
    opacity: 1;
}

.recent-transactions .transaction-description-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
    word-break: break-word;
}

.profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card-cash-fullwidth {
    grid-column: 1 / -1;
}

/* Мобільні картки - мінімалістичний дизайн */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Адаптивність для списку операцій на дашборді */
    .recent-transactions {
        margin-bottom: 1.5rem;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
        flex: 1;
    }

    .section-header .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .transactions-list {
        gap: 0.5rem;
    }

    .recent-transactions .transaction-item {
        padding: 1rem;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0;
        border-radius: 12px;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        width: 100%;
        margin-bottom: 0 !important;
    }

    .recent-transactions .transaction-info {
        flex: 1;
        min-width: 0;
        display: flex !important;
        gap: 0.75rem;
        align-items: flex-start !important;
        overflow: hidden;
    }

    .recent-transactions .transaction-type {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(74, 144, 226, 0.1);
    }

    .recent-transactions .transaction-type.type-income {
        background: rgba(16, 185, 129, 0.1);
    }

    .recent-transactions .transaction-type.type-expense {
        background: rgba(239, 68, 68, 0.1);
    }

    .recent-transactions .transaction-type.type-investment {
        background: rgba(74, 144, 226, 0.1);
    }

    .recent-transactions .transaction-type .fas {
        font-size: 1.1rem;
        margin: 0;
    }

    .recent-transactions .transaction-type.type-income .fas {
        color: #10b981;
    }

    .recent-transactions .transaction-type.type-expense .fas {
        color: #ef4444;
    }

    .recent-transactions .transaction-type.type-investment .fas {
        color: #4a90e2;
    }

    .recent-transactions .transaction-details {
        flex: 1;
        min-width: 0;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.375rem;
        justify-content: flex-start;
    }

    .recent-transactions .transaction-details strong {
        font-size: 0.95rem;
        line-height: 1.3;
        margin: 0;
        word-break: break-word;
        display: block;
        font-weight: 600;
        color: #111827;
        text-align: left;
    }

    .recent-transactions .transaction-details small {
        font-size: 0.7rem;
        line-height: 1.5;
        display: block;
        color: #6b7280;
        text-align: left;
    }

    .recent-transactions .transaction-details small.transaction-meta {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.375rem;
        margin: 0;
    }

    .recent-transactions .transaction-meta-line {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex-wrap: nowrap;
        line-height: 1.4;
        text-align: left;
        overflow: hidden;
    }

    .recent-transactions .transaction-date-time {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .recent-transactions .transaction-date-time i {
        flex-shrink: 0;
    }

    .recent-transactions .transaction-meta-line i {
        font-size: 0.7rem;
        margin: 0;
        opacity: 0.6;
        width: 12px;
        text-align: center;
        flex-shrink: 0;
    }

    .recent-transactions .transaction-date-time {
        margin-top: 0;
        color: #9ca3af;
    }

    .recent-transactions .transaction-amount {
        flex-shrink: 0 !important;
        text-align: right !important;
        font-size: 1.15rem;
        font-weight: 700;
        white-space: nowrap;
        align-self: flex-start !important;
        line-height: 1.2;
        letter-spacing: -0.02em;
        margin-top: 0;
        margin-left: 0.5rem;
    }

    /* Секція опису операції */
    .recent-transactions .transaction-main-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 0.75rem;
        width: 100%;
    }

    .recent-transactions .transaction-description-section {
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .recent-transactions .transaction-description-toggle {
        background: none;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #6b7280;
        font-size: 0.75rem;
        cursor: pointer;
        width: 100%;
        text-align: left;
        transition: color 0.2s ease;
    }

    .recent-transactions .transaction-description-toggle:hover {
        color: var(--primary-color);
    }

    .recent-transactions .transaction-description-toggle i {
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }

    .recent-transactions .transaction-description-section.expanded .transaction-description-toggle i {
        transform: rotate(180deg);
    }

    .recent-transactions .transaction-description-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
        padding: 0;
        margin: 0;
        opacity: 0;
    }

    .recent-transactions .transaction-description-section.expanded .transaction-description-content {
        max-height: 500px;
        padding: 0.75rem 0 0 0;
        margin: 0.5rem 0 0 0;
        opacity: 1;
    }

    .recent-transactions .transaction-description-content p {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.6;
        color: #4b5563;
        word-break: break-word;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stats-grid .stat-card-cash-fullwidth {
        grid-column: 1 / -1;
    }
    
    .stat-card {
        background: #ffffff;
        border-radius: 16px;
        padding: 1rem;
        min-height: 130px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .stat-card:active {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .stat-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.15rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
        line-height: 1;
    }
    
    .stat-card-icon i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
        line-height: 1;
        text-align: center;
    }
    
    .stat-card-icon i::before {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    
    .stat-card h3 {
        font-size: 0.65rem;
        letter-spacing: 0.4px;
    }
    
    .stat-value {
        font-size: 1.35rem;
        letter-spacing: -0.3px;
    }
    
    .stat-trend {
        font-size: 0.6rem;
        margin-top: 0.15rem;
    }
}

/* ===== ПАРТНЕРИ ===== */
.partners-section {
    margin-bottom: 2rem;
}

.partners-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.partner-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.partner-email {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.partner-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.partner-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.partner-stat.total {
    border-bottom: 2px solid var(--primary-color);
    padding-top: 0.75rem;
    font-size: 1.1rem;
}

.partner-stat strong {
    font-weight: 600;
}

.partner-stat .positive {
    color: var(--success-color);
}

.partner-stat .negative {
    color: var(--danger-color);
}

.partner-stat .investment {
    color: var(--primary-color);
}

/* ===== СТАТИСТИКА ЗА ПЕРІОДИ ===== */
.period-stats {
    margin-bottom: 2rem;
}

.period-stats h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.period-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.period-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-card h3 i {
    color: var(--primary-color);
}

.period-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.period-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.period-stat.total {
    border-bottom: 2px solid var(--primary-color);
    padding-top: 0.75rem;
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

.period-stat strong {
    font-weight: 600;
}

/* ===== ОПЕРАЦІЇ ===== */
/* ===== РОЗРАХУНКИ МІЖ ПАРТНЕРАМИ ===== */
.partner-calculations {
    margin-bottom: 2rem;
}

.partner-calculations h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
}

.calculations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calculation-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.calculation-card.owed {
    border-left: 4px solid var(--success-color);
}

.calculation-card.owes {
    border-left: 4px solid var(--danger-color);
}

.calculation-card.balanced {
    border-left: 4px solid var(--primary-color);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.calc-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.share-badge {
    background: linear-gradient(135deg, var(--primary-color), #5ba3f5);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.calc-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.calc-label {
    color: var(--text-light);
    font-weight: 500;
}

.calc-value {
    font-weight: 600;
    color: var(--text-color);
}

.calc-value.positive {
    color: var(--success-color);
}

.calc-value.negative {
    color: var(--danger-color);
}

.calc-value.investment {
    color: var(--primary-color);
}

.calc-balance {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.balance-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.balance-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.balance-value.owed {
    color: var(--success-color);
}

.balance-value.owes {
    color: var(--danger-color);
}

.balance-value.balanced {
    color: var(--primary-color);
}

.calculations-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 1rem;
}

.calculations-summary h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.summary-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-value.owed {
    color: var(--success-color);
}

.summary-value.owes {
    color: var(--danger-color);
}

.recent-transactions {
    margin-bottom: 2rem;
}

.transaction-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.75rem;
}

.transaction-item:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

.transaction-item:active {
    transform: translateX(1px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.recent-transactions h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Базові стилі для transaction-item (не для recent-transactions) */
.transactions-list-section .transaction-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.transactions-list-section .transaction-main-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.transactions-list-section .transaction-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.transactions-list-section .transaction-info > div {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.transactions-list-section .transaction-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.transactions-list-section .transaction-details strong {
    display: block;
    margin-bottom: 0.25rem;
}

.transactions-list-section .transaction-details small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.transactions-list-section .transaction-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.transactions-list-section .transaction-meta-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
    flex-wrap: nowrap;
    line-height: 1.4;
}

.transactions-list-section .transaction-date-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.transactions-list-section .transaction-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.transactions-list-section .transaction-description-section {
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    order: 999;
    flex-shrink: 0;
}

.transactions-list-section .transaction-description-toggle {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: color 0.2s ease;
}

.transactions-list-section .transaction-description-toggle:hover {
    color: var(--primary-color);
}

.transactions-list-section .transaction-description-toggle i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.transactions-list-section .transaction-description-section.expanded .transaction-description-toggle i {
    transform: rotate(180deg);
}

.transactions-list-section .transaction-description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.transactions-list-section .transaction-description-section.expanded .transaction-description-content {
    max-height: 500px;
    padding: 0.75rem 0 0 0;
    margin: 0.5rem 0 0 0;
    opacity: 1;
}

.transactions-list-section .transaction-description-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
    word-break: break-word;
}

.transaction-details small i {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.7;
}

.transaction-type {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.transaction-type .fas {
    margin: 0;
    font-size: 1.2rem;
}

.transaction-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.transaction-info small {
    color: var(--text-light);
    font-size: 0.85rem;
}

.transaction-amount {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: right;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--danger-color);
}

.transaction-amount.investment {
    color: var(--primary-color);
}

/* ===== АВТОРИЗАЦІЯ ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-card h2 {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    min-height: 44px; /* Touch-friendly */
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 20px;
    height: 20px;
    min-height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label span {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.5;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== АЛЕРТИ ===== */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: var(--danger-color);
    border: 1px solid #fcc;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-greeting {
    padding: 0;
}

.greeting-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    line-height: 1.3;
}

.greeting-title strong {
    font-weight: 700;
    color: var(--primary-color);
}

.greeting-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.date-time-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.date-time-info i {
    font-size: 0.9rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.date-time-info span {
    font-variant-numeric: tabular-nums;
    color: var(--text-color);
}

.dashboard-header h2 {
    font-size: 1.5rem;
}

/* ===== ПЛАНШЕТИ (768px+) ===== */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .calculations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .stat-card-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        line-height: 1;
    }
    
    .stat-card-icon i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
        line-height: 1;
        text-align: center;
    }
    
    .stat-card-icon i::before {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-card h3 {
        font-size: 0.75rem;
    }

    .period-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .dashboard-header {
        margin-bottom: 1.5rem;
    }
    
    .greeting-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .greeting-info {
        gap: 1.25rem;
    }
    
    .date-time-info {
        font-size: 0.9rem;
    }
}

/* ===== ТАБЛИЦЯ КОРИСТУВАЧІВ ===== */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.users-table thead {
    background: var(--primary-color);
    color: white;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table tbody tr:hover {
    background: #f9f9f9;
}

.users-table .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-small i {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* ===== ФОРМА ===== */
.form-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    min-height: 44px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.8;
}

.form-group small {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-group label input[type="checkbox"] {
    width: auto;
    min-height: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ===== ФІЛЬТРИ ===== */
.filters-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.filters-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.filters-header:hover {
    background-color: var(--bg-color);
}

.filters-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-header h3 i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filters-toggle-icon {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    animation: slideDown 0.3s ease;
}

.filters-hint {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.filters-hint i {
    margin-right: 0.35rem;
    color: var(--primary-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.transactions-actions {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.reports-export-actions {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ===== ТРАНЗАКЦІЇ ===== */
.transactions-list-section {
    margin-top: 1.5rem;
}

.transaction-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
}

.transaction-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0.5rem;
}

.action-buttons .btn-small i {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.action-buttons form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-buttons form .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0.5rem;
}

.action-buttons form .btn-small i {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.badge-common {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-personal {
    background: #fff3e0;
    color: #f57c00;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: var(--text-light);
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0;
    min-width: auto;
    white-space: nowrap;
}

.empty-state-btn i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    font-size: 0.95rem;
    width: auto;
    height: auto;
    position: relative;
}

.empty-state-btn i::before {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    position: relative;
    margin: 0;
}

.transaction-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Покращення для файлових інпутів */
.form-group input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed var(--border-color);
    background: #fafafa;
}

.form-group input[type="file"]:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* Покращення для чекбоксів */
.form-group label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Покращення для select */
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    appearance: none;
}

/* ===== ПЛАНШЕТИ (768px+) ===== */
@media (min-width: 768px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .transactions-list-section .transaction-item {
        padding: 1rem;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0;
    }

    .transactions-list-section .transaction-main-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 0.75rem;
        width: 100%;
    }

    .transactions-list-section .transaction-info {
        flex: 1;
        min-width: 0;
        display: flex !important;
        gap: 0.75rem;
        align-items: flex-start !important;
    }

    .transactions-list-section .transaction-meta {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.375rem;
    }

    .transactions-list-section .transaction-meta-line {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.375rem;
        flex-wrap: nowrap;
        line-height: 1.4;
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
    }

    .transactions-list-section .transaction-date-time {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .transactions-list-section .transaction-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .transactions-list-section .transaction-amount {
        flex-shrink: 0 !important;
        text-align: right !important;
        font-size: 1.15rem;
        font-weight: 700;
        white-space: nowrap;
        align-self: flex-start !important;
        line-height: 1.2;
        letter-spacing: -0.02em;
        margin-top: 0;
        margin-left: 0.5rem;
    }

    .transactions-list-section .transaction-description-section {
        width: 100% !important;
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        order: 2 !important;
        display: block !important;
    }

    .transactions-list-section .transaction-description-toggle {
        font-size: 0.75rem;
    }

    .transactions-list-section .transaction-description-content p {
        font-size: 0.85rem;
    }

    /* Стилі для recent-transactions на десктопі (як transactions-list-section) */
    .recent-transactions .transaction-item {
        padding: 1rem;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0;
        background: var(--card-bg);
        border-radius: 8px;
        box-shadow: var(--shadow);
        margin-bottom: 0.75rem;
    }

    .recent-transactions .transaction-main-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 0.75rem;
        width: 100%;
    }

    .recent-transactions .transaction-info {
        flex: 1;
        min-width: 0;
        display: flex !important;
        gap: 0.75rem;
        align-items: flex-start !important;
    }

    .recent-transactions .transaction-type {
        flex-shrink: 0;
        width: 2.5rem;
        height: 2.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .recent-transactions .transaction-type .fas {
        margin: 0;
        font-size: 1.2rem;
    }

    .recent-transactions .transaction-type.type-income .fas {
        color: var(--success-color);
    }

    .recent-transactions .transaction-type.type-expense .fas {
        color: var(--danger-color);
    }

    .recent-transactions .transaction-type.type-investment .fas {
        color: var(--primary-color);
    }

    .recent-transactions .transaction-details {
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .recent-transactions .transaction-details strong {
        display: block;
        margin-bottom: 0.25rem;
    }

    .recent-transactions .transaction-details small {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .recent-transactions .transaction-meta {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.375rem;
    }

    .recent-transactions .transaction-meta-line {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.375rem;
        flex-wrap: nowrap;
        line-height: 1.4;
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
    }

    .recent-transactions .transaction-date-time {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .recent-transactions .transaction-amount {
        flex-shrink: 0 !important;
        text-align: right !important;
        font-size: 1.15rem;
        font-weight: 700;
        white-space: nowrap;
        align-self: flex-start !important;
        line-height: 1.2;
        letter-spacing: -0.02em;
        margin-top: 0;
        margin-left: 0.5rem;
    }

    .recent-transactions .transaction-description-section {
        width: 100% !important;
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        order: 2 !important;
        display: block !important;
    }

    .recent-transactions .transaction-description-toggle {
        font-size: 0.75rem;
    }

    .recent-transactions .transaction-description-content p {
        font-size: 0.85rem;
    }

    .transaction-item {
        flex-direction: row;
        align-items: center;
    }


    .transaction-actions {
        flex-direction: column;
        align-items: flex-end;
    }
}

/* ===== ЗВІТИ ===== */
.report-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.report-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.report-section h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.report-table {
    overflow-x: auto;
}

.report-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.report-table thead {
    background: var(--primary-color);
    color: white;
}

.report-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.report-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.report-table tbody tr:hover {
    background: var(--bg-color);
}

.report-table .positive {
    color: #28a745;
    font-weight: 500;
}

.report-table .negative {
    color: #dc3545;
    font-weight: 500;
}

/* ===== ЛОГИ ===== */
.report-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.report-table thead {
    background: var(--primary-color);
    color: white;
}

.report-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.report-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.report-table tbody tr:hover {
    background: var(--bg-color);
}

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

.report-table pre {
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== МОДАЛЬНЕ ВІКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-color);
    color: white;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1;
}

.modal-header h2 i {
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
    position: relative;
}

.modal-header h2 i::before {
    position: relative;
    margin: 0;
    line-height: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
}

.modal-close i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    line-height: 1;
    text-align: center;
    position: relative;
}

.modal-close i::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.modal-body .form-group {
    margin-bottom: 1.25rem;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.modal-body .form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.modal-body .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-body .form-actions .btn {
    flex: 1;
    justify-content: center;
}

.modal-body .form-actions .btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    line-height: 1;
    vertical-align: middle;
    position: relative;
}

.modal-body .form-actions .btn i::before {
    position: relative;
    margin: 0;
    line-height: 1;
}

.modal-close-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.modal-close-btn:hover {
    background: #f5f5f5;
}

/* Мобільні пристрої */
@media (max-width: 767px) {
    .greeting-title {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
    }
    
    .greeting-info {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .date-time-info {
        font-size: 0.85rem;
    }
    
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }
    
    .modal-header {
        border-radius: 20px 20px 0 0;
        padding: 1.25rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-body .form-actions {
        flex-direction: column;
    }
    
    .modal-body .form-actions .btn {
        width: 100%;
    }
}

/* ===== SIDEBAR (МОБІЛЬНИЙ) ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height для мобільних */
    background: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-color);
    color: white;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    min-height: 44px;
}

.sidebar-nav a:hover {
    background: var(--bg-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-nav a.active {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-nav a i {
    width: 24px;
    text-align: center;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.sidebar-user {
    padding: 1rem 1.5rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 20px));
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    position: sticky;
    bottom: 0;
    margin-top: auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.sidebar-user-email {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== МОБІЛЬНІ ПРИСТРОЇ (до 768px) ===== */
@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
    }

    .header nav {
        display: none;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* ===== ПЛАНШЕТИ (768px+) ===== */
@media (min-width: 768px) {
    .sidebar {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* ===== ДЕСКТОП (1024px+) ===== */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.75rem;
        min-height: 160px;
    }
    
    .calculations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .calculation-card {
        padding: 1.5rem;
    }
    
    .stat-card-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        line-height: 1;
    }
    
    .stat-card-icon i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
        line-height: 1;
        text-align: center;
    }
    
    .stat-card-icon i::before {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

    .container {
        padding: 2rem;
    }

    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== TAB BAR (НИЖНЄ МЕНЮ ДЛЯ МОБІЛЬНИХ) ===== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    /* Показується тільки на мобільних через media query */
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
    flex: 1;
    font-size: 0.75rem;
    position: relative;
}

.tabbar-item i {
    font-size: 1.25rem;
    margin: 0;
    display: block;
}

.tabbar-item span {
    font-size: 0.7rem;
    line-height: 1;
    white-space: nowrap;
}

.tabbar-item:hover,
.tabbar-item:focus {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

.tabbar-item.active {
    color: var(--primary-color);
}

.tabbar-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

/* Додати відступ для контенту, щоб він не перекривався з tabbar */
body {
    padding-bottom: 0;
}

@media (max-width: 767px) {
    .tabbar {
        display: flex;
    }
    
    /* Додати відступ для контенту на мобільних */
    main.container {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    /* Приховати header nav на мобільних (вже є, але для впевненості) */
    .header nav {
        display: none;
    }
}

/* Приховати tabbar на планшетах та десктопах */
@media (min-width: 768px) {
    .tabbar {
        display: none;
    }
    
    main.container {
        padding-bottom: 1rem;
    }
}

/* ===== СТИЛІ ДЛЯ ПРОФІЛЮ ===== */
.profile-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 0;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.profile-edit-btn-mobile {
    display: none;
}

.profile-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 24px 80px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Header секція */
.profile-header-section {
    position: relative;
    padding: 3rem 2.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: flex-end;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.profile-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-bottom: -20px;
    z-index: 2;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.profile-avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 0;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50%, 100% {
        transform: scale(1.05);
        opacity: 0.7;
    }
}

.profile-card:hover .profile-avatar {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.profile-header-content {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.profile-name {
    margin: 0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.profile-edit-btn i {
    font-size: 0.875rem;
    margin: 0;
}

/* Секція інформації профілю */
.profile-info-section {
    margin-top: 0;
}

.profile-info-header {
    display: none;
}

.profile-info-section-toggle {
    display: none;
}

/* На десктопі секція завжди розгорнута */
@media (min-width: 768px) {
    .profile-info-section.collapsed .profile-info-grid-collapsible {
        max-height: none !important;
        opacity: 1 !important;
        margin: 0 !important;
        padding: 1.5rem 2rem !important;
        padding-top: 2rem !important;
    }
}

/* Сітка інформаційних карток */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
    padding-top: 2rem;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.profile-info-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.profile-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(74, 144, 226, 0.15);
}

.profile-info-item:hover::before {
    transform: scaleY(1);
}

.profile-info-item-highlight {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.03), rgba(74, 144, 226, 0.01));
    border-color: rgba(74, 144, 226, 0.12);
}

.profile-info-item-highlight::before {
    background: linear-gradient(180deg, #4a90e2, #5ba3f5);
    transform: scaleY(0);
}

.profile-info-item-highlight:hover::before {
    transform: scaleY(1);
}

.profile-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
}

.profile-info-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.profile-info-item:hover .profile-info-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.08));
}

.profile-info-icon-accent {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.08));
}

.profile-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.profile-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.profile-info-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    word-break: break-word;
}

.profile-info-text-large {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-info-time {
    font-size: 0.85rem;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 0.5rem;
}


.profile-info-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.profile-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.profile-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.profile-info-card:hover::before {
    transform: scaleX(1);
}

.profile-info-card-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.04), rgba(118, 75, 162, 0.02));
    border-color: rgba(102, 126, 234, 0.15);
}

.profile-info-card-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.profile-info-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.profile-info-icon-wrapper i {
    font-size: 1.1rem;
    margin: 0;
}

.email-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.share-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.date-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.profile-info-card:hover .profile-info-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.profile-info-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-card-value {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    word-break: break-word;
}

.profile-info-card-value-group {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-info-card-time {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
}

.profile-share-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.profile-details {
    margin-top: 2rem;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.profile-detail-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.profile-detail-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-detail-item p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 767px) {
    .profile-card {
        border-radius: 20px;
        margin-top: 1rem;
    }

    .profile-edit-btn-mobile {
        display: flex;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(10px);
        color: #ffffff;
        border-radius: 12px;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        z-index: 10;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .profile-edit-btn-mobile:hover {
        transform: scale(1.1);
        background: rgba(255, 255, 255, 0.35);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .profile-edit-btn-mobile:active {
        transform: scale(0.95);
    }

    .profile-edit-btn-mobile i {
        font-size: 1.1rem;
        margin: 0;
    }

    .profile-header-section {
        padding: 2rem 1.5rem 1.5rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .profile-avatar-wrapper {
        margin-bottom: 0;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .profile-header-content {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding-bottom: 0;
    }

    .profile-name {
        font-size: 1.75rem;
        text-align: center;
    }

    .profile-edit-btn {
        display: none;
    }

    .profile-info-section {
        margin-top: 1.5rem;
    }

    .profile-info-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        cursor: pointer;
        user-select: none;
        transition: all 0.2s ease;
        margin-bottom: 0;
    }

    .profile-info-header:hover {
        background: #f9fafb;
        border-color: rgba(74, 144, 226, 0.15);
    }

    .profile-info-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-color);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .profile-info-header h3 i {
        color: var(--primary-color);
        font-size: 1rem;
    }

    .profile-info-section-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: #9ca3af;
        transition: transform 0.3s ease;
    }

    .profile-info-section-toggle i {
        font-size: 0.75rem;
    }

    .profile-info-section.collapsed .profile-info-section-toggle i {
        transform: rotate(0deg);
    }

    .profile-info-section:not(.collapsed) .profile-info-section-toggle i {
        transform: rotate(180deg);
    }

    .profile-info-grid-collapsible {
        max-height: 1000px;
        opacity: 1;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
        padding: 1.5rem 1.25rem;
        padding-top: 1rem;
    }

    .profile-info-section.collapsed .profile-info-grid-collapsible {
        max-height: 0;
        opacity: 0;
        margin: 0;
        padding: 0 1.25rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
        padding: 0;
    }

    .profile-info-item {
        padding: 0.875rem 1rem;
    }

    .profile-info-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .profile-info-text {
        font-size: 0.9rem;
    }

    .profile-info-text-large {
        font-size: 1.1rem;
    }
}

/* Додаткові покращення для дуже малих екранів */
@media (max-width: 480px) {
    .profile-header-section {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.25rem;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-info-header {
        padding: 0.875rem 1.25rem;
    }

    .profile-info-header h3 {
        font-size: 0.95rem;
    }

    .profile-info-grid-collapsible {
        padding: 1.25rem 1rem;
        padding-top: 0.875rem;
    }

    .profile-info-section.collapsed .profile-info-grid-collapsible {
        padding: 0 1rem;
    }

    .profile-info-grid {
        padding: 1.25rem 1rem;
        padding-top: 1.75rem;
        gap: 0.75rem;
    }

    .profile-info-item {
        padding: 0.75rem;
        gap: 0.875rem;
    }

    .profile-info-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .profile-info-label {
        font-size: 0.65rem;
    }

    .profile-info-text {
        font-size: 0.85rem;
    }

    .profile-info-text-large {
        font-size: 1rem;
    }

    .profile-info-time {
        font-size: 0.8rem;
        margin-left: 0.375rem;
    }
}

/* ===== СТИЛІ ДЛЯ АДМІНСЬКОГО DASHBOARD ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 2rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.admin-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-stat-value {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
}

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

@media (max-width: 767px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions .btn {
        flex: 1;
    }
}

/* ===== МОДАЛЬНЕ ВІКНО ПІДТВЕРДЖЕННЯ ===== */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.confirm-dialog.active {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.confirm-dialog-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.confirm-dialog.active .confirm-dialog-content {
    transform: scale(1) translateY(0);
}

.confirm-dialog-icon {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
    color: var(--primary-color);
}

.confirm-dialog-icon i {
    font-size: 4rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.confirm-dialog-title {
    text-align: center;
    margin: 0 1.5rem 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.confirm-dialog-message {
    text-align: center;
    padding: 0 1.5rem 2rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    white-space: pre-line;
}

.confirm-dialog-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.confirm-dialog-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.confirm-dialog-actions .btn i {
    margin-right: 0.5rem;
}

.confirm-dialog-actions .btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.confirm-dialog-actions .btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirm-dialog-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.confirm-dialog-actions .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.confirm-dialog-actions .btn:active {
    transform: translateY(0);
}

/* Мобільні пристрої */
@media (max-width: 767px) {
    .confirm-dialog {
        padding: 0;
        align-items: flex-end;
    }
    
    .confirm-dialog-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }
    
    .confirm-dialog-icon {
        padding: 1.5rem 1.5rem 0.75rem;
    }
    
    .confirm-dialog-icon i {
        font-size: 3rem;
    }
    
    .confirm-dialog-title {
        font-size: 1.25rem;
        margin: 0 1.25rem 0.75rem;
    }
    
    .confirm-dialog-message {
        padding: 0 1.25rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .confirm-dialog-actions {
        flex-direction: column;
        padding: 0 1.25rem 1.25rem;
        padding-top: 1.25rem;
    }
    
    .confirm-dialog-actions .btn {
        width: 100%;
        padding: 1rem;
    }
}

/* ===== ПРЕВ'Ю ФАЙЛІВ ===== */
.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.file-preview-content {
    position: relative;
}

.file-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-preview-pdf {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.file-preview-pdf i {
    font-size: 2rem;
    color: var(--danger-color);
}

.file-preview-pdf span {
    font-size: 0.95rem;
    color: var(--text-color);
    word-break: break-word;
}

.file-preview-remove {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.file-preview-remove:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.file-preview-remove:active {
    transform: scale(0.95);
}

.file-preview-remove i {
    margin: 0;
}

/* Мобільні пристрої */
@media (max-width: 767px) {
    .file-preview {
        padding: 0.75rem;
    }
    
    .file-preview img {
        max-height: 200px;
    }
    
    .file-preview-pdf {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
    }
    
    .file-preview-pdf i {
        font-size: 1.5rem;
    }
    
    .file-preview-remove {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

