/* styles/dashboard.css */
@font-face {
  font-family: satoshi; /* set name */
  src: url(../assets/font/Satoshi-Variable.ttf); /* url of the font */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, "satoshi", sans-serif;
}

body {
    background-color: #2a1a5e; /* Deep purple background for the header area */
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile app constraint */
    background-color: #f4f5f7;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Header */
.top-header {
    background-color: #2a1a5e;
    color: white;
    padding: 24px 20px 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header h1 {
    font-size: 20px;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    background-color: #f4f5f7;
    border-radius: 16px 16px 0 0;
    margin-top: -16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Asset Cards (Pocket & Main Card) */
.asset-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a1a1a;
    font-size: 12pt;
}

.asset-balance {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.asset-currency {
    font-size: 14px;
    font-weight: 500;
}

.asset-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: white;
    font-size: 12pt;
}

.btn-transfer-pocket { background-color: #ff9800; }
.btn-transfer-card { background-color: #667eea; }
.btn-receive { background-color: #d1d5db; color: white; }

/* Savings Grid */
.savings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.saving-card {
    border-radius: 12px;
    padding: 16px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.saving-card.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.saving-card.pink { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); }

.saving-title { font-size: 12px; margin-bottom: 4px; opacity: 0.9; }
.saving-amount { font-size: 20px; font-weight: 700; }
.saving-goal { font-size: 11px; opacity: 0.8; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.nav-item {
    color: #b0b0b0;
    cursor: pointer;
}
.nav-item.active { color: #667eea; }
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.modal-close { font-size: 28px; cursor: pointer; color: #888; line-height: 1; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: #1a1a1a; }
.form-group input[type="text"], .form-group input[type="number"], .form-group select {
    width: 100%; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-family: inherit; font-size: 15px;
}
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input { width: 18px; height: 18px; cursor: pointer; }
.checkbox-group label { margin-bottom: 0; cursor: pointer; }

.btn-primary {
    background: #667eea; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s;
}

/* --- Floating Action Button (FAB) --- */
.fab-wrapper {
    position: fixed;
    bottom: 90px; /* Располагаем прямо над нижним меню */
    right: 20px;
    z-index: 100;
    width: 56px;
    height: 56px;
}

.fab-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #000;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-btn svg {
    transition: transform 0.3s ease;
}

/* Gray background bubble */
.fab-menu-bg {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background-color: #d8d9dc;
    border-radius: 24px;
    /* Хитрые отступы: оставляем место справа снизу для черной кнопки */
    padding: 25px 85px 25px 25px; 
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transform-origin: bottom right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1;
}

/* Active State (When Opened) */
.fab-wrapper.active .fab-menu-bg {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.fab-wrapper.active .fab-btn {
    transform: rotate(45deg); /* Плюс превращается в крестик (X) */
}

.fab-menu-item {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    margin-bottom: 16px;
    white-space: nowrap;
}

.fab-menu-item:last-child {
    margin-bottom: 0;
}