:root {
    --bg: #0f1117;
    --panel: #171a23;
    --panel-2: #1e2230;
    --border: #2b3040;
    --text: #f5f7fb;
    --muted: #aab2c5;
    --primary: #00b894;
    --primary-hover: #00a383;
    --danger: #d63031;
    --danger-hover: #bd292a;
    --discord: #5865f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top, #1d2433, var(--bg));
    color: var(--text);
    min-height: 100vh;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(440px, 100%);
    background: rgba(23, 26, 35, 0.95);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.logo {
    font-size: 54px;
    margin-bottom: 12px;
}

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

.login-card p {
    color: var(--muted);
    margin-bottom: 28px;
}

.discord-login {
    display: inline-block;
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    color: white;
    background: var(--discord);
    text-decoration: none;
    font-weight: 700;
}

.topbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

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

.topbar p {
    margin: 0;
    color: var(--muted);
}

.logout {
    color: white;
    background: var(--panel-2);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.panel {
    background: rgba(23, 26, 35, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.panel-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 16px;
}

.panel h2 {
    margin: 0;
}

.panel p {
    margin: 4px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.sale-grid {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
}

.buyer-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    max-width: 520px;
}

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

input {
    width: 100%;
    margin-top: 6px;
    background: #252a38;
    color: var(--text);
    border: 1px solid #343a4f;
    border-radius: 10px;
    padding: 10px 11px;
    outline: none;
}

input:focus {
    border-color: var(--primary);
}

button {
    padding: 9px 12px;
    border-radius: 10px;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.primary {
    background: var(--primary);
}

.primary:hover {
    background: var(--primary-hover);
}

.danger,
.del {
    background: var(--danger);
}

.danger:hover,
.del:hover {
    background: var(--danger-hover);
}

.secondary {
    background: #3b4258;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    border: 1px solid var(--border);
    padding: 9px;
    text-align: center;
    vertical-align: middle;
}

th {
    background: #202637;
    color: #dce3f7;
}

td {
    background: rgba(15, 17, 23, 0.35);
}

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.actions-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    color: var(--muted);
    margin-left: 6px;
}

.V {
    color: #00ff88;
    font-weight: bold;
}

.I {
    color: #3498db;
    font-weight: bold;
}

.N {
    color: #f39c12;
    font-weight: bold;
}

.B {
    color: #9b59b6;
    font-weight: bold;
}

@media (max-width: 1100px) {
    .sale-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 700px) {
    .topbar,
    .panel-title {
        align-items: stretch;
        flex-direction: column;
    }

    .sale-grid,
    .buyer-grid {
        grid-template-columns: 1fr;
    }
}
