:root {
    --bg-primary: rgba(255, 255, 255, 0.1);
    --bg-secondary: rgba(255, 255, 255, 0.2);
    --text-primary: #333;
    --text-secondary: #666;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border: 1px solid rgba(0, 0, 0, 0.1);
    --btn-text: #333;
    --btn-bg: rgba(255, 255, 255, 0.8);
    --btn-hover-bg: rgba(255, 255, 255, 0.9);
    --last-update-text: #666;
}
.dark-theme {
    --bg-primary: rgba(0, 0, 0, 0.2);
    --bg-secondary: rgba(0, 0, 0, 0.3);
    --text-primary: #fff;
    --text-secondary: #ccc;
    --card-bg: rgba(30, 30, 30, 0.9);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border: 1px solid rgba(255, 255, 255, 0.1);
    --btn-text: #fff;
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-hover-bg: rgba(255, 255, 255, 0.2);
    --last-update-text: #ccc;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f9fcff;
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    color: var(--text-primary);
}
body.dark-theme {
    background: #000000;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
.header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: var(--border);
    color: var(--text-primary);
    flex-wrap: nowrap;
    gap: 15px;
    overflow: visible;
    position: relative;
    z-index: 100;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.header-icon svg {
    width: 48px;
    height: 48px;
}
.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background: var(--btn-bg);
    backdrop-filter: blur(10px);
    color: var(--btn-text);
    border: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}
.btn:hover {
    background: var(--btn-hover-bg);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
#themeBtn {
    border-radius: 8px;
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    width: 100%;
    box-shadow: var(--shadow);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
    border: var(--border);
}
.dropdown-content.show {
    display: block;
}
.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}
.dropdown-content a:hover {
    background: var(--bg-secondary);
}
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: var(--border);
    color: var(--text-primary);
}
.card:hover {
    transform: translateY(-5px);
}
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}
.account-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
}
.account-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}
.status-good {
    background: rgba(46, 125, 50, 0.2);
    color: #2e7d32;
}
.status-warning {
    background: rgba(245, 124, 0, 0.2);
    color: #f57c00;
}
.status-danger {
    background: rgba(198, 40, 40, 0.2);
    color: #c62828;
}
.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.metric {
    text-align: center;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: var(--border);
}
.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary);
}
.progress-section {
    margin-top: 20px;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.progress-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.progress-percent {
    font-weight: bold;
    color: var(--text-primary);
}
.progress-bar {
    height: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.5s ease;
}
.summary-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: var(--border);
    color: var(--text-primary);
}
.summary-card h2 {
    text-align: center;
    margin-bottom: 20px;
}
.summary-stats-row {
    display: flex;
    width: 100%;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: space-between;
}
.summary-stat-item {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 20px 10px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: var(--border);
}
.summary-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.summary-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}
.summary-remaining {
    text-align: center;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: var(--border);
    max-width: 400px;
    margin: 0 auto;
}
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}
.error {
    background: rgba(198, 40, 40, 0.2);
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid rgba(198, 40, 40, 0.3);
}
.last-update {
    text-align: center;
    color: var(--last-update-text);
    margin-top: 20px;
    font-size: 0.9rem;
}
.refresh-progress {
    margin: 10px 0;
    text-align: center;
    color: var(--text-primary);
}
.progress-text {
    margin-bottom: 5px;
    font-size: 0.9rem;
}
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s ease;
}
@media (max-width: 768px) {
    .header-card {
        padding: 15px 15px;
        gap: 8px;
    }
    .header-left {
        gap: 10px;
    }
    .header-icon svg {
        width: 32px;
        height: 32px;
    }
    .header-item {
        font-size: 1rem;
    }
    .header-right {
        gap: 6px;
    }
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    #themeBtn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        border-radius: 6px;
    }
    .summary-stats-row {
        gap: 8px;
    }
    .summary-stat-item {
        padding: 12px 4px;
    }
    .summary-stat-value {
        font-size: 1.3rem;
    }
    .dashboard {
        grid-template-columns: 1fr;
    }
    .metric-grid {
        gap: 8px;
    }
    .metric {
        padding: 10px 6px;
    }
    .metric-label {
        font-size: 0.7rem;
        gap: 3px;
    }
    .metric-value {
        font-size: 1.2rem;
    }
    .metric-label svg {
        width: 12px;
        height: 12px;
    }
}
