/**
 * Member Portal Styles - Custom Login & Dashboard with URL Management
 */

.gte-portal-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.gte-portal-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gte-portal-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-branding {
    margin-bottom: 40px;
}

.brand-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.portal-branding h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
    color: white;
}

.tagline {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
}

.portal-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-item h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: white;
}

.feature-item p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.portal-benefits h3 {
    font-size: 24px;
    margin: 0 0 20px 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 12px 0;
    font-size: 16px;
    opacity: 0.95;
}

.gte-portal-right {
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-form-container {
    width: 100%;
    max-width: 400px;
}

.portal-form-container h2 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: #333;
}

.form-subtitle {
    color: #666;
    margin: 0 0 30px 0;
    font-size: 16px;
}

.gte-portal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    color: #999;
    font-size: 13px;
    margin-top: 5px;
}

.form-group-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-link, .signup-link, .signin-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.forgot-link:hover, .signup-link:hover, .signin-link:hover {
    text-decoration: underline;
}

.gte-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gte-btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.gte-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gte-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.gte-btn-primary:active {
    transform: translateY(0);
}

.gte-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.gte-btn-secondary:hover {
    background: #e0e0e0;
}

.gte-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    font-size: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.form-footer p {
    margin: 0;
    color: #666;
}

.gte-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.gte-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gte-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gte-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Member Dashboard */
.gte-member-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-greeting h1 {
    font-size: 32px;
    margin: 0 0 5px 0;
}

.user-greeting p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.gte-btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.gte-btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.quick-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 48px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-card h2 {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: #333;
}

.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header-with-action h2 {
    margin: 0;
}

/* URL Management Styles */
.url-management-card {
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 16px;
}

.urls-table-wrapper {
    overflow-x: auto;
    margin: 0 -30px;
    padding: 0 30px;
}

.urls-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.urls-table thead {
    background: #f8f9fa;
}

.urls-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.urls-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.urls-table tbody tr {
    transition: background-color 0.2s ease;
}

.urls-table tbody tr:hover {
    background: #f8f9fa;
}

.url-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.url-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #d1ecf1;
    color: #0c5460;
}

.actions-cell {
    white-space: nowrap;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.action-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* Modal Styles */
.gte-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.gte-modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.action-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.action-card h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: #333;
}

.action-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.achievement-icon {
    font-size: 36px;
}

.achievement-info {
    flex: 1;
}

.achievement-info strong {
    display: block;
    color: #333;
    margin-bottom: 3px;
}

.achievement-info small {
    color: #999;
    font-size: 13px;
}

.view-all-link {
    display: inline-block;
    margin-top: 15px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.profile-card {
    text-align: center;
}

.profile-avatar {
    margin-bottom: 15px;
}

.profile-avatar img {
    border-radius: 50%;
    border: 4px solid #667eea;
}

.profile-card h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.profile-email {
    color: #999;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.profile-stat {
    text-align: center;
}

.profile-stat strong {
    display: block;
    font-size: 24px;
    color: #667eea;
    margin-bottom: 5px;
}

.profile-stat span {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.streak-reminder {
    padding: 20px;
}

.streak-status {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.status-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.streak-status.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 10px;
    padding: 15px;
}

.streak-status.inactive {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 10px;
    padding: 15px;
}

.streak-status strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.streak-status p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 992px) {
    .gte-portal-container {
        grid-template-columns: 1fr;
    }
    
    .gte-portal-left {
        display: none;
    }
    
    .dashboard-main-content {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .urls-table {
        font-size: 13px;
    }
    
    .urls-table th,
    .urls-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .dashboard-quick-stats {
        grid-template-columns: 1fr;
    }
    
    .card-header-with-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .urls-table-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .urls-table {
        font-size: 12px;
    }
    
    .action-btn {
        font-size: 18px;
        padding: 3px 5px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Force modal to display on top */
.gte-modal {
    display: none !important;
}

.gte-modal.active {
    display: flex !important;
}

/* Ensure modal is clickable */
.gte-modal * {
    pointer-events: auto;
}

/* Make sure WordPress admin bar doesn't interfere */
body.admin-bar .gte-modal {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .gte-modal {
        top: 46px;
    }
}