/* Profile module */

/* Header card */
.profile-header-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-header-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-600);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

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

.profile-header-info {
    flex: 1;
    min-width: 200px;
}

.profile-header-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-header-name-row h3 {
    margin: 0;
}

.profile-header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-header-meta i {
    margin-right: 0.25rem;
}

.profile-header-actions {
    flex-shrink: 0;
}

/* Metric row */
.profile-metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.profile-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: var(--primary-50);
    color: var(--primary-600);
}

.profile-metric-icon.rating {
    background: #fef3c7;
    color: #b45309;
}

.profile-metric-icon.status-on {
    background: #dcfce7;
    color: var(--success);
}

.profile-metric-icon.status-off {
    background: #fee2e2;
    color: var(--error);
}

.profile-metric-body {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.profile-metric-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.profile-metric-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Two-column layout */
.profile-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Info grid (reused inside Business Details / Account Status) */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

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

.info-item label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-subsection {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.profile-subsection h5 {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
}

.profile-hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.profile-hours-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-hours-day {
    font-weight: 500;
}

/* KYC & documents */
.profile-kyc-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-kyc-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.profile-kyc-label {
    flex: 1;
    font-weight: 500;
}

.profile-kyc-value {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Delivery & Ops */
.profile-ops-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-ops-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-ops-label {
    font-weight: 600;
}

/* Toggle switch */
.profile-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.profile-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.profile-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.profile-toggle input:checked + .profile-toggle-slider {
    background: var(--success);
}

.profile-toggle input:checked + .profile-toggle-slider::before {
    transform: translateX(20px);
}

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

    .profile-metric-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .profile-header-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-header-meta {
        justify-content: center;
    }

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