/* Admin Panel Styles */
:root {
    --primary-500: #667eea;
    --primary-600: #5a67d8;
    --success-500: #28a745;
    --warning-500: #fd7e14;
    --danger-500: #dc3545;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-500) 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-500);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary-500) 0%, #764ba2 100%);
    color: white;
}

.sidebar-header i {
    width: 40px;
    height: 40px;
}

.sidebar-header h3 {
    font-size: 18px;
    margin-bottom: 2px;
}

.sidebar-header span {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary-500);
}

.nav-item.active {
    background: var(--gray-100);
    color: var(--primary-500);
    border-left-color: var(--primary-500);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--gray-200);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left h1 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.header-left p {
    color: var(--gray-600);
    font-size: 14px;
}

.admin-info {
    text-align: right;
}

.admin-info strong {
    color: var(--gray-900);
}

.admin-info small {
    display: block;
    color: var(--gray-600);
    font-size: 12px;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
}

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

.section-description {
    color: var(--gray-600);
    margin-bottom: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    color: white;
    width: 30px;
    height: 30px;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray-600);
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-900);
}

.dashboard-card h3 i {
    color: var(--primary-500);
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.user {
    background: #e3f2fd;
    color: #1976d2;
}

.activity-icon.task {
    background: #e8f5e9;
    color: #388e3c;
}

.activity-icon.application {
    background: #fff3e0;
    color: #f57c00;
}

.activity-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.activity-content p {
    font-size: 13px;
    color: var(--gray-600);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
    margin-left: auto;
    white-space: nowrap;
}

/* Task List */
.task-list {
    max-height: 300px;
    overflow-y: auto;
}

.task-item {
    padding: 15px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 10px;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.task-item p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.task-item .urgency {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.urgency.urgent {
    background: #ffebee;
    color: #c62828;
}

.urgency.alta {
    background: #fff3e0;
    color: #ef6c00;
}

.urgency.media {
    background: #e3f2fd;
    color: #1565c0;
}

.urgency.baja {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Section Actions */
.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid var(--gray-200);
    flex: 1;
    max-width: 400px;
}

.search-box i {
    color: var(--gray-400);
    width: 20px;
    height: 20px;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.data-table th {
    background: var(--gray-100);
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn i {
    width: 16px;
    height: 16px;
}

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

.btn-primary:hover {
    background: var(--primary-600);
}

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

.btn-success:hover {
    background: #218838;
}

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

.btn-warning:hover {
    background: #e65100;
}

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

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-outline {
    background: transparent;
    color: var(--primary-500);
    border: 2px solid var(--primary-500);
}

.btn-outline:hover {
    background: var(--primary-500);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    border-radius: 8px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active,
.status-badge.verified,
.status-badge.accepted {
    background: #e8f5e9;
    color: #2e7d32;
}

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

.status-badge.rejected {
    background: #ffebee;
    color: #c62828;
}

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

.status-badge.professional {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

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

.modal-large {
    max-width: 800px;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-close:hover {
    color: var(--gray-800);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

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

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.settings-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.settings-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card h3 i {
    color: var(--primary-500);
}

.settings-card .btn {
    margin-top: 10px;
}

/* Pending Grid */
.pending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.pending-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--warning-500);
}

.pending-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--gray-900);
}

.pending-card p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.pending-card .actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* User Detail */
.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.user-detail-item {
    padding: 15px;
    background: var(--gray-100);
    border-radius: 10px;
}

.user-detail-item label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.user-detail-item input,
.user-detail-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.pagination button.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideInUp 0.3s ease;
}

.toast.success {
    background: var(--success-500);
}

.toast.error {
    background: var(--danger-500);
}

.toast.warning {
    background: var(--warning-500);
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Document Preview */
.document-preview {
    background: var(--gray-100);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.document-preview img {
    max-width: 100%;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .section-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .user-detail-grid {
        grid-template-columns: 1fr;
    }
}
