:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --accent: #1a73e8;
    --accent-hover: #1557b0;
    --border: #dadce0;
    --success: #1e8e3e;
    --danger: #d93025;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #202124;
        --card-bg: #292a2d;
        --text-primary: #e8eaed;
        --text-secondary: #9aa0a6;
        --accent: #8ab4f8;
        --accent-hover: #aecbfa;
        --border: #3c4043;
        --success: #81c995;
        --danger: #f28b82;
    }
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

h1 {
    margin: 0;
    font-size: 24px;
}

.user-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    text-align: center;
}

.login-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

/* Filters (Admin) */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    flex-wrap: wrap;
}

input,
select,
button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-primary);
}

button {
    cursor: pointer;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 500;
}

button:hover {
    background: var(--accent-hover);
}

/* Data Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Item Grid (User) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.card-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.timestamp {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.badge-green {
    background: #e6f4ea;
    color: #137333;
}

.badge-red {
    background: #fce8e6;
    color: #c5221f;
}