/* Admin Panel Styles */
/* ================== */

/* Admin FAB Button */
.admin-fab {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}

.admin-fab:active {
    transform: scale(0.95);
}

/* Admin Modal Overlay */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Admin Modal */
.admin-modal {
    background: white;
    border-radius: 16px;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Admin Modal Header */
.admin-modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #84cc16;
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #84cc16;
}

.admin-close-btn {
    background: rgba(132, 204, 22, 0.2);
    border: none;
    color: #84cc16;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.admin-close-btn:hover {
    background: rgba(132, 204, 22, 0.3);
    transform: rotate(90deg);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #374151;
    border-bottom: 2px solid #4b5563;
}

.admin-tabs button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #1f2937;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: #9ca3af;
}

.admin-tabs button:hover {
    background: #374151;
    color: #d1d5db;
}

.admin-tabs button.active {
    background: #84cc16;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(132, 204, 22, 0.3);
    font-weight: 600;
}

/* Admin Content */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #1f2937;
}

.admin-section {
    background: #374151;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #4b5563;
}

.admin-section-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid #4b5563;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #1f2937;
    color: #f3f4f6;
}

.admin-search:focus {
    outline: none;
    border-color: #84cc16;
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.1);
}

.admin-filter {
    padding: 0.75rem 1rem;
    border: 1px solid #4b5563;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 200px;
    background: #1f2937;
    color: #f3f4f6;
}

.admin-filter:focus {
    outline: none;
    border-color: #84cc16;
}

/* Admin Table */
.admin-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #4b5563;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #1f2937;
}

.admin-table thead {
    background: #111827;
    border-bottom: 2px solid #84cc16;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #84cc16;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #374151;
    color: #f3f4f6;
}

.admin-table tbody tr:hover {
    background: #374151;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid #4b5563;
    color: #e5e7eb;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    opacity: 0.9;
}

.btn-icon:hover {
    transform: scale(1.2);
    opacity: 1;
    border-color: #84cc16;
    background: rgba(132, 204, 22, 0.15);
}

.btn-icon--edit:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
}

.btn-icon--delete:hover {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #84cc16;
    color: #1f2937;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

.badge-super_admin {
    background: #a855f7;
    color: white;
}

.badge-admin {
    background: #f59e0b;
    color: white;
}

.badge-usuario {
    background: #6b7280;
    color: white;
}

/* Buttons */
.btn-admin-primary {
    padding: 0.75rem 1.5rem;
    background: #84cc16;
    color: #1f2937;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.4);
    background: #a3e635;
}

.btn-admin-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Form Modal */
.admin-form-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-form-modal h3 {
    margin: 0 0 1.5rem 0;
    color: #212529;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* Admin Form Card */
.admin-form-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.admin-form-card h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-form-grid input {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.admin-form-grid input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading State */
.admin-loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .admin-tabs button {
        white-space: nowrap;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-section-header {
        flex-direction: column;
    }

    .admin-search,
    .admin-filter {
        width: 100%;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}
