* * {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #070b16;
    color: #f8fafc;
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a, #020617);
    padding: 28px 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 40px;
}

.logo span {
    color: #a78bfa;
    letter-spacing: 3px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

nav a {
    padding: 14px 16px;
    border-radius: 14px;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
}

nav a.active,
nav a:hover {
    background: rgba(139, 92, 246, 0.18);
    color: white;
}

/* LAYOUT GLOBAL */

.main {
    flex: 1;
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
}

.topbar h1 {
    margin: 0;
    font-size: 34px;
}

.topbar p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.topbar button {
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: bold;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card,
.panel {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.card p {
    color: #94a3b8;
    margin: 0;
}

.card h2 {
    font-size: 36px;
    margin: 14px 0;
}

.card span {
    color: #64748b;
    font-size: 14px;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.panel.large {
    min-height: 300px;
}

.panel h3 {
    margin-top: 0;
}

.empty {
    color: #64748b;
}

.placeholder {
    min-height: 420px;
}

.coming-soon {
    margin-top: 60px;
    padding: 40px;
    border-radius: 22px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.12);
}

.coming-soon span {
    font-size: 46px;
}

.coming-soon h3 {
    font-size: 26px;
    margin-bottom: 8px;
}

.coming-soon p {
    color: #94a3b8;
}

.fake-chart {
    height: 210px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(139,92,246,0.35), rgba(14,165,233,0.12)),
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.04) 41px
        );
}

/* BUTTONS / BADGES / LINKS */

.action {
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border-radius: 14px;
    border: none;
    background: rgba(139,92,246,0.22);
    color: white;
    cursor: pointer;
}

.action.danger {
    background: rgba(239,68,68,0.2);
}

.action.small {
    width: auto;
    padding: 10px 16px;
    margin-top: 0;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.badge.green {
    background: rgba(34,197,94,0.18);
    color: #86efac;
}

.badge.purple {
    background: rgba(139,92,246,0.22);
    color: #c4b5fd;
}

.badge.gray {
    background: rgba(148,163,184,0.15);
    color: #cbd5e1;
}

.badge.red {
    background: rgba(239,68,68,0.18);
    color: #fca5a5;
}

.user-link,
.back-link {
    color: #c4b5fd;
    text-decoration: none;
    font-weight: bold;
}

.user-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-top: 18px;
}

/* TABLES */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-header h2 {
    margin: 0;
}

.section-header p {
    color: #94a3b8;
    margin: 8px 0 0;
}

.table-wrapper {
    overflow-x: auto;
}

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

th {
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

td {
    padding: 15px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e2e8f0;
}

tr:hover {
    background: rgba(255,255,255,0.03);
}

/* SEARCH GLOBAL UTILISATEURS */

.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.search-form input {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 14px 16px;
    border-radius: 14px;
    outline: none;
}

.search-form input:focus {
    border-color: #8b5cf6;
}

.search-form button,
.reset-link {
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.reset-link {
    background: rgba(148,163,184,0.18);
}

/* FICHE UTILISATEUR */

.user-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.user-main-card,
.admin-actions-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: rgba(139,92,246,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.profile-header h2 {
    margin: 0 0 8px;
}

.profile-header p {
    color: #94a3b8;
    margin: 0;
}

.profile-badges {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-actions-card h3 {
    margin-top: 0;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.action-grid form {
    margin: 0;
}

.action-grid .action {
    margin-top: 0;
}

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

.points-form input {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 13px 14px;
    border-radius: 14px;
    outline: none;
}

.points-form input:focus {
    border-color: #8b5cf6;
}

.compact-cards {
    margin-bottom: 24px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.info-list div {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 14px;
}

.info-list span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
}

.info-list strong {
    color: #f8fafc;
    font-size: 15px;
}

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

.history-card {
    min-height: 180px;
}

.history-card h3 {
    margin-top: 0;
}

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

.history-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px;
}

.history-item strong {
    display: block;
    color: #f8fafc;
    margin-bottom: 4px;
}

.history-item span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
}

.history-item small {
    display: block;
    color: #64748b;
    margin-top: 6px;
    font-size: 12px;
}

/* LOGS */

.logs-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.log-tab {
    padding: 13px 22px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    text-decoration: none;
    font-weight: bold;
}

.log-tab.active,
.log-tab:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
}

.logs-toolbar {
    display: grid;
    grid-template-columns: 1fr 2fr auto auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
}

.logs-filter-form {
    display: grid;
    grid-template-columns: 1fr 2fr auto auto;
    gap: 18px;
    align-items: end;
    width: 100%;
}

.logs-filter-form label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 8px;
}

.logs-filter-form input,
.logs-filter-form select {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    outline: none;
}

.logs-filter-form input:focus,
.logs-filter-form select:focus {
    border-color: #8b5cf6;
}

.logs-filter-form button {
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.export-btn {
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

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

.logs-table-panel {
    padding: 0;
    overflow: hidden;
}

.logs-table-header {
    display: flex;
    justify-content: space-between;
    padding: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logs-table-header h3 {
    margin: 0;
}

.logs-table-header span {
    color: #94a3b8;
}

.logs-table {
    width: 100%;
}

.logs-row {
    display: grid;
    grid-template-columns: 180px 120px 1fr;
    gap: 18px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    align-items: center;
}

.logs-row:hover {
    background: rgba(255,255,255,0.03);
}

.logs-head {
    color: #94a3b8;
    font-weight: bold;
    background: rgba(255,255,255,0.025);
}

.log-time {
    color: #94a3b8;
    font-family: monospace;
    font-size: 13px;
}

.log-badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.log-badge.admin {
    background: rgba(139,92,246,0.25);
    color: #c4b5fd;
}

.log-badge.user {
    background: rgba(34,197,94,0.2);
    color: #86efac;
}

.log-message {
    color: #e2e8f0;
    font-family: monospace;
    word-break: break-word;
}

/* POINTS */

.points-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.inline-points-form {
    display: flex;
    gap: 8px;
}

.inline-points-form input {
    width: 120px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15,23,42,0.9);
    color: white;
    outline: none;
}

.inline-points-form button {
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.points-chart-panel {
    min-height: 420px;
}

.points-fake-chart {
    height: 260px;
    display: flex;
    align-items: end;
    gap: 12px;
    margin-top: 30px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.points-fake-chart div {
    flex: 1;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #8b5cf6, #2563eb);
}

/* BOUTIQUE */

.shop-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reward-card {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 16px;
    align-items: center;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 16px;
}

.reward-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(139,92,246,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.reward-card strong {
    display: block;
    margin-bottom: 5px;
}

.reward-card span {
    color: #94a3b8;
    font-size: 14px;
}

.shop-status-card h3 {
    margin-top: 0;
}

.status-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.status-line span {
    color: #94a3b8;
}

.status-line strong {
    color: #f8fafc;
}

.shop-filter-box {
    margin: 22px 0;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

.shop-filter-tabs {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.shop-filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 95px;
    height: 46px;
    padding: 0 20px;
    border-radius: 14px;

    background: linear-gradient(135deg, #2563eb, #7c3aed);

    color: white;
    text-decoration: none;
    font-weight: bold;

    border: none;
}

.shop-filter-tab.active,
.shop-filter-tab:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: transparent;
    color: white;
}

.shop-filter-search {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.shop-filter-search input[type="text"] {
    width: 420px;
    height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    outline: none;
}

.shop-filter-search input[type="text"]:focus {
    border-color: #8b5cf6;
}

.shop-filter-search button {
    height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.shop-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;

    border-radius: 14px;

    background: linear-gradient(135deg, #2563eb, #7c3aed);

    color: white;
    text-decoration: none;
    font-weight: bold;

    border: none;
}

.shop-filter-reset:hover {
    background: rgba(51,65,85,1);
}

/* RESPONSIVE */

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

    .grid,
    .user-hero,
    .details-grid,
    .history-grid,
    .points-grid,
    .shop-grid,
    .logs-filter-form,
    .log-stats {
        grid-template-columns: 1fr;
    }

    .logs-row {
        grid-template-columns: 1fr;
    }

    .inline-points-form {
        flex-direction: column;
    }

    .inline-points-form input {
        width: 100%;
    }

    .reward-card {
        grid-template-columns: 1fr;
    }

    .shop-filter-search input[type="text"] {
        width: 100%;
    }
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1e1b4b, #020617 55%);
}

.login-card {
    width: 420px;
    padding: 36px;
    border-radius: 26px;
    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.login-logo {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 28px;
}

.login-logo span {
    color: #a78bfa;
    letter-spacing: 3px;
}

.login-card h1 {
    margin: 0 0 8px;
}

.login-card p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-card input {
    padding: 15px;
    border-radius: 14px;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    outline: none;
}

.login-card input:focus {
    border-color: #8b5cf6;
}

.login-card button {
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.login-error {
    padding: 12px;
    border-radius: 12px;
    background: rgba(239,68,68,0.16);
    color: #fca5a5;
    margin-bottom: 16px;
}

.vip-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.vip-settings-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.vip-settings-list div {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 16px;
}

.vip-settings-list span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 7px;
}

.vip-settings-list strong {
    color: #f8fafc;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .vip-grid,
    .vip-settings-list {
        grid-template-columns: 1fr;
    }
}

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

.settings-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.settings-list div {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 16px;
}

.settings-list span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 7px;
}

.settings-list strong {
    color: #f8fafc;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .settings-grid,
    .settings-list {
        grid-template-columns: 1fr;
    }
}

.settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.settings-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: bold;
}

.settings-form input,
.settings-form textarea {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    outline: none;
}

.settings-form textarea {
    min-height: 110px;
    resize: vertical;
}

.settings-form input:focus,
.settings-form textarea:focus {
    border-color: #8b5cf6;
}

.settings-form button {
    grid-column: 1 / -1;
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .settings-form {
        grid-template-columns: 1fr;
    }
}
