:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --dark-sidebar: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #334155;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--dark-sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0; top: 0;
    border-right: 1px solid #1e293b;
}

.sidebar-header {
    padding: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 10px;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 14px 10px;
    font-weight: 600;
    color: #475569;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--sidebar-text);
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.sidebar-nav a:hover {
    background-color: #1e293b;
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #1e293b;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    width: 100%;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* --- CARDS & FORMS --- */
.admin-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
}

input[type="text"], 
input[type="password"], 
input[type="email"], 
textarea, 
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.btn-primary:hover { background-color: var(--primary-hover); }

.btn-danger {
    background-color: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    cursor: pointer;
}

.btn-danger:hover { background-color: #fef2f2; }

/* --- COMPONENTS --- */
.img-preview {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px;
    background: #f8fafc;
}

.sortable-item {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: box-shadow 0.2s;
}

.sortable-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.drag-handle {
    cursor: grab;
    color: #94a3b8;
    padding: 5px;
}

/* Grid Helper */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Sub-card styling for complex items */
.sub-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}