/* Admin Panel Styles */
.admin-section {
    padding: 80px 0;
    min-height: 80vh;
}

.admin-login {
    max-width: 400px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-login h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #6b4226;
}

.admin-login input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.admin-dashboard {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.admin-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #6b4226;
    border-bottom: 2px solid #6b4226;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.image-preview {
    margin-top: 15px;
    max-width: 200px;
    max-height: 200px;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.admin-menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-menu-item {
    background-color: #f9f5f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: move;
    transition: all 0.3s ease;
    display: flex;
    align-items: stretch;
}

.admin-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-menu-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
}

.admin-menu-item.drag-over {
    border: 2px dashed #6b4226;
    background-color: #fff8f0;
}

.drag-handle {
    background-color: #6b4226;
    color: white;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.3s ease;
}

.drag-handle:hover {
    background-color: #5a3520;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle i {
    font-size: 16px;
}

.item-order {
    background-color: #2c3e50;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin: auto 0;
}

.admin-menu-item-image {
    height: 150px;
    width: 200px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.admin-menu-item-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-menu-item-title {
    font-size: 1.2rem;
    color: #6b4226;
}

.admin-menu-item-price {
    font-weight: 700;
    color: #6b4226;
}

.admin-menu-item-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.admin-menu-item-actions {
    display: flex;
    justify-content: space-between;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-edit {
    background-color: #3498db;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.edit-form {
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

#logout-btn {
    margin-left: auto;
}

/* Message styles */
.admin-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
    animation: slideIn 0.3s ease-in-out;
}

.admin-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-message-info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for drag and drop */
@media (max-width: 768px) {
    .admin-menu-item {
        flex-direction: column;
    }
    
    .drag-handle {
        width: 100%;
        height: 30px;
    }
    
    .admin-menu-item-image {
        width: 100%;
        height: 120px;
    }
}

/* Drag instructions */
.drag-instructions {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #2196f3;
}

.drag-instructions i {
    font-size: 18px;
    color: #2196f3;
}

/* Category management styles */
.category-management {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.add-category-section,
.categories-list {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.add-category-section h4,
.categories-list h4 {
    margin-bottom: 20px;
    color: #6b4226;
    border-bottom: 2px solid #6b4226;
    padding-bottom: 10px;
}

.category-help-text {
    background-color: #e8f5e8;
    color: #2d5a2d;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.category-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
}

.category-item.drag-over {
    border: 2px dashed #6b4226;
    background-color: #fff8f0;
}

.category-drag-handle {
    background-color: #6b4226;
    color: white;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: grab;
    margin-right: 10px;
    font-size: 12px;
}

.category-drag-handle:hover {
    background-color: #5a3520;
}

.category-drag-handle:active {
    cursor: grabbing;
}

.category-info {
    display: flex;
    flex-direction: column;
}

.category-info strong {
    color: #6b4226;
    font-size: 16px;
}

.category-info small {
    color: #666;
    font-style: italic;
}

.category-actions {
    display: flex;
    gap: 10px;
}

.category-filter {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.category-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1565c0;
}

/* File Operations Styles */
.file-operations-section {
    display: grid;
    gap: 30px;
}

.export-section, .import-section, .backup-section {
    background-color: #f9f5f0;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0d5cc;
}

.export-section h4, .import-section h4, .backup-section h4 {
    color: #6b4226;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.export-section p, .import-section p, .backup-section p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.file-operation-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.import-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.backup-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.status-label {
    font-weight: 600;
    color: #6b4226;
}

.status-value {
    font-weight: 700;
    color: #333;
}

.category-filter select {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.no-items {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.admin-menu-item-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-menu-item-category i {
    color: #6b4226;
}

/* Edit category form styles */
.edit-category-form {
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    margin-top: 10px;
}

.edit-category-form .form-group {
    margin-bottom: 15px;
}

.edit-category-form .form-actions {
    display: flex;
    gap: 10px;
}

.edit-category-form .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.no-categories {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

@media (max-width: 768px) {
    .category-management {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}