/* ---- Credentials / Certifications (Business only) ---- */

.page-subtitle {
    margin: -8px 0 16px;
    font-size: 0.85rem;
    color: var(--app-text-muted);
}

.credential-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credential-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    padding: 14px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: inherit;
}

.credential-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ui-primary-muted);
    color: var(--ui-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.credential-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.credential-list-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--app-text);
}

.credential-list-sub {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.credential-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.credential-badge--active {
    background: rgba(111, 214, 127, 0.18);
    color: #6fd67f;
}

.credential-badge--expiring {
    background: rgba(245, 190, 88, 0.2);
    color: #f5be58;
}

.credential-badge--expired {
    background: rgba(248, 113, 113, 0.15);
    color: var(--ui-danger);
}

/* Document preview */

.document-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ui-primary-muted);
    border: 1px dashed var(--ui-primary);
    border-radius: var(--app-radius-lg);
    padding: 32px 16px;
    margin-bottom: 16px;
    text-decoration: none;
}

.document-preview--empty {
    cursor: default;
}

.document-preview-icon {
    font-size: 2.2rem;
    color: var(--ui-primary);
}

.document-preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ui-primary);
}

.document-preview--image img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    object-fit: contain;
}

/* Detail rows */

.credential-detail-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.credential-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--app-border);
}

.credential-detail-label {
    font-size: 0.85rem;
    color: var(--app-text-muted);
}

.credential-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text);
    text-align: right;
}

.credential-scope-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 14px;
    font-size: 0.88rem;
    color: var(--app-text-secondary);
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* Notifications toggle */

.credential-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 14px;
    margin-bottom: 20px;
}

.credential-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.credential-toggle-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text);
}

.credential-toggle-sub {
    font-size: 0.78rem;
    color: var(--app-text-muted);
}

.credential-toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.credential-toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.credential-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--app-border);
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.credential-toggle-track::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}

.credential-toggle-switch input:checked + .credential-toggle-track {
    background: var(--ui-primary);
}

.credential-toggle-switch input:checked + .credential-toggle-track::before {
    transform: translateX(20px);
}

/* Upload */

.credential-upload-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.credential-upload-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.credential-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
