/* Variables Admin */
:root {
    --admin-primary: #2c3e50;
    --admin-secondary: #34495e;
    --admin-accent: #3498db;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-danger: #e74c3c;
    --admin-bg: #ecf0f1;
    --admin-sidebar: #2c3e50;
    --admin-text: #333;
    --admin-border: #bdc3c7;
    --admin-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Reset Admin */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h1 {
    color: var(--admin-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    color: var(--admin-text);
    text-align: center;
    font-size: 1.2rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: var(--admin-sidebar);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h2 {
    font-size: 1.3rem;
    font-weight: 500;
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 3px solid var(--admin-accent);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 250px;
}

.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--admin-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: var(--admin-danger);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #c0392b;
}

.admin-content {
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--admin-text);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
    color: var(--admin-primary);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--admin-text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-checkboxes {
    margin: 1.5rem 0;
}

.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tables */
.data-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--admin-shadow);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th {
    background: var(--admin-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 500;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
    height: 92px;
    box-sizing: border-box;
}

.data-table tbody tr {
    height: 92px;
}

.data-table tr:hover {
    background: var(--admin-bg);
}

.table-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-height: 60px;
}

.btn-edit,
.btn-delete {
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-edit {
    background: var(--admin-accent);
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: var(--admin-danger);
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--admin-accent);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: var(--admin-text);
    color: white;
}

.btn-secondary:hover {
    background: #2c3e50;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.badge-sold {
    background: var(--admin-danger);
    color: white;
}

.badge-available {
    background: var(--admin-success);
    color: white;
}

.badge-hidden {
    background: var(--admin-text);
    color: white;
}

.badge-featured {
    background: var(--admin-warning);
    color: white;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* No Data */
.no-data {
    background: white;
    padding: 3rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--admin-shadow);
}

.no-data p {
    margin-bottom: 1.5rem;
    color: var(--admin-text);
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main {
        margin-left: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}