/* ===== Profile Section ===== */
/* Design tokens: same as docs-page.css / dashboard.css */

/* Layout */
.profile-wrap {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 24px 80px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* ===== Sidebar ===== */
.profile-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.profile-sidebar-nav {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-sidebar-section {
    padding: 12px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8a95a5;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #3a4a5e;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-nav-item:hover {
    background: #f0f2f7;
    color: #12294B;
    text-decoration: none;
}

.profile-nav-item--active {
    background: #12294B;
    color: #ffffff;
}

.profile-nav-item--active:hover {
    background: #1a3460;
    color: #ffffff;
}

.profile-nav-item--active svg {
    opacity: 1;
}

.profile-nav-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.profile-nav-item--active svg {
    opacity: 0.9;
}

.profile-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== Content area ===== */
.profile-content {
    flex: 1;
    min-width: 0;
}

.profile-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #12294B;
    margin: 0 0 24px;
}

/* Cards */
.profile-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    padding: 28px;
    margin-bottom: 20px;
}

.profile-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #12294B;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card-title svg {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

/* ===== Form elements ===== */
.profile-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-form-row--full {
    grid-template-columns: 1fr;
}

.profile-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-form-group--full {
    grid-column: 1 / -1;
}

.profile-label {
    font-size: 13px;
    font-weight: 600;
    color: #5a6a7e;
}

.profile-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e0e6ee;
    background: #f8f9fb;
    font-size: 14px;
    color: #12294B;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

.profile-input:focus {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.1);
    background: #ffffff;
}

.profile-input:disabled,
.profile-input[readonly] {
    background: #f0f2f7;
    color: #8a95a5;
    cursor: not-allowed;
}

.profile-input::placeholder {
    color: #a0aab8;
    font-weight: 400;
}

/* Select */
.profile-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e0e6ee;
    background: #f8f9fb;
    font-size: 14px;
    color: #12294B;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%235a6a7e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.profile-select:focus {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.1);
}

/* Textarea */
.profile-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e0e6ee;
    background: #f8f9fb;
    font-size: 14px;
    color: #12294B;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.profile-textarea:focus {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.1);
    background: #ffffff;
}

/* ===== Avatar ===== */
.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f2f7;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid rgba(18, 41, 75, 0.08);
    cursor: pointer;
    transition: border-color 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-img:hover {
    border-color: #3657CD;
    opacity: 0.9;
}

.profile-avatar-img svg {
    width: 32px;
    height: 32px;
    color: #8a95a5;
}

.profile-avatar-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    opacity: 0;
}

.profile-avatar-wrap:hover .profile-avatar-remove {
    opacity: 1;
}

.profile-avatar-remove:hover {
    background: #fce4ec;
    border-color: #e53935;
}

.profile-avatar-remove svg {
    width: 14px;
    height: 14px;
    color: #e53935;
}

.profile-avatar-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-avatar-name {
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
}

.profile-avatar-hint {
    font-size: 13px;
    color: #8a95a5;
}

.profile-avatar-warning {
    font-size: 13px;
    color: #e53935;
    margin-top: 4px;
}

/* ===== Buttons ===== */
.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.profile-btn:hover {
    text-decoration: none;
    opacity: 0.9;
}

.profile-btn:active {
    transform: scale(0.98);
}

.profile-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.profile-btn--primary {
    background: linear-gradient(135deg, #3657CD 0%, #12294B 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.15);
}

.profile-btn--primary:hover {
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 41, 75, 0.25);
}

.profile-btn--secondary {
    background: #f0f2f7;
    color: #12294B;
}

.profile-btn--secondary:hover {
    background: #e4e8f0;
    color: #12294B;
}

.profile-btn--outline {
    background: transparent;
    color: #3657CD;
    border: 1px solid #e0e6ee;
}

.profile-btn--outline:hover {
    background: #f8f9fb;
    color: #3657CD;
    border-color: #3657CD;
}

.profile-btn--danger {
    background: transparent;
    color: #e53935;
    border: 1px solid #fce4ec;
}

.profile-btn--danger:hover {
    background: #fce4ec;
    color: #d32f2f;
}

.profile-btn--block {
    width: 100%;
}

.profile-btn--sm {
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.profile-btn--lg {
    padding: 12px 32px;
    font-size: 15px;
}

/* ===== Checkbox ===== */
.profile-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #12294B;
    cursor: pointer;
    flex-shrink: 0;
}

.profile-check-label {
    font-size: 14px;
    color: #3a4a5e;
    cursor: pointer;
}

/* ===== Status chips ===== */
.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.profile-status--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.profile-status--warning {
    background: #fff8e1;
    color: #e65100;
}

.profile-status--danger {
    background: #fce4ec;
    color: #d32f2f;
}

.profile-status--info {
    background: #e3f2fd;
    color: #1565c0;
}

.profile-status--neutral {
    background: #f0f2f7;
    color: #5a6a7e;
}

/* ===== Table ===== */
.profile-table-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.04);
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.profile-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #8a95a5;
    background: #f8f9fb;
    border-bottom: 1px solid rgba(18, 41, 75, 0.06);
}

.profile-table td {
    padding: 14px 20px;
    color: #3a4a5e;
    border-bottom: 1px solid rgba(18, 41, 75, 0.04);
}

.profile-table tr:last-child td {
    border-bottom: none;
}

.profile-table tr:hover td {
    background: #f8f9fb;
}

/* ===== Empty state ===== */
.profile-empty {
    text-align: center;
    padding: 48px 24px;
    color: #8a95a5;
}

.profile-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.profile-empty-text {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #5a6a7e;
}

.profile-empty-hint {
    font-size: 13px;
    color: #8a95a5;
}

/* ===== Toast ===== */
.profile-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.profile-toast--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.profile-toast--success {
    background: #2e7d32;
}

.profile-toast--danger {
    background: #d32f2f;
}

/* ===== Docs badge ===== */
.profile-docs-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1a56db;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.profile-docs-badge:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* ===== Role select colors ===== */
.profile-role-select--leader {
    background: #fff8e1;
    border-color: #ffe082;
    color: #e65100;
    font-weight: 600;
}

.profile-role-select--member {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
    font-weight: 500;
}

/* ===== Upload area ===== */
.profile-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed #e0e6ee;
    border-radius: 12px;
    background: #f8f9fb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: #5a6a7e;
    font-size: 14px;
}

.profile-upload:hover {
    border-color: #3657CD;
    background: #f0f4ff;
    color: #3657CD;
}

.profile-upload svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* ===== Stat cards (balance page) ===== */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.profile-stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    padding: 20px;
    text-align: center;
}

.profile-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #12294B;
    line-height: 1.2;
}

.profile-stat-label {
    font-size: 13px;
    color: #8a95a5;
    margin-top: 4px;
}

/* ===== Member card ===== */
.profile-member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    transition: box-shadow 0.2s;
}

.profile-member-card:hover {
    box-shadow: 0 4px 12px rgba(18, 41, 75, 0.06);
}

.profile-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f2f7;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #5a6a7e;
}

.profile-member-info {
    flex: 1;
    min-width: 0;
}

.profile-member-name {
    font-size: 14px;
    font-weight: 600;
    color: #12294B;
}

.profile-member-meta {
    font-size: 13px;
    color: #8a95a5;
}

.profile-member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== Request card (phone permissions) ===== */
.profile-request-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fb;
    border-radius: 12px;
    border: 1px solid rgba(18, 41, 75, 0.06);
    margin-bottom: 10px;
}

.profile-request-info {
    flex: 1;
    min-width: 0;
}

.profile-request-name {
    font-size: 14px;
    font-weight: 600;
    color: #12294B;
}

.profile-request-detail {
    font-size: 13px;
    color: #5a6a7e;
    margin-top: 2px;
}

.profile-request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== Password validation ===== */
.profile-password-rules {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.profile-password-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8a95a5;
    transition: color 0.2s;
}

.profile-password-rule--valid {
    color: #2e7d32;
}

.profile-password-rule svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ===== Divider ===== */
.profile-divider {
    height: 1px;
    background: rgba(18, 41, 75, 0.06);
    margin: 20px 0;
    border: none;
}

/* ===== Info row ===== */
.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(18, 41, 75, 0.04);
}

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

.profile-info-label {
    font-size: 14px;
    color: #8a95a5;
}

.profile-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #12294B;
}

/* ===== API key item ===== */
.profile-api-key {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fb;
    border-radius: 10px;
    margin-bottom: 8px;
}

.profile-api-key-name {
    font-size: 14px;
    font-weight: 600;
    color: #12294B;
}

.profile-api-key-value {
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: #5a6a7e;
    background: #e8ecf2;
    padding: 4px 10px;
    border-radius: 6px;
    user-select: all;
}

.profile-api-key-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.profile-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    color: #5a6a7e;
}

.profile-icon-btn:hover {
    background: #f0f2f7;
    color: #12294B;
}

.profile-icon-btn--danger:hover {
    background: #fce4ec;
    color: #e53935;
}

/* ===== Modal (profile context) ===== */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 41, 75, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.profile-modal-overlay--visible {
    display: flex;
}

.profile-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(18, 41, 75, 0.15);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
}

.profile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f2f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    color: #5a6a7e;
}

.profile-modal-close:hover {
    background: #e4e8f0;
    color: #12294B;
}

.profile-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
    margin: 0 0 20px;
    padding-right: 40px;
}

.profile-modal--sm { max-width: 400px; }
.profile-modal--md { max-width: 420px; }
.profile-modal--lg { max-width: 520px; }
.profile-modal--xl { max-width: 560px; }
.profile-modal-title--center { text-align: center; padding-right: 0; }
.profile-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}
.profile-modal-actions--center { justify-content: center; }
.profile-modal-body { font-size: 14px; color: #3a4a5e; line-height: 1.6; }
.profile-modal-saved-label { opacity: 0; transition: opacity 0.3s; text-align: center; margin-bottom: 12px; }
.profile-user-list { overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 8px; }
.profile-user-item { display: flex; flex-direction: column; gap: 4px; }
.profile-user-item-row { display: flex; justify-content: space-between; align-items: center; }
.profile-user-name { font-size: 14px; color: #12294B; font-weight: 500; }
.profile-api-key-display { display: block; text-align: center; padding: 10px; font-size: 14px; }

/* Utility */
.profile-m-0 {
    margin: 0;
}

.profile-link {
    color: #3657CD;
    font-weight: 600;
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.profile-saved-indicator {
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 11px;
    padding: 2px 8px;
}

/* Field helpers */
.profile-field {
    margin-bottom: 16px;
}

.profile-field-error {
    font-size: 13px;
    color: #d32f2f;
    margin-top: 4px;
}

.profile-field-notice {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

.profile-field-notice--info {
    background: #e8eaf6;
    color: #283593;
}

.profile-field-notice--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.profile-hint {
    font-size: 13px;
    color: #5a6a7e;
    margin-top: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .profile-wrap {
        padding: 90px 16px 60px;
        gap: 24px;
    }

    .profile-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .profile-wrap {
        flex-direction: column;
        padding: 80px 16px 60px;
    }

    .profile-sidebar {
        width: 100%;
        position: static;
    }

    .profile-sidebar-nav {
        flex-direction: column;
        gap: 2px;
        padding: 6px;
    }

    .profile-sidebar-section {
        font-size: 11px;
        padding: 6px 12px 2px;
    }

    .profile-nav-item {
        padding: 10px 14px;
        font-size: 14px;
    }

    .profile-nav-item svg {
        width: 18px;
        height: 18px;
    }

    .profile-card {
        padding: 20px;
    }

    .profile-form-row {
        grid-template-columns: 1fr;
    }

    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

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

    .profile-member-card {
        flex-wrap: wrap;
    }

    .profile-request-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-request-actions {
        width: 100%;
    }

    .profile-request-actions .profile-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .profile-stats-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Utility ===== */
.profile-mt-0 { margin-top: 0; }
.profile-mt-8 { margin-top: 8px; }
.profile-mt-12 { margin-top: 12px; }
.profile-mt-16 { margin-top: 16px; }
.profile-mt-24 { margin-top: 24px; }
.profile-mb-0 { margin-bottom: 0; }
.profile-mb-8 { margin-bottom: 8px; }
.profile-mb-16 { margin-bottom: 16px; }
.profile-gap-8 { gap: 8px; }
.profile-gap-16 { gap: 16px; }
.profile-flex { display: flex; }
.profile-flex-col { flex-direction: column; }
.profile-flex-center { align-items: center; }
.profile-flex-between { justify-content: space-between; }
.profile-flex-end { justify-content: flex-end; }
.profile-text-center { text-align: center; }
.profile-text-muted { color: #8a95a5; font-size: 13px; }
.profile-text-sm { font-size: 14px; color: #3a4a5e; }
.profile-card-title--sm { font-size: 14px; }
.profile-input-wrap { position: relative; }
.profile-pass-toggle { position: absolute; right: 14px; top: 11px; cursor: pointer; }
.profile-pass-toggle.hide-pass { display: none; }
.profile-hidden { display: none !important; }

/* ===== File upload zone ===== */
.profile-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 20px;
    border: 2px dashed #e0e6ee;
    border-radius: 12px;
    background: #f8f9fb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.profile-upload-zone:hover {
    border-color: #b0bdd0;
    background: #f0f4ff;
}

.profile-upload-zone--active {
    border-color: #3657CD;
    background: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.08);
}

.profile-upload-zone-icon {
    width: 32px;
    height: 32px;
    color: #8a95a5;
}

.profile-upload-zone:hover .profile-upload-zone-icon,
.profile-upload-zone--active .profile-upload-zone-icon {
    color: #3657CD;
}

.profile-upload-zone-text {
    font-size: 14px;
    color: #5a6a7e;
}

.profile-upload-zone-link {
    color: #3657CD;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(54, 87, 205, 0.3);
}

.profile-upload-zone:hover .profile-upload-zone-link {
    text-decoration-color: #3657CD;
}

.profile-upload-zone-hint {
    font-size: 12px;
    color: #a0aab8;
}

.profile-upload-zone-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 4px 12px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1565c0;
}

/* File item (uploaded) */
.profile-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f9fb;
    border-radius: 10px;
    border: 1px solid rgba(18, 41, 75, 0.04);
    transition: background 0.15s;
}

.profile-file-item:hover {
    background: #f0f2f7;
}

.profile-file-icon {
    color: #8a95a5;
    flex-shrink: 0;
}

.profile-file-name {
    flex: 1;
    font-size: 14px;
    color: #3a4a5e;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-file-item .profile-icon-btn {
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.profile-file-item:hover .profile-icon-btn {
    opacity: 1;
}

/* ===== Role selector (group edit modal) ===== */
.profile-role-selector {
    position: relative;
    display: inline-block;
    margin-top: 4px;
}

.profile-role-selected {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.profile-role-selected svg {
    color: #8a95a5;
    transition: transform 0.2s;
}

.profile-role-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid rgba(18, 41, 75, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(18, 41, 75, 0.1);
    z-index: 100;
    min-width: 110px;
    overflow: hidden;
}

.profile-role-option {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #3a4a5e;
    cursor: pointer;
    transition: background 0.1s;
}

.profile-role-option:hover {
    background: #f0f2f7;
}

.profile-role-option[data-color="warning"]:hover {
    background: #fff8e1;
    color: #e65100;
}

.profile-role-option[data-color="info"]:hover {
    background: #e3f2fd;
    color: #1565c0;
}

/* ===== Select2 overrides ===== */
.profile-content .select2-container--default .select2-selection--single {
    height: 42px;
    padding: 6px 14px;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #f8f9fb;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #12294B;
    line-height: 28px;
    padding-left: 0;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a0aab8;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 10px;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #8a95a5 transparent transparent transparent;
}

.profile-content .select2-container--default.select2-container--focus .select2-selection--single,
.profile-content .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.1);
    background: #ffffff;
}

.profile-content .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #3657CD transparent;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__clear {
    color: #8a95a5;
    font-size: 18px;
    margin-right: 4px;
}

.profile-content .select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #e53935;
}

/* Dropdown */
.select2-container--default .select2-dropdown {
    border: 1px solid #e0e6ee;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(18, 41, 75, 0.12);
    overflow: hidden;
    margin-top: 4px;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px 12px;
    background: #f8f9fb;
    border-bottom: 1px solid rgba(18, 41, 75, 0.06);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e0e6ee;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #12294B;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.1);
}

.select2-container--default .select2-results__option {
    padding: 10px 14px;
    font-size: 14px;
    color: #3a4a5e;
    transition: background 0.1s;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #12294B;
    color: #ffffff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: #f0f4ff;
    color: #3657CD;
    font-weight: 600;
}

.select2-container--default .select2-results__option--highlighted[aria-selected=true] {
    background: #12294B;
    color: #ffffff;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 240px;
}

.select2-container--default .select2-results__message {
    padding: 10px 14px;
    font-size: 13px;
    color: #8a95a5;
}