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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c1810;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-box h1 i {
    color: #d4af37;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
}

.error-message {
    color: #f44336;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #2c1810;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

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

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

.btn-danger {
    background: #f44336;
    color: white;
}

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

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #2c1810, #1a0f0a);
    color: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.admin-header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.admin-nav {
    background: rgba(26, 15, 10, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.nav-tabs-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-tab.active {
    background: rgba(212, 175, 55, 0.2);
    color: #ffd700;
    font-weight: 500;
}

.admin-container {
    min-height: calc(100vh - 160px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Admin Content */
.admin-content {
    padding: 40px;
    overflow-y: auto;
    max-width: 100%;
}

.tab-content {
    display: none;
}

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

.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #2c1810;
    font-size: 1.8rem;
    text-align: center;
}

.save-all-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.save-all-container .btn-success {
    padding: 15px 40px;
    font-size: 1.1rem;
    min-width: 250px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.pending-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-left: 8px;
    font-weight: 600;
}

.add-button-container {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    padding: 30px 0;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 280px));
    gap: 20px;
    justify-content: center;
}

.item-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.item-card-body {
    padding: 15px;
}

.item-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c1810;
}

.item-card-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.item-card-actions {
    display: flex;
    gap: 10px;
}

.item-card-actions .btn {
    flex: 1;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c1810;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.image-preview {
    margin-top: 10px;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Content Form */
.content-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content-form textarea {
    resize: vertical;
    min-height: 150px;
}

.content-form .form-group {
    margin-bottom: 25px;
}

.content-form .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c1810;
    font-size: 1rem;
}

.content-form .form-group input,
.content-form .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.content-form .form-group input:focus,
.content-form .form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
}

.content-form .btn-primary {
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    display: block;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    max-width: calc(100vw - 40px);
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #da190b);
}

.notification.info {
    background: linear-gradient(135deg, #2196F3, #0b7dda);
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-header {
        padding: 15px 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .admin-nav {
        padding: 12px 20px;
    }

    .nav-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tab {
        padding: 8px 15px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .admin-content {
        padding: 20px;
    }

    .admin-container {
        min-height: calc(100vh - 200px);
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 15px;
    }

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

    .header-content {
        gap: 12px;
    }

    .admin-nav {
        padding: 10px 15px;
    }

    .nav-container {
        gap: 3px;
    }

    .nav-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 15px;
    }

    .admin-container {
        min-height: calc(100vh - 220px);
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: calc(100vw - 20px);
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
