/* =============================================================================
   Customer Portal CSS
   Styling for the customer portal interface
   ============================================================================= */

/* =============================================================================
   Login Section
   ============================================================================= */

.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header h1 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.login-header p {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.login-help {
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.login-help p {
    color: #718096;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.login-links a {
    color: #00ff88;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: #00cc6a;
}

/* =============================================================================
   Dashboard Section
   ============================================================================= */

.dashboard-section {
    padding: 2rem 0;
    min-height: 100vh;
    background: #f7fafc;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.welcome-message h1 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.welcome-message p {
    color: #718096;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.refresh-btn, .logout-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn {
    background: #e2e8f0;
    color: #2d3748;
}

.refresh-btn:hover {
    background: #cbd5e0;
}

.logout-btn {
    background: #fed7d7;
    color: #c53030;
}

.logout-btn:hover {
    background: #feb2b2;
}

/* =============================================================================
   Stats Grid
   ============================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #718096;
    font-weight: 500;
}

/* =============================================================================
   Servers Section
   ============================================================================= */

.servers-section, .billing-section, .support-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.create-server-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.create-server-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.server-card:hover {
    transform: translateY(-5px);
}

.server-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.server-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00ff88;
    animation: pulse 2s infinite;
}

.server-body {
    padding: 1.5rem;
}

.server-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    color: #718096;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.detail-value {
    color: #2d3748;
    font-weight: 600;
}

.server-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.server-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
}

.btn-start {
    background: #c6f6d5;
    color: #22543d;
}

.btn-start:hover {
    background: #9ae6b4;
}

.btn-stop {
    background: #fed7d7;
    color: #c53030;
}

.btn-stop:hover {
    background: #feb2b2;
}

.btn-restart {
    background: #feebc8;
    color: #dd6b20;
}

.btn-restart:hover {
    background: #fbd38d;
}

.btn-console {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-console:hover {
    background: #cbd5e0;
}

/* =============================================================================
   Billing Section
   ============================================================================= */

.billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.billing-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.billing-header h3 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.plan-badge {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.billing-details {
    margin-bottom: 1.5rem;
}

.billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.billing-row:last-child {
    border-bottom: none;
}

.billing-row span:first-child {
    color: #718096;
    font-weight: 500;
}

.billing-row span:last-child {
    color: #2d3748;
    font-weight: 600;
}

.status-active {
    color: #22543d !important;
    background: #c6f6d5;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.billing-actions {
    display: flex;
    gap: 1rem;
}

.renew-btn, .upgrade-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.renew-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
}

.renew-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.upgrade-btn {
    background: #e2e8f0;
    color: #2d3748;
}

.upgrade-btn:hover {
    background: #cbd5e0;
}

.orders-list {
    max-height: 200px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.order-info {
    flex: 1;
}

.order-id {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

.order-date {
    color: #718096;
    font-size: 0.8rem;
}

.order-amount {
    color: #22543d;
    font-weight: 600;
}

/* =============================================================================
   Support Section
   ============================================================================= */

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.support-card:hover {
    transform: translateY(-5px);
}

.support-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.support-content h3 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.support-content p {
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.support-link {
    color: #00ff88;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid #00ff88;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-block;
}

.support-link:hover {
    background: #00ff88;
    color: white;
}

/* =============================================================================
   Modal Styles
   ============================================================================= */

.modal {
    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: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.modal-body {
    padding: 2rem;
}

/* =============================================================================
   Match main site header/navbar styles
   ============================================================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s;
}

.navbar.scrolled {
    background: rgba(10, 10, 11, 0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.brand-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #B0B0B0;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.15s;
    position: relative;
}

.nav-link:hover {
    color: #14ECE4;
    background: rgba(20, 236, 228, 0.1);
}

.nav-link.active {
    color: #14ECE4;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(135deg, #14ECE4, #7EADFF);
    border-radius: 1px;
}

.nav-cta {
    background: linear-gradient(135deg, #14ECE4, #7EADFF);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.15s;
}

.nav-cta:hover {
    background: linear-gradient(135deg, #7EADFF, #ED2F8C);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.15s;
}

.nav-dropdown {
    position: relative;
    cursor: pointer;
}
.nav-dropdown > ul.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #1A1A1D;
    border-radius: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    padding: 0.5rem 0;
    margin: 0;
    z-index: 10001;
    list-style: none;
}
.nav-dropdown:hover > ul.dropdown-menu {
    display: block;
}
.dropdown-menu li {
    width: 100%;
}
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #14ECE4;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.dropdown-menu a:hover {
    background: #2A2A2F;
    color: #7EADFF;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 2rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .billing-grid {
        grid-template-columns: 1fr;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .server-actions {
        flex-direction: column;
    }
    
    .server-btn {
        flex: none;
    }
    
    .billing-actions {
        flex-direction: column;
    }
    
    .login-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* =============================================================================
   Animations
   ============================================================================= */

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    /* Add top padding to prevent navbar overlap */
    padding-top: 80px;
}
