﻿.profile-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: #6c757d;
    gap: 12px;
}

.profile-header-card {
    background: linear-gradient(135deg, #004aad 0%, #0063d1 100%);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 74, 173, 0.3);
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.6);
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.85);
}

.profile-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.profile-username {
    font-size: 1rem;
    margin: 0;
    color: rgba(255,255,255,0.8);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

    .status-badge i {
        font-size: 0.5rem;
    }

.status-active {
    background: rgba(255,255,255,0.2);
    color: #d4edda;
    border: 1px solid rgba(255,255,255,0.3);
}

    .status-active i {
        color: #6fcf97;
    }

.status-inactive {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}

.profile-card .status-active {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

    .profile-card .status-active i {
        color: #43a047;
    }

.profile-card .status-inactive {
    background: #fce4ec;
    color: #b71c1c;
    border-color: #f48fb1;
}

    .profile-card .status-inactive i {
        color: #e53935;
    }

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .profile-details-grid {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.card-header-bar {
    background: #004aad;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body-content {
    padding: 8px 0;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 20px;
    border-bottom: 1px solid #f1f3f5;
    gap: 12px;
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    min-width: 130px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 2px;
}

    .detail-label i {
        color: #004aad;
        width: 14px;
        text-align: center;
        font-size: 0.85rem;
    }

.detail-value {
    flex: 1;
    font-size: 0.9rem;
    color: #343a40;
    word-break: break-word;
}

    .detail-value a {
        color: #004aad;
        text-decoration: none;
    }

        .detail-value a:hover {
            text-decoration: underline;
        }

.text-muted {
    color: #adb5bd;
    font-style: italic;
    font-size: 0.85rem;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.btn-back {
    background: white;
    color: #004aad;
    border: 2px solid #004aad;
    padding: 9px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

    .btn-back:hover {
        background: #004aad;
        color: white;
    }

/* ===== Modern Profile Redesign Additions ===== */

.profile-avatar {
    position: relative;
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.avatar-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #0055c2;
}

.dot-active {
    background: #4ade80;
}

.dot-inactive {
    background: #9ca3af;
}

/* Quick stats row */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .profile-stats-row {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f4;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    }

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-icon--blue {
    background: #eef1ff;
    color: #6382ff;
}

.stat-icon--green {
    background: #e6f7ee;
    color: #18a566;
}

.stat-icon--purple {
    background: #f4ecff;
    color: #9b59f6;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #212529;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a8f98;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* Wide cards (report access, password) */
.profile-card--wide {
    margin-bottom: 20px;
}

/* Report access chips */
.report-access-hint {
    padding: 12px 20px 4px;
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.report-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px 20px;
}

.report-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid #e9ecef;
    background: #fff;
    color: #adb5bd;
}

.report-chip--active {
    background: var(--rp-tint, #eef1ff);
    border-color: var(--rp-accent, #6382ff);
    color: #333;
}

.report-chip--muted {
    opacity: 0.65;
}

.report-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.report-chip-count {
    font-weight: 700;
    font-size: 0.78rem;
    opacity: 0.8;
}

/* Change password form */
.password-body {
    padding: 20px;
}

.password-form {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Scoped to .password-form on purpose. profile.css is linked globally in _Host.cshtml, so an
   unscoped ".form-group" here restyles EVERY form in the app - it stacked the labels above the
   inputs and upper-cased them on Item Master, Add Customer, Add Invoice and others. All three
   .form-group divs these rules are for live inside .password-form in Profile.razor. */
.password-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .password-form .form-group label {
        font-size: 0.8rem;
        font-weight: 700;
        color: #495057;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .input-with-icon:focus-within {
        border-color: #004aad;
        background: #fff;
    }

    .input-with-icon i.fas:first-child {
        color: #adb5bd;
        width: 14px;
        text-align: center;
    }

    .input-with-icon input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-size: 0.9rem;
        color: #212529;
    }

.eye-btn {
    border: none;
    background: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 2px 4px;
}

    .eye-btn:hover {
        color: #495057;
    }

.field-hint {
    font-size: 0.72rem;
    color: #adb5bd;
}

.password-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.83rem;
}

.password-actions {
    display: flex;
    margin-top: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, #004aad 0%, #0063d1 100%);
    color: white;
    border: none;
    padding: 10px 26px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 74, 173, 0.3);
}

    .btn-primary:hover:not(:disabled) {
        box-shadow: 0 5px 16px rgba(0, 74, 173, 0.4);
        transform: translateY(-1px);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }
