body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #afafaf;
    color: #333333;
    transition: background-color 0.3s, color 0.3s;
}

.app-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: auto;
    background-color: #ffffff;
}

.table-wrapper {
    overflow-x: auto;
}

.chart-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-grid-item {
    width: 100%;
    height: 320px;
}

.chart-grid-item-tall {
    height: 400px;
}

@media (min-width: 992px) {
    .chart-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        align-items: stretch;
    }
    .chart-grid-item,
    .chart-grid-item-tall {
        height: 400px;
    }
}

:root {
    --chart-us: #FF4040;
    --chart-de: #6565FF;
    --chart-ro: #FFB347;
    --chart-it: #4CAF50;
    --chart-WEB_DESKTOP: #8F8F00;
    --chart-PLAYSTORE: #5555CF;
    --chart-WEB_ANDROID: #0000CF;
    --chart-APPSTORE: #FF4081;
    --chart-WEB_IOS: #CF2041;    
    --chart-tick-color: #000000;
    --chart-title-color: #000000;
    --chart-grid-color: rgba(0, 0, 0, 0.12);
}

.admin-resources-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-resources-panel {
    min-width: 0;
}

@media (min-width: 769px) {
    .admin-resources-grid {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-resources-panel {
        flex: 1 1 0;
    }
}

@media (max-width: 768px) {
    .admin-resources-panel + .admin-resources-panel {
        margin-top: -1px;
    }

    .admin-resources-panel + .admin-resources-panel .admin-resources-table > tr:first-child {
        display: none;
    }
}

.admin-resource-add-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.admin-resource-add-input {
    width: 4.5rem;
    min-width: 4.5rem;
    max-width: 4.5rem;
    flex: 0 0 auto;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.admin-resources-table {
    --bs-table-width: auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.admin-resources-table th {
    white-space: normal;
    width: auto;
}

.admin-resources-table td.admin-resource-value {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.admin-resources-table td:last-child {
    white-space: nowrap;
    vertical-align: middle;
}

@media (min-width: 769px) {
    .admin-resources-table {
        --bs-table-width: 100%;
        width: 100%;
    }

    .admin-resources-table td.admin-resource-value {
        text-align: right;
        width: 1%;
    }

    .admin-resources-table td:last-child {
        text-align: right;
        width: 1%;
    }

    .admin-resource-add-form {
        justify-content: flex-end;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .admin-resources-table td.admin-resource-value {
        white-space: normal;
    }
}

table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    color: #333333;
    min-width: 400px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    white-space: nowrap;
}

th {
    background-color: #f2f2f2;
    white-space: normal;
}

td p {
    margin: 0;
}

h1 {
    color: #333;
}

@media (max-width: 768px) {
    .app-content {
        padding: 10px;
    }

    .main-wrapper {
        padding: 10px;
        min-height: auto;
    }

    h1 {
        font-size: 1.5em;
    }

    th, td {
        padding: 4px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    th, td {
        padding: 4px;
        font-size: 0.8em;
    }

    h1 {
        font-size: 1.3em;
    }
}

[data-bs-theme="dark"] {
    --chart-new-users: #4CAF50;
    --chart-users: #1B5E20;
    --chart-sessions: #1565C0;
    --chart-gameplays: #FF9800;
    --chart-ad-revenue: #8e44ad;
    --chart-payment-revenue: #009688;
    --chart-tick-color: #c0c0c0;
    --chart-title-color: #ffffff;
    --chart-grid-color: rgba(255, 255, 255, 0.12);

    body {
        background-color: #131313;
        color: #e8e8e8 !important;
    }

    .main-wrapper {
        background-color: #131313;
    }

    table {
        background-color: #161616;
        color: #e8e8e8 !important;
    }

    th {
        background-color: #161616;
        color: #f5f5f5 !important;
    }

    td {
        border-color: #444444;        
        color: #c0c0c0 !important;
    }

        .list-group-item {
        background-color: transparent !important;
    }

    h1 {
        color: #f5f5f5 !important;
    }
}

.no-border {
    border: none;
    border-collapse: collapse;
}

.no-border td {
    border: none;
}
.no-border th {
    border: none;
}

.big-bold-number {
    font-size: 1.05em;
    font-weight: bold;
}
