/**
 * Estilos frontend para el plugin de Gestión de Distribuidores
 */

/* Variables CSS */
:root {
    --gp-primary: #2196F3;
    --gp-primary-dark: #1976D2;
    --gp-secondary: #FF9800;
    --gp-success: #4CAF50;
    --gp-danger: #F44336;
    --gp-warning: #FF9800;
    --gp-info: #2196F3;
    --gp-light: #f8f9fa;
    --gp-dark: #343a40;
    --gp-border: #dee2e6;
    --gp-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --gp-shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
    --gp-radius: 6px;
    --gp-radius-lg: 12px;
    --gp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset y base */
.gp-landing-page *,
.gp-provider-dashboard *,
.gp-form * {
    box-sizing: border-box;
}

/* === NAVIGATION BAR === */
.gp-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gp-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--gp-shadow);
}

.gp-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gp-nav-brand h2 {
    margin: 0;
    font-size: 24px;
    color: var(--gp-primary);
    font-weight: 700;
}

.gp-nav-brand span {
    color: var(--gp-secondary);
    font-weight: 400;
}

.gp-nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gp-auth-menu,
.gp-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gp-welcome {
    color: var(--gp-dark);
    font-weight: 500;
    margin-right: 10px;
}

.gp-btn-outline {
    background: transparent;
    border: 2px solid var(--gp-primary);
    color: var(--gp-primary);
}

.gp-btn-outline:hover {
    background: var(--gp-primary);
    color: white;
}

.gp-btn-secondary {
    background: var(--gp-secondary);
    color: white;
    border: 2px solid var(--gp-secondary);
}

.gp-btn-secondary:hover {
    background: transparent;
    color: var(--gp-secondary);
}

/* Hero actions */
.gp-hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive navbar */
@media (max-width: 768px) {
    .gp-nav-container {
        padding: 0 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .gp-nav-brand h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .gp-nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .gp-auth-menu,
    .gp-user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gp-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .gp-btn-large {
        width: 100%;
        max-width: 300px;
    }
}

/* Contenedores generales */
.gp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === LANDING PAGE === */

/* Hero Section */
.gp-hero {
    background: linear-gradient(135deg, var(--gp-primary) 0%, var(--gp-primary-dark) 100%);
    color: white;
    padding: 80px 0;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.gp-hero-content {
    flex: 1;
    max-width: 600px;
}

.gp-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gp-hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.gp-hero-image {
    flex: 1;
    text-align: center;
}

.gp-hero-image img {
    max-width: 100%;
    height: auto;
}

/* Beneficios */
.gp-benefits {
    padding: 80px 0;
    background: var(--gp-light);
}

.gp-benefits h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--gp-dark);
}

.gp-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gp-benefit-card {
    background: white;
    padding: 2rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gp-benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--gp-shadow-lg);
}

.gp-benefit-icon {
    width: 80px;
    height: 80px;
    background: var(--gp-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.gp-benefit-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-benefit-card p {
    color: #666;
    line-height: 1.6;
}

/* Proceso */
.gp-process {
    padding: 80px 0;
    background: white;
}

.gp-process h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-process-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gp-process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gp-process-step {
    text-align: center;
    position: relative;
}

.gp-step-number {
    width: 60px;
    height: 60px;
    background: var(--gp-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.gp-step-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-step-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.gp-step-content small {
    color: var(--gp-secondary);
    font-weight: 500;
}

/* Sección de registro */
.gp-registration {
    padding: 80px 0;
    background: var(--gp-light);
}

.gp-registration h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-registration p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.gp-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
}

/* Información de contacto */
.gp-contact-info {
    padding: 80px 0;
    background: white;
}

.gp-contact-info h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--gp-dark);
}

.gp-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gp-contact-card {
    background: var(--gp-light);
    padding: 2rem;
    border-radius: var(--gp-radius-lg);
    text-align: center;
}

.gp-contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-contact-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.gp-contact-card a {
    color: var(--gp-primary);
    text-decoration: none;
}

.gp-contact-card a:hover {
    text-decoration: underline;
}

/* FAQ */
.gp-faq {
    padding: 80px 0;
    background: var(--gp-light);
}

.gp-faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--gp-dark);
}

.gp-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.gp-faq-item {
    background: white;
    padding: 2rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
}

.gp-faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-faq-item p {
    color: #666;
    line-height: 1.6;
}

/* CTA Final */
.gp-cta-final {
    padding: 80px 0;
    background: var(--gp-primary);
    color: white;
    text-align: center;
}

.gp-cta-final h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.gp-cta-final p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* === PROVIDER DASHBOARD === */

.gp-provider-dashboard {
    font-family: var(--gp-font-family);
    background: var(--gp-light);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Header del Dashboard */
.gp-dashboard-header {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gp-header-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--gp-dark);
}

.gp-company-name {
    font-size: 1.1rem;
    color: var(--gp-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gp-welcome-text {
    color: #666;
    line-height: 1.6;
}

/* Estadísticas del Dashboard */
.gp-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gp-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.gp-stat-card:hover {
    transform: translateY(-2px);
}

.gp-stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gp-primary);
    border-radius: var(--gp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.gp-stat-content h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gp-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gp-dark);
    margin-bottom: 0.25rem;
}

.gp-stat-content small {
    color: #888;
    font-size: 0.8rem;
}

/* Navegación del Dashboard */
.gp-dashboard-nav {
    background: white;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gp-nav-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: var(--gp-radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gp-nav-btn:hover {
    background: var(--gp-light);
    color: var(--gp-primary);
}

.gp-nav-btn-active {
    background: var(--gp-primary);
    color: white;
    border-color: var(--gp-primary);
}

/* Contenido del Dashboard */
.gp-dashboard-content {
    background: white;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    overflow: hidden;
}

.gp-section {
    padding: 2rem;
}

.gp-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Overview específico */
.gp-overview-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.gp-quick-actions {
    background: var(--gp-light);
    padding: 1.5rem;
    border-radius: var(--gp-radius);
    margin-bottom: 2rem;
}

.gp-quick-actions h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gp-recent-activity {
    background: var(--gp-light);
    padding: 1.5rem;
    border-radius: var(--gp-radius);
}

.gp-recent-activity h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-revenue-summary {
    background: linear-gradient(135deg, var(--gp-success) 0%, #45a049 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--gp-radius);
    text-align: center;
    margin-bottom: 2rem;
}

.gp-revenue-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.gp-revenue-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gp-tips-section {
    background: var(--gp-light);
    padding: 1.5rem;
    border-radius: var(--gp-radius);
}

.gp-tips-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-tips-list {
    list-style: none;
    padding: 0;
}

.gp-tips-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #666;
    line-height: 1.5;
}

.gp-tips-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 0;
}

/* === FORMULARIOS === */

.gp-form {
    font-family: var(--gp-font-family);
    max-width: 100%;
}

.gp-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.gp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gp-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gp-dark);
    font-size: 0.95rem;
}

.gp-form-group input,
.gp-form-group textarea,
.gp-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
    font-family: inherit;
}

.gp-form-group input:focus,
.gp-form-group textarea:focus,
.gp-form-group select:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

.gp-form-group input::placeholder,
.gp-form-group textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.gp-form-group select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.gp-form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.gp-help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

.gp-form-message {
    padding: 1rem;
    border-radius: var(--gp-radius);
    margin-top: 1rem;
    font-weight: 500;
}

.gp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === BOTONES === */

.gp-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--gp-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.gp-btn-primary {
    background: var(--gp-primary);
    color: white;
}

.gp-btn-primary:hover {
    background: var(--gp-primary-dark);
    color: white;
}

.gp-btn-secondary {
    background: var(--gp-secondary);
    color: white;
}

.gp-btn-secondary:hover {
    background: #e68900;
    color: white;
}

.gp-btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.gp-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.gp-submit-btn {
    background: linear-gradient(135deg, var(--gp-primary), #1976d2);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gp-submit-btn:hover {
    background: linear-gradient(135deg, #1976d2, var(--gp-primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.gp-submit-btn:active {
    transform: translateY(0);
}

/* Responsive form improvements */
@media (max-width: 768px) {
    .gp-form-row {
        grid-template-columns: 1fr;
    }
    
    .gp-form-container {
        padding: 2rem 1.5rem;
    }
    
    .gp-form-group input,
    .gp-form-group textarea,
    .gp-form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* === TABLAS === */

.gp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: var(--gp-radius);
    overflow: hidden;
    box-shadow: var(--gp-shadow);
}

.gp-table th,
.gp-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gp-border);
}

.gp-table th {
    background: var(--gp-light);
    font-weight: 600;
    color: var(--gp-dark);
}

.gp-table tbody tr:hover {
    background: rgba(33, 150, 243, 0.05);
}

/* === ESTADOS === */

.gp-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gp-status-pending {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.gp-status-approved {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.gp-status-rejected {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.gp-status-ordered {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.gp-status-shipped {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
}

.gp-status-delivered {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

/* === LOADING === */

.gp-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gp-loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: var(--gp-radius-lg);
    text-align: center;
}

.gp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gp-border);
    border-top: 4px solid var(--gp-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ACCESO DENEGADO === */

.gp-access-denied {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--gp-radius-lg);
    box-shadow: var(--gp-shadow);
    margin: 2rem 0;
}

.gp-access-denied h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gp-dark);
}

.gp-access-denied p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.gp-no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .gp-hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }
    
    .gp-hero h1 {
        font-size: 2.5rem;
    }
    
    .gp-benefits-grid,
    .gp-contact-grid,
    .gp-faq-grid {
        grid-template-columns: 1fr;
    }
    
    .gp-process-steps {
        grid-template-columns: 1fr;
    }
    
    .gp-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .gp-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .gp-dashboard-nav {
        justify-content: center;
    }
    
    .gp-nav-btn {
        flex: 1;
        min-width: auto;
    }
    
    .gp-overview-content {
        grid-template-columns: 1fr;
    }
    
    .gp-form-row {
        grid-template-columns: 1fr;
    }
    
    .gp-action-buttons {
        flex-direction: column;
    }
    
    .gp-table {
        font-size: 0.875rem;
    }
    
    .gp-table th,
    .gp-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .gp-container {
        padding: 0 15px;
    }
    
    .gp-hero h1 {
        font-size: 2rem;
    }
    
    .gp-hero-subtitle {
        font-size: 1rem;
    }
    
    .gp-form-container {
        padding: 2rem 1.5rem;
    }
    
    .gp-section {
        padding: 1.5rem;
    }
    
    .gp-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .gp-dashboard-nav {
        flex-direction: column;
    }
    
    .gp-nav-btn {
        width: 100%;
    }
}
