/* Sunday Funday - Admin Panel Styles */

:root {
    --primary-color: #D32F2F;
    --secondary-color: #F57C00;
    --accent-color: #388E3C;
    --dark-color: #5D4037;
    --light-color: #FFF8E1;
    --success-color: #388E3C;
    --danger-color: #C62828;
    --warning-color: #F57C00;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
}

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

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #B71C1C;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #2E7D32;
}

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

.btn-danger:hover {
    background: #B71C1C;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Admin Dashboard */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.8rem;
}

.admin-nav {
    display: flex;
    gap: 1rem;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab {
    padding: 1rem 2rem;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    color: var(--dark-color);
}

.tab:hover {
    background: var(--light-color);
}

.tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Sections */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Forms */
.admin-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

/* Items List */
.items-list {
    display: grid;
    gap: 1rem;
}

.item-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: start;
    transition: transform 0.2s;
}

.item-card:hover {
    transform: translateX(5px);
}

.item-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.item-info p {
    color: #666;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.item-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Gallery Admin */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-admin-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-admin-item .delete-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.alert.show {
    display: block;
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-nav {
        flex-direction: column;
        width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .item-card {
        flex-direction: column;
        gap: 1rem;
    }

    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}