
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #0c0d14;
    --surface: #151722;
    --surface-light: #1c1f2d;
    --border: #292d3d;
    --text: #f2f3fa;
    --muted: #9298ad;
    --purple: #8055e8;
    --blue: #4385ed;
    --green: #39c98a;
    --red: #f06472;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 75px;
    padding: 0 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--purple);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
}

main {
    width: 86%;
    max-width: 1400px;
    margin: 45px auto;
    flex: 1;
}

.hidden {
    display: none !important;
}

/* LOGOWANIE */

.login-section {
    min-height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.login-box h1 {
    font-size: 27px;
    margin-bottom: 10px;
}

.login-box > p {
    color: var(--muted);
    margin-bottom: 30px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-size: 14px;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 14px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    margin-bottom: 10px;
}

input:focus {
    border-color: var(--purple);
}
/* CHECKBOX NIE WYLOGOWUJ MNIE */

.remember-me {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: fit-content;
    margin-top: 2px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    margin: 0;
    accent-color: var(--purple);
    cursor: pointer;
}

.remember-me span {
    line-height: 1.4;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 13px 20px;
    font-weight: 700;
}

.primary-button {
    background: linear-gradient(110deg, var(--purple), var(--blue));
    color: white;
    margin-top: 10px;
}

.primary-button:hover {
    opacity: 0.9;
}

#login-message {
    font-size: 14px;
    color: var(--red);
}

/* PANEL GRACZA */

.dashboard-heading {
    margin-bottom: 30px;
}

.dashboard-heading h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.dashboard-heading p {
    color: var(--muted);
}

/* FILTR DATY */

.filter-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-container label {
    font-size: 14px;
    color: var(--muted);
}

.filter-container select,
.filter-container input[type="date"] {
    width: auto;
    min-width: 180px;
    padding: 10px 13px;
    margin: 0;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.filter-container select:focus,
.filter-container input[type="date"]:focus {
    border-color: var(--purple);
}

.filter-container input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
}

/* KAFELKI STATYSTYK */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 25px;
    transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.stat-card p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.stat-card h2 {
    font-size: 26px;
    font-weight: 700;
}

#income-value {
    color: var(--green);
}

#expenses-value {
    color: var(--red);
}

/* SEKCJE HISTORII */

.history-section {
    margin-top: 35px;
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.history-section h2 {
    font-size: 20px;
    margin-bottom: 22px;
}

/* ZESTAWIENIE ZAROBKÓW WEDŁUG DNI */

.daily-summary-section {
    overflow: hidden;
}

.daily-summary-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.daily-summary-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
}

.daily-summary-table thead {
    background: var(--surface-light);
}

.daily-summary-table th {
    padding: 16px 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.daily-summary-table th:first-child {
    text-align: left;
}

.daily-summary-table td {
    padding: 15px 14px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

.daily-summary-table td:first-child {
    text-align: left;
    color: var(--text);
    font-weight: 700;
}

.daily-summary-table tbody tr {
    transition: background 0.15s;
}

.daily-summary-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}

.daily-summary-table tbody tr:hover {
    background: rgba(128, 85, 232, 0.10);
}

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

.daily-summary-table td.event-income {
    color: var(--green);
    font-weight: 700;
}

.daily-summary-table td.event-expense {
    color: var(--red);
    font-weight: 700;
}

/* OSTATNIE ZDARZENIA */

#events-list {
    color: var(--muted);
}

.event-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.event-row:last-child {
    border-bottom: none;
}

.event-name {
    color: var(--text);
}

.event-amount {
    font-weight: 700;
    white-space: nowrap;
}

.event-income {
    color: var(--green);
}

.event-expense {
    color: var(--red);
}

/* STOPKA */

footer {
    padding: 25px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* KLIKALNE KAFELKI */

.stat-card-clickable {
    cursor: pointer;
    position: relative;
}

.stat-card-clickable::after {
    content: "Zobacz szczegóły →";
    display: block;
    margin-top: 15px;
    color: var(--purple);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.stat-card-clickable:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}

/* NAGŁÓWEK SZCZEGÓŁÓW */

.details-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.details-heading h2 {
    margin-bottom: 0;
}

#close-details {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

#close-details:hover {
    border-color: var(--purple);
}

/* SZCZEGÓŁY ZDARZEŃ */

#details-list .event-row {
    padding: 18px 0;
}

#details-list .event-name {
    font-weight: 600;
}

#details-list .event-amount {
    font-size: 15px;
}

/* TELEFONY I MNIEJSZE EKRANY */

@media (max-width: 800px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    main {
        width: 92%;
    }

    .topbar {
        padding: 0 4%;
    }
}

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

    .login-box {
        padding: 25px;
    }

    .dashboard-heading h1 {
        font-size: 25px;
    }

    .history-section {
        padding: 18px;
    }

    .daily-summary-table {
        min-width: 850px;
    }

    .filter-container {
        align-items: flex-start;
    }

    .filter-container select,
    .filter-container input[type="date"] {
        width: 100%;
    }

    .details-heading {
        align-items: flex-start;
    }

    .details-heading h2 {
        font-size: 18px;
    }
}

/* WYKRES DZIENNEGO BILANSU */

.chart-section {
    overflow: hidden;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: -8px;
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 13px;
}

.chart-legend > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.chart-legend-positive {
    background: var(--green);
}

.chart-legend-negative {
    background: var(--red);
}

.daily-balance-chart {
    width: 100%;
    min-height: 260px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px 5px;
}

.daily-balance-chart > p {
    color: var(--muted);
    text-align: center;
    padding: 70px 0;
}

.chart-bars {
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-width: 100%;
    width: max-content;
    height: 245px;
}

.chart-column {
    width: 65px;
    min-width: 65px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-bar-area {
    width: 100%;
    height: 205px;
    position: relative;
}

.chart-baseline {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--muted);
    opacity: 0.45;
}

.chart-bar {
    position: absolute;
    left: 12px;
    right: 12px;
    min-height: 3px;
    border-radius: 5px;
    cursor: pointer;
    transition: filter 0.2s, opacity 0.2s;
}

.chart-bar:hover {
    filter: brightness(1.3);
    opacity: 1;
    z-index: 2;
}

.chart-bar-positive {
    background: linear-gradient(
        180deg,
        #39c98a,
        #23875e
    );
    box-shadow: 0 0 12px rgba(57, 201, 138, 0.15);
}

.chart-bar-negative {
    background: linear-gradient(
        180deg,
        #f06472,
        #a83e4c
    );
    box-shadow: 0 0 12px rgba(240, 100, 114, 0.15);
}

.chart-bar-zero {
    background: var(--muted);
}

.chart-date {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 500px) {
    .chart-section {
        padding: 18px;
    }

    .chart-bars {
        gap: 8px;
    }

    .chart-column {
        width: 55px;
        min-width: 55px;
    }

    .chart-bar {
        left: 10px;
        right: 10px;
    }
}

/* WYKRES PRZYCHODÓW I WYDATKÓW */

.chart-bar-income {
    background: linear-gradient(
        180deg,
        #39c98a,
        #23875e
    );
    box-shadow: 0 0 12px rgba(57, 201, 138, 0.15);
}

.chart-bar-expenses {
    background: linear-gradient(
        180deg,
        #f06472,
        #a83e4c
    );
    box-shadow: 0 0 12px rgba(240, 100, 114, 0.15);
}

/* DWA SŁUPKI OBOK SIEBIE */

#income-expenses-chart .chart-bar {
    left: auto;
    right: auto;
    width: 15px;
}

#income-expenses-chart .chart-bar-income {
    left: 13px;
}

#income-expenses-chart .chart-bar-expenses {
    left: 36px;
}

@media (max-width: 500px) {
    #income-expenses-chart .chart-bar-income {
        left: 9px;
    }

    #income-expenses-chart .chart-bar-expenses {
        left: 29px;
    }
}

/* =========================================
   PANEL ADMINISTRATORA
========================================= */

.dashboard-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.navigation-button {
    background: var(--surface-light);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.navigation-button:hover {
    color: var(--text);
    border-color: var(--purple);
    background: #242237;
}

.navigation-button.active {
    color: white;
    background: linear-gradient(120deg, var(--purple), var(--blue));
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(128, 85, 232, 0.2);
}

#admin-panel {
    animation: adminFadeIn 0.25s ease;
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#admin-panel h1 {
    color: var(--text);
    font-size: 30px;
    margin-bottom: 8px;
}

#admin-panel h2 {
    color: var(--text);
    font-size: 20px;
    margin-bottom: 12px;
}

#admin-panel p {
    color: var(--muted);
    line-height: 1.6;
}

/* Karty statystyk */

#admin-panel .stats-grid {
    margin-top: 28px;
    margin-bottom: 36px;
}

#admin-panel .stat-card {
    background: linear-gradient(145deg, var(--surface), #181a27);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 24px;
    transition: 0.2s ease;
}

#admin-panel .stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(128, 85, 232, 0.55);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

/* Sekcja użytkowników */

#admin-panel .history-section,
#admin-panel .admin-users-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px;
    margin-top: 30px;
}

.admin-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 22px;
}

#admin-search {
    flex: 1;
    min-width: 220px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 15px;
    outline: none;
    font-size: 14px;
}

#admin-search:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(128, 85, 232, 0.12);
}

#admin-panel button {
    font-family: inherit;
}

#admin-refresh-button,
#admin-search-button,
#admin-clear-search {
    padding: 12px 18px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

#admin-search-button {
    background: linear-gradient(120deg, var(--purple), var(--blue));
    border: none;
    color: white;
}

#admin-refresh-button:hover,
#admin-clear-search:hover {
    border-color: var(--purple);
    background: #242237;
}

#admin-search-button:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* Tabela użytkowników */

.admin-users-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

#admin-panel table,
.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    text-align: left;
}

#admin-panel th,
#admin-panel td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

#admin-panel th {
    background: var(--surface-light);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

#admin-panel td {
    color: var(--text);
    font-size: 14px;
}

#admin-panel tbody tr {
    transition: background 0.2s ease;
}

#admin-panel tbody tr:hover {
    background: rgba(128, 85, 232, 0.06);
}

#admin-panel tbody tr:last-child td {
    border-bottom: none;
}

/* Komunikaty */

#admin-message {
    padding: 12px 15px;
    margin: 14px 0;
    border-radius: 9px;
    font-size: 13px;
}

/* Responsywność */

@media (max-width: 700px) {
    .dashboard-navigation {
        flex-wrap: wrap;
    }

    .navigation-button {
        flex: 1;
        padding: 12px;
    }

    #admin-panel h1 {
        font-size: 25px;
    }

    #admin-panel .history-section,
    #admin-panel .admin-users-section {
        padding: 16px;
    }

    .admin-search-container {
        flex-direction: column;
    }

    #admin-search {
        width: 100%;
    }
}

/* PROFIL STATYSTYCZNY GRACZA */

.stats-action-button {
    background: linear-gradient(120deg, #8055e8, #4267db) !important;
    color: white !important;
    border: none !important;
}

.stats-action-button:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.admin-stats-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-stats-modal {
    width: 100%;
    max-width: 1050px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.admin-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-stats-header h2 {
    color: var(--text);
    font-size: 24px;
}

.admin-stats-header p {
    color: var(--muted);
    margin-top: 6px;
}

#close-admin-stats {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--text);
    cursor: pointer;
    font-size: 17px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.admin-stats-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 20px;
}

.admin-stats-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.admin-stats-card strong {
    color: var(--text);
    font-size: 22px;
    overflow-wrap: anywhere;
}

.admin-stats-card.money strong {
    color: #43d69b;
}

.admin-stats-section {
    margin-top: 32px;
}

.admin-stats-section h3 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 18px;
}

.admin-stats-section > p {
    color: var(--muted);
}

.admin-stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.admin-stats-section {
    overflow-x: auto;
}

.admin-stats-table th,
.admin-stats-table td {
    padding: 13px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
}

.admin-stats-table th {
    background: var(--surface-light);
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
}

@media (max-width: 650px) {
    .admin-stats-modal {
        padding: 18px;
    }

    .admin-stats-header h2 {
        font-size: 19px;
    }

    .admin-stats-card strong {
        font-size: 18px;
    }
}

/* ======================================================
   HISTORIA ZDARZEŃ - NOWY WYGLĄD
====================================================== */

.admin-event-history {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.admin-event-history h3 {
    margin-bottom: 20px;
    font-size: 19px;
    font-weight: 700;
}

/* FILTRY */

.admin-event-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
    padding: 18px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 18px;
}

.admin-event-filters > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.admin-event-filters label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-event-filters select,
.admin-event-filters input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    color: var(--text);
    background: #10121c;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color-scheme: dark;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-event-filters select:focus,
.admin-event-filters input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(128, 85, 232, 0.15);
}

.admin-event-filters select option {
    color: var(--text);
    background: var(--surface);
}

/* PRZYCISKI FILTROWANIA */

.admin-event-filter-buttons {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    margin-top: 2px;
}

.admin-event-filter-buttons button,
.history-pagination button {
    min-height: 40px;
    padding: 0 20px;
    color: white;
    background: var(--purple);
    border: 1px solid var(--purple);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.admin-event-filter-buttons button:hover,
.history-pagination button:hover {
    background: #946ff0;
    border-color: #946ff0;
    transform: translateY(-1px);
}

.admin-event-filter-buttons button:last-child {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.admin-event-filter-buttons button:last-child:hover {
    background: var(--surface-light);
    border-color: var(--purple);
}

/* INFORMACJA O WYNIKACH */

.history-results-info {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin-bottom: 12px;
    padding: 0 14px;
    color: var(--muted);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

/* LISTA ZDARZEŃ */

.history-events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-empty {
    padding: 28px 16px;
    color: var(--muted);
    background: var(--surface-light);
    border: 1px dashed var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
}

/* POJEDYNCZE ZDARZENIE */

.admin-history-event {
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.admin-history-event:hover {
    border-color: rgba(128, 85, 232, 0.55);
    background: #202333;
}

.admin-history-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-history-event-header > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.admin-history-event-header strong {
    color: var(--text);
    font-size: 14px;
}

.admin-history-event-header small {
    color: var(--muted);
    font-size: 12px;
}

.admin-history-event-header > strong {
    white-space: nowrap;
    font-size: 15px;
}

.admin-history-toggle {
    margin-top: 12px;
    padding: 7px 11px;
    color: #b69aff;
    background: rgba(128, 85, 232, 0.10);
    border: 1px solid rgba(128, 85, 232, 0.25);
    border-radius: 7px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.admin-history-toggle:hover {
    color: white;
    background: rgba(128, 85, 232, 0.25);
}

.admin-history-extra {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.admin-history-extra.hidden {
    display: none;
}

/* SZCZEGÓŁY ZDARZENIA */

.admin-history-event-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.admin-history-value {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px;
    background: #11131e;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-history-value span {
    color: var(--muted);
    font-size: 11px;
}

.admin-history-value strong {
    color: var(--text);
    font-size: 14px;
}

.admin-history-raw {
    padding: 12px;
    background: #11131e;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-history-raw strong {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

.admin-history-raw p {
    color: var(--text);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* PAGINACJA */

.history-pagination {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.history-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* RESPONSYWNOŚĆ */

@media (max-width: 700px) {
    .admin-event-filters {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .admin-event-filter-buttons {
        grid-column: auto;
    }

    .admin-event-filter-buttons button {
        flex: 1;
    }

    .admin-history-event-details {
        grid-template-columns: 1fr;
    }

    .admin-history-event-header {
        align-items: flex-start;
    }
}
