/* Sidebar scrollbar — discreta, alinhada ao tema escuro */
.platform-sidebar__nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.platform-sidebar__nav::-webkit-scrollbar {
    width: 6px;
}

.platform-sidebar__nav::-webkit-scrollbar-track {
    background: transparent;
}

.platform-sidebar__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.platform-sidebar__nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* OTP — caixas por dígito */
.otp-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.otp-input-group input.otp-cell {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    border: 2px solid var(--osh-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    padding: 0;
}

.otp-input-group input.otp-cell:focus {
    outline: none;
    border-color: var(--osh-orange, #F36E21);
    box-shadow: 0 0 0 3px rgba(243, 110, 33, 0.15);
}

.otp-input-group input.otp-cell.is-filled {
    border-color: #94a3b8;
}

.otp-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Força de senha */
.password-strength {
    margin-top: 8px;
}

.password-strength__bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength__fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.2s, background 0.2s;
}

.password-strength__label {
    font-size: 12px;
    color: #64748b;
}

.password-strength__checks {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.password-strength__checks li.is-ok {
    color: #16a34a;
}

.password-strength__checks li.is-ok::before {
    content: '✓ ';
}

/* Notificações navbar */
.platform-notifications {
    position: relative;
}

.platform-notifications__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
}

.platform-notifications__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 92vw);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    z-index: 1200;
    max-height: 420px;
    overflow: hidden;
    flex-direction: column;
}

.platform-notifications__dropdown:not([hidden]) {
    display: flex;
}

.platform-notifications__dropdown[hidden],
.platform-search__results[hidden] {
    display: none !important;
}

.platform-notifications__header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.platform-notifications__list {
    overflow-y: auto;
    max-height: 340px;
}

.platform-notifications__item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f8fafc;
}

.platform-notifications__item:hover {
    background: #f8fafc;
}

.platform-notifications__item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.platform-notifications__item-body {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.platform-notifications__empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* Busca funcional */
.platform-search__input:not(:disabled) {
    opacity: 1;
}

.platform-search__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1100;
}

.platform-search__result {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
}

.platform-search__result:hover {
    background: #f8fafc;
}

.platform-search__result-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.platform-search__result-label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.platform-search__result-sub {
    font-size: 12px;
    color: #64748b;
}

.platform-search__hint {
    display: none;
}

/* Perfil / team layout */
.platform-profile-page {
    width: 100%;
}

.platform-profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.platform-profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.platform-profile-forms {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1100px) {
    .platform-profile-forms {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

.platform-profile-page .platform-panel--form {
    max-width: none;
    height: 100%;
}

.platform-profile-section__head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--osh-border, #e2e8f0);
}

.platform-profile-section__head .platform-panel__subtitle {
    margin-bottom: 0;
}

.platform-profile-card {
    position: sticky;
    top: 20px;
    padding: 0;
    overflow: hidden;
}

.platform-profile-card__header {
    text-align: center;
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--osh-border, #e2e8f0);
    background: linear-gradient(180deg, rgba(243, 110, 33, 0.06) 0%, transparent 100%);
}

.platform-profile-card__name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--osh-text, #0f172a);
    line-height: 1.3;
}

.platform-profile-card__role {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--osh-text-muted, #64748b);
}

.platform-profile-card__email {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--osh-text-muted, #64748b);
    word-break: break-word;
}

.platform-profile-card__meta {
    padding: 20px 24px;
    margin: 0;
    text-align: left;
}

.platform-profile-card__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 24px;
}

.platform-profile-audit .platform-table-wrap {
    margin-top: 4px;
}

.platform-avatar--lg {
    width: 80px;
    height: 80px;
    font-size: 28px;
    margin: 0 auto 16px;
}

.platform-dl--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

@media (max-width: 700px) {
    .platform-dl--two-col {
        grid-template-columns: 1fr;
    }
}

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

    .platform-profile-card {
        position: static;
    }
}

.platform-code-block {
    font-size: 11px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
}

/* Modo TV */
.platform-tv-shell {
    min-height: 100vh;
    background: #0f172a;
    color: #f8fafc;
}

.platform-tv-frame {
    width: 100%;
    height: 100vh;
    border: 0;
    background: #f4f6f9;
}

.platform-tv-badge {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    z-index: 9999;
}

.platform-tv-slide {
    padding: 24px;
    min-height: 100vh;
    background: var(--osh-body-bg, #f4f6f9);
}

.platform-user-menu__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
}

.platform-user-menu__link:hover {
    background: #f8fafc;
}

.platform-kpi-card__meta.is-down {
    color: #ef4444;
}

.platform-sidebar__profile--link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 8px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.platform-sidebar__profile--link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.platform-password-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .platform-password-row {
        grid-template-columns: 1fr;
    }
}

.platform-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.platform-password-wrap .platform-input,
.platform-password-wrap .auth-input {
    padding-right: 44px;
    width: 100%;
}

.platform-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    line-height: 0;
}

.platform-password-toggle:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
}

.password-strength--below {
    margin-top: 12px;
}

.platform-form__section {
    border: none;
    margin: 0 0 28px;
    padding: 0;
}

.platform-form__legend {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.auth-password-row {
    margin-bottom: 0;
}

.platform-form__section-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Utilitários (CSP strict — sem style= inline) */
.platform-mt-1 { margin-top: 1rem; }
.platform-mb-1 { margin-bottom: 1rem; }
.platform-inline { display: inline; }
.platform-kpi-card__value--md { font-size: 1.5rem; }
.platform-input--qty { max-width: 5rem; }
.platform-input--amount { max-width: 7rem; }
.platform-code--scroll { white-space: pre-wrap; max-height: 480px; overflow: auto; }

.cust-color[data-cust-value="#F36E21"] { background: #F36E21; }
.cust-color[data-cust-value="#6366f1"] { background: #6366f1; }
.cust-color[data-cust-value="#3b82f6"] { background: #3b82f6; }
.cust-color[data-cust-value="#10b981"] { background: #10b981; }
.cust-color[data-cust-value="#a855f7"] { background: #a855f7; }
.cust-color[data-cust-value="#ef4444"] { background: #ef4444; }
