/* dashboard.css - Shared styles for Overview, Export, Import, Tools, Explorer */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', sans-serif;
    background: #f4f7fb;
    color: #1A2C3E;
    line-height: 1.5;
}

:root {
    --deep-teal: #05668d;
    --mid-teal: #028090;
    --mint: #02c39a;
    --soft-cream: #f0f3bd;
    --accent-green: #00a896;
    --dark-slate: #1e2f3e;
    --border-light: #e2edf2;
    --sidebar-width: 260px;
    --header-height: 70px;
    --text-light: #5a7c8c;
    --text-dark: #1e2f3e;
}

/*!COMMON FLEX CONFIGS*/
.flexwrap {
    flex-wrap: wrap;
}

.flexrow {
    display: flex;
    flex-direction: row;
}

.frvc {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.flexcolumn {
    display: flex;
    flex-direction: column;
}

.horizontalcenter {
    justify-content: center;
}

.verticalcenter {
    align-items: center;
}

.vhcenter, .fab {
    justify-content: center;
    align-items: center;
}

.spacebetween {
    justify-content: space-between;
    width: 100%;
}

.sb {
    align-content: space-between;
    width: 100%;
}

.frspvc {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0a2a34 0%, #0a2a34 100%);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #1f5564;
    margin-bottom: 24px;
}

.sidebar-logo-img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.sidebar-nav {
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 12px;
    color: #bdd3db;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item .material-symbols-outlined {
    font-size: 1.4rem;
}

.nav-item:hover {
    background: rgba(2,195,154,0.15);
    color: var(--mint);
}

.nav-item.active {
    background: var(--mint);
    color: #0a2b2f;
}

.nav-item.active .material-symbols-outlined {
    color: #0a2b2f;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.top-header {
    background: white;
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 99;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-teal);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a2b2f;
}

.user-name {
    font-weight: 600;
    color: var(--deep-teal);
}

.content-area {
    padding: 32px;
}

/* Card Component */
.card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--deep-teal);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--deep-teal);
    margin: 8px 0;
}

.stat-label {
    color: #5a7c8c;
    font-size: 0.85rem;
    font-weight: 500;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-light);
    color: var(--deep-teal);
    font-weight: 600;
}

.data-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-light);
    color: #2c4b5e;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #e0f7e8;
    color: var(--accent-green);
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-info {
    background: #e0f2fe;
    color: #0284c7;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    font-family: 'Google Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--mint);
    color: #0a2b2f;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--mid-teal);
    color: var(--deep-teal);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--mint);
    border-radius: 4px;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

/* DPA Footer */
.dpa-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.7rem;
    color: #6b7280;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/*!CHARTS*/
.canvas {
    width: 100%;
    height: 350px;
    padding: 4px 0;
}

/*!TABLES*/
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.geographic-table td {
    width: 33.3%;
}

/*!ACCOUNTS*/
/*! account page - additional styles for main CSS */

/*! form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-teal);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

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

/*! info row for account page */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

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

/*! danger button */
.btn-danger {
    background: transparent;
    border: 1.5px solid #e63946;
    color: #e63946;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Google Sans', 'Inter', sans-serif;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #e63946;
    color: white;
}

/*!EXPLORER*/
/*! explorer page - compound metrics */
.filter-bar {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    padding: 24px;
    margin-bottom: 24px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-teal);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--deep-teal);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--mint);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.results-section {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

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

.results-count {
    font-weight: 600;
    color: var(--deep-teal);
}

.compound-query {
    font-size: 0.8rem;
    color: var(--text-light);
    font-family: monospace;
    background: var(--soft-cream);
    padding: 8px 12px;
    border-radius: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    text-align: left;
    padding: 14px 16px;
    background: #f8fafc;
    color: var(--deep-teal);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-light);
}

.results-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-dark);
}

.no-results {
    padding: 48px;
    text-align: center;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/*! responsive for account page */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
    }
    .main-content {
        margin-left: 0;
    }
    .two-column {
        grid-template-columns: 1fr;
    }
}
