/* AILMX - Unified Pages Styles (Auth, Profile, Payments) */
/* Based on Landing Page Design System */

/* ===== CSS Variables ===== */
:root {
    /* Deep Space Theme - Same as Landing */
    --bg-primary: #030014;
    --bg-secondary: #0f0c29;
    --bg-tertiary: #1a1b4b;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-secondary: #b4b4c3;
    --text-muted: #6c7293;
    
    --accent-primary: #7000ff;
    --accent-secondary: #00c6ff;
    --accent-glow: rgba(112, 0, 255, 0.5);
    
    --gradient-main: linear-gradient(135deg, #7000ff 0%, #00c6ff 100%);
    --gradient-text: linear-gradient(to right, #fff 20%, #b4b4c3 40%, #7000ff 60%, #00c6ff 80%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(112, 0, 255, 0.3);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(112, 0, 255, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* ===== Page Layout ===== */
.page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Background Effects ===== */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1b4b 0%, #030014 100%);
}

.page-background canvas {
    opacity: 0.4;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 198, 255, 0.15), transparent 25%);
    pointer-events: none;
}

/* ===== Navigation ===== */
.page-nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(3, 0, 20, 0.6);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.nav-link i {
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    text-decoration: none;
}

.btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 20px rgba(112, 0, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(112, 0, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

.btn-ghost:hover {
    color: white;
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* ===== Page Content Container ===== */
.page-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    width: 100%;
}

.page-content.align-top {
    align-items: flex-start;
    padding-top: 2rem;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: fadeSlideUp 0.5s ease-out;
}

.card-sm {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
}

.card-md {
    width: 100%;
    max-width: 600px;
    padding: 3rem;
}

.card-lg {
    width: 100%;
    max-width: 900px;
    padding: 3rem;
}

.card-xl {
    width: 100%;
    max-width: 1100px;
    padding: 3rem;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Card Header ===== */
.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-header .logo-link {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.card-header .logo-lg {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Forms ===== */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(112, 0, 255, 0.15);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236c7293'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-group select option {
    background: var(--bg-secondary);
    color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
}

.form-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.form-link:hover {
    color: var(--accent-secondary);
}

/* Form Grid for Profile */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-grid .form-group.full-width {
    grid-column: span 2;
}

.form-grid .btn {
    grid-column: span 2;
    margin-top: 0.5rem;
}

/* ===== Card Footer ===== */
.card-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.card-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-footer a {
    color: var(--accent-secondary);
    font-weight: 600;
}

.card-footer a:hover {
    color: white;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* ===== Profile Page ===== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.profile-header .email {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Profile Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.25px;
    font-weight: 600;
}

/* ===== Payment History ===== */
.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title-bar h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

/* Balance Card */
.balance-card {
    background: var(--gradient-main);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 15px 40px rgba(112, 0, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.balance-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Table */
.table-container {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

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

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.25px;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: white;
}

.data-table .mono {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.data-table .amount {
    font-weight: 700;
    font-size: 1rem;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
}

.status-succeeded {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.status-canceled {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    transition: var(--transition);
}

.page-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.page-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Result Cards (Payment Success/Cancel) ===== */
.result-card {
    text-align: center;
}

.result-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.result-card.success .result-icon {
    color: var(--success);
}

.result-card.canceled .result-icon {
    color: var(--error);
}

.result-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.result-amount {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
}

.result-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.result-details {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .value {
    font-weight: 600;
    color: white;
}

.detail-row .value.highlight {
    color: var(--accent-secondary);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .page-nav {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .card-sm,
    .card-md,
    .card-lg,
    .card-xl {
        padding: 2rem 1.5rem;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid .form-group.full-width,
    .form-grid .btn {
        grid-column: span 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .balance-value {
        font-size: 2.5rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 1rem;
    }
    
    .result-amount {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 1.5rem 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}
