/* ═══════════════════════════════════════════════════════════════════════════
   Global Investor - User Profile & Auth Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Auth Page ──────────────────────────────────────────────────────────── */
.gi-auth-wrapper {
    max-width: 460px;
    margin: 60px auto;
    padding: 0 20px;
}

.gi-auth-container {
    background: #000;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.gi-auth-tabs {
    display: flex;
    border-bottom: 1px solid #1a1a1a;
}

.gi-auth-tab {
    flex: 1;
    padding: 18px;
    background: #0a0a0a;
    border: none;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.gi-auth-tab:hover {
    background: #111;
    color: #888;
}

.gi-auth-tab-active {
    background: #000;
    color: #2ba3ff;
    border-bottom: 2px solid #2ba3ff;
}

.gi-auth-form {
    display: none;
    padding: 36px 32px;
}

.gi-auth-form-active {
    display: block;
}

.gi-auth-form h2 {
    margin: 0 0 24px;
    color: #eee;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

/* ── Profile Page ────────────────────────────────────────────────────────── */
.gi-profile-wrapper {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 20px;
}

.gi-profile-container {
    background: #000;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.gi-profile-header {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #1a1a1a;
}

.gi-profile-avatar-section {
    text-align: center;
}

.gi-profile-avatar,
.gi-profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.gi-profile-avatar {
    object-fit: cover;
    border: 3px solid #2ba3ff;
    box-shadow: 0 0 20px rgba(43, 163, 255, 0.3);
}

.gi-profile-avatar-placeholder {
    background: #1a1a1a;
    border: 3px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.gi-profile-info {
    flex: 1;
}

.gi-profile-info h2 {
    margin: 0 0 8px;
    color: #eee;
    font-size: 28px;
    font-weight: 700;
}

.gi-profile-email {
    color: #888;
    font-size: 14px;
    margin: 0 0 16px;
}

.gi-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.gi-stat-box {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.gi-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2ba3ff;
    margin-bottom: 4px;
}

.gi-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gi-profile-section {
    margin-bottom: 32px;
}

.gi-profile-section h3 {
    color: #eee;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1a1a1a;
}

/* ── Run History ─────────────────────────────────────────────────────────── */
.gi-runs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gi-run-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 16px 20px;
    transition: all 0.2s ease;
}

.gi-run-item:hover {
    background: #111;
    border-color: #2a2a2a;
}

.gi-run-time {
    color: #4ecca3;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gi-run-date {
    color: #666;
    font-size: 13px;
    flex: 1;
    margin-left: 20px;
}

.gi-empty-state {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

.gi-empty-state a {
    color: #2ba3ff;
    text-decoration: none;
    font-weight: 600;
}

.gi-empty-state a:hover {
    text-decoration: underline;
}

.gi-preference-option {
    padding: 16px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
}

.gi-toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.gi-toggle-label input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.gi-toggle-text {
    flex: 1;
}

.gi-toggle-text strong {
    display: block;
    color: #eee;
    margin-bottom: 4px;
}

.gi-toggle-text small {
    display: block;
    color: #888;
    font-size: 13px;
    line-height: 1.4;
}

.gi-profile-type {
    color: #888;
    font-size: 14px;
    margin: 0 0 16px;
    font-style: italic;
}

.gi-profile-error {
    text-align: center;
    color: #ff4b4b;
    padding: 40px 20px;
    font-size: 16px;
}

.gi-run-item-public {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 16px 20px;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.gi-form-group {
    margin-bottom: 20px;
}

.gi-form-group label {
    display: block;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gi-form-group input {
    width: 100%;
    padding: 14px 16px;
    background: #000000 !important;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gi-form-group input:focus {
    outline: none;
    border-color: #2ba3ff;
    background: #000000 !important;
    box-shadow: 0 0 0 3px rgba(43, 163, 255, 0.1);
    color: #ffffff !important;
}

.gi-form-group input::placeholder {
    color: #666 !important;
}

.gi-form-group input:-webkit-autofill,
.gi-form-group input:-webkit-autofill:hover,
.gi-form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #000000 inset !important;
    box-shadow: 0 0 0px 1000px #000000 inset !important;
    background-color: #000000 !important;
}

.gi-form-group-checkbox {
    margin-bottom: 20px;
}

.gi-form-group-checkbox label {
    display: flex;
    align-items: center;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
}

.gi-form-group-checkbox input {
    margin-right: 8px;
    width: auto;
}

.gi-form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.gi-form-success {
    background: rgba(78, 204, 163, 0.1);
    border: 1px solid #4ecca3;
    color: #4ecca3;
}

.gi-form-error {
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid #ff4b4b;
    color: #ff4b4b;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.gi-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2ba3ff 0%, #1e8fe6 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(43, 163, 255, 0.3);
}

.gi-btn-primary:hover {
    background: linear-gradient(135deg, #1e8fe6 0%, #1a7bc9 100%);
    box-shadow: 0 6px 16px rgba(43, 163, 255, 0.4);
    transform: translateY(-1px);
}

.gi-btn-primary:active {
    transform: translateY(0);
}

.gi-btn-primary:disabled {
    background: #333;
    cursor: not-allowed;
    box-shadow: none;
}

.gi-btn-secondary {
    padding: 10px 20px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #aaa;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gi-btn-secondary:hover {
    background: #222;
    border-color: #333;
    color: #ccc;
}

.gi-btn-delete {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gi-btn-delete:hover {
    background: rgba(255, 75, 75, 0.1);
    border-color: #ff4b4b;
    color: #ff4b4b;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .gi-auth-wrapper,
    .gi-profile-wrapper {
        margin: 30px auto;
    }

    .gi-auth-form,
    .gi-profile-container {
        padding: 24px 20px;
    }

    .gi-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .gi-profile-info h2 {
        font-size: 24px;
    }

    .gi-profile-avatar,
    .gi-profile-avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .gi-profile-stats {
        grid-template-columns: 1fr;
    }

    .gi-run-item {
        flex-wrap: wrap;
    }

    .gi-run-date {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}
