/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #3848c3 0%, #0d11a9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #314aad 0%, #434aab 100%);
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #526eeb;
}

.btn-outline:hover {
    background: #526eeb;
    color: white;
}

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

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

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

.btn-success {
    background: #10b981;
    color: white;
}

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

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #120f37;
}

.logo i {
    font-size: 28px;
}

.nav-auth {
    display: flex;
    gap: 12px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 24px;
}

.search-container {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    width: 300px;
    outline: none;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #5a6fd8;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-btn:hover {
    border-color: #667eea;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f8fafc;
}

/* Main Content */
.main {
    min-height: calc(100vh - 80px);
}

.page {
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6b7280;
    font-size: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    background: white;
}

.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);
}

.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-links p {
    margin: 8px 0;
    color: #6b7280;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Marketplace */
.marketplace-header {
    text-align: center;
    margin-bottom: 40px;
}

.marketplace-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.marketplace-header p {
    font-size: 18px;
    color: #6b7280;
}

.filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters select {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 200px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.service-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.service-card-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.service-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.service-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.service-card-body {
    padding: 20px;
}

.service-description {
    color: #6b7280;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #374151;
    font-size: 14px;
}

.service-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-price {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

/* Service Detail */
.back-btn {
    margin-bottom: 24px;
}

.service-detail {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.service-detail-header {
    padding: 32px;
    border-bottom: 1px solid #f1f5f9;
}

.service-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.service-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.service-detail-body {
    padding: 32px;
}

.service-detail-description {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 32px;
}

.provider-info {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.provider-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.provider-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: #374151;
}

.service-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: #f8fafc;
}

.service-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #10b981;
}

/* Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

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

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 32px;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.tab-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

.services-list,
.contracts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-item,
.contract-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.service-item-info,
.contract-item-info {
    flex: 1;
}

.service-item-title,
.contract-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.service-item-meta,
.contract-item-meta {
    font-size: 14px;
    color: #6b7280;
}

.service-item-actions,
.contract-item-actions {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-ativo {
    background: #dcfce7;
    color: #166534;
}

.status-inativo {
    background: #fee2e2;
    color: #991b1b;
}

.status-pendente {
    background: #fef3c7;
    color: #92400e;
}

.status-aceito {
    background: #dbeafe;
    color: #1e40af;
}

.status-concluido {
    background: #dcfce7;
    color: #166534;
}

.status-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

/* Create Service */
.create-service-container {
    max-width: 600px;
    margin: 0 auto;
}

.create-service-header {
    text-align: center;
    margin-bottom: 32px;
}

.create-service-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.create-service-form {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.price-display {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Loading States */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading i {
    font-size: 32px;
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.loading-overlay {
    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: 9999;
}

.loading-spinner {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    color: #374151;
}

.loading-spinner i {
    font-size: 24px;
    margin-bottom: 12px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .service-detail-header,
    .service-detail-body {
        padding: 20px;
    }
    
    .service-actions {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .dashboard-tabs {
        flex-direction: column;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .service-item,
    .contract-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .service-item-actions,
    .contract-item-actions {
        justify-content: center;
    }
}

