/**
 * VegFood Admin Dashboard Styles
 */

.admin-body {
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header */
.admin-header {
    background: #4CAF50;
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.admin-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

.admin-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Main */
.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    border-radius: 8px;
    transition: all 0.2s;
}

.admin-tab:hover {
    background: #f5f5f5;
}

.admin-tab.active {
    background: #4CAF50;
    color: white;
}

/* Tab Content */
.admin-tab-content {
    display: none;
}

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

/* Section Header */
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-section-header h2 {
    font-size: 1.5rem;
    color: #333;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #43A047;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-success {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #43A047;
}

.btn-edit {
    background: #2196F3;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #1976D2;
}

/* Filters */
.admin-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-input,
.admin-select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    min-width: 180px;
}

.admin-input:focus,
.admin-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.admin-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.admin-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Table */
.admin-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #fafafa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-vegano {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-vegetariano {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-admin {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-user {
    background: #f5f5f5;
    color: #666;
}

.badge-pending {
    background: #fff3e0;
    color: #ef6c00;
}

/* Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.admin-pagination button {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-pagination button:hover {
    background: #f5f5f5;
}

.admin-pagination button.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.admin-modal.hidden {
    display: none;
}

.admin-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.admin-modal-header h3 {
    font-size: 1.25rem;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-close:hover {
    background: #f5f5f5;
}

/* Form */
#restaurant-form {
    padding: 24px;
}

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

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

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

.form-group .admin-input,
.form-group .admin-select,
.form-group .admin-textarea {
    width: 100%;
}

.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.form-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Loading */
.loading-row td {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 8px;
    }

    .admin-title {
        width: 100%;
        text-align: center;
        order: -1;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-filters {
        flex-direction: column;
    }

    .admin-filters .admin-input,
    .admin-filters .admin-select {
        width: 100%;
    }

    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

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