/* Reset & base */
* { box-sizing: border-box; margin:0; padding:0; }
body { font-family: 'Inter', -apple-system, system-ui, sans-serif; background: #f5f3ef; color: #1a1a1a; }

/* Layout */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: #1a1a1a;
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .brand { padding: 0 20px 24px; font-size: 20px; font-weight: 600; }
.sidebar .brand span { color: #c08a3e; }
.sidebar nav a {
    display: block;
    padding: 12px 20px;
    color: #aaa;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: #c08a3e;
}
.main-content { flex: 1; padding: 24px 32px; }
.page-title { font-size: 24px; font-weight: 600; margin-bottom: 20px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 16px 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-left: 4px solid #c08a3e; }
.stat-card .number { font-size: 28px; font-weight: 700; }
.stat-card .label { color: #666; font-size: 14px; }

/* Tables */
.table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow-x: auto; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 14px 8px; border-bottom: 2px solid #eee; font-weight: 600; color: #444; }
td { padding: 12px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* Buttons & forms */
.btn { display: inline-block; padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 500; border: none; cursor: pointer; background: #c08a3e; color: #fff; transition: background 0.2s; }
.btn:hover { background: #a0732e; }
.btn-danger { background: #b4573f; }
.btn-danger:hover { background: #943a2a; }
.btn-outline { background: transparent; border: 1px solid #c08a3e; color: #c08a3e; }
.btn-outline:hover { background: #c08a3e; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* Modals */
.modal-overlay {
    position: fixed; inset:0; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff; padding: 28px; border-radius: 8px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 20px; margin-bottom: 16px; }
.modal .close { float: right; background: none; border: none; font-size: 24px; cursor: pointer; color: #999; }
.modal .form-group { margin-bottom: 16px; }
.modal .form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 14px; }
.modal .form-group input, .modal .form-group select, .modal .form-group textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;
}
.modal .form-group input:focus, .modal .form-group select:focus, .modal .form-group textarea:focus {
    border-color: #c08a3e; outline: none; box-shadow: 0 0 0 2px rgba(192,138,62,0.2);
}

/* Toast */
.toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999;
}
.toast {
    background: #1a1a1a; color: #fff; padding: 12px 20px; border-radius: 4px; margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); min-width: 200px;
}
.toast-success { border-left: 4px solid #27ae60; }
.toast-error { border-left: 4px solid #b4573f; }

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #1a1a1a;
    margin: 0;
}
.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.login-container h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a1a1a;
}
.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.login-container button {
    width: 100%;
    padding: 12px;
    background: #c08a3e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}
.login-container button:hover {
    background: #a0732e;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}