/* ==========================================================================
   Theme5 — Ambiente do Aluno
   Paleta e tipografia próprias; ver `app/templates/theme5/js/custom.js` para o
   comportamento do sidebar mobile e do badge de mensagens.
   ========================================================================== */

:root {
    --t5-bg: #EAF2FC;
    --t5-surface: #FFFFFF;
    --t5-ink: #1F2A44;
    --t5-muted: #7C8AA6;
    --t5-accent: #F0873B;
    --t5-accent-dark: #D96F24;
    --t5-teal: #1FA9A4;
    --t5-border: #E3EAF7;
    --t5-radius: 14px;
    --t5-radius-sm: 8px;
    --t5-shadow: 0 12px 28px -12px rgba(31, 42, 68, 0.18);
    --t5-sidebar-w: 240px;
}

body.theme5-login,
body.theme5-shell {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--t5-ink);
    background: var(--t5-bg);
}

body.theme5-login *,
body.theme5-shell * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------
   Login
   -------------------------------------------------------------------- */

body.theme5-login {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.t5-login-grid {
    display: flex;
    width: min(1360px, 100%);
    min-height: min(650px, calc(100vh - 96px));
    overflow: hidden;
    border-radius: 28px;
    background: var(--t5-surface);
    box-shadow: var(--t5-shadow);
}

.t5-login-form-side {
    flex: 0 0 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(40px, 4vw, 72px);
    background: var(--t5-surface);
}

.t5-login-form-side #login-wrapper {
    width: 100%;
    max-width: 360px;
    margin: 0 auto !important;
}

.t5-login-illustration-side {
    flex: 1 1 58%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 45% 40%, #FDEEDF 0%, var(--t5-bg) 62%);
    overflow: hidden;
}

.t5-login-illustration-side img {
    width: min(70%, 460px);
    height: auto;
}

body.t5-public-form .t5-login-illustration-side {
    display: none;
}

body.t5-public-form .t5-login-grid {
    width: 100%;
}

body.t5-public-form .t5-login-form-side {
    flex: 1 1 100%;
    width: 100%;
}

body.t5-public-form #adianti_div_content {
    width: 100%;
}

body.t5-public-form .toggle-wrapper .btn-group {
    gap: 6px;
}

body.t5-public-form .toggle-wrapper .btn-check + label {
    border: 1px solid #8B9BB3;
    border-radius: 6px !important;
    background: #F4F7FC;
    color: var(--t5-ink);
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
}

body.t5-public-form .toggle-wrapper .btn-check:checked + label {
    border-color: #1456B8;
    background: #1456B8;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(20, 86, 184, .2);
}

body.t5-public-form .toggle-wrapper .btn-check:focus-visible + label {
    outline: 2px solid #1456B8;
    outline-offset: 2px;
}

body.t5-public-form .toggle-wrapper .form-check-input {
    accent-color: #1456B8;
}

@media (max-width: 991px) {
    .t5-login-illustration-side { display: none; }
    body.theme5-login { padding: 24px; }
    .t5-login-grid {
        width: min(520px, 100%);
        min-height: calc(100vh - 48px);
    }
    .t5-login-form-side { flex: 1 1 auto; width: 100%; }
}

@media (max-width: 575px) {
    body.theme5-login { padding: 0; }
    .t5-login-grid {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    .t5-login-form-side { padding: 32px 24px; }
}

/* Geduc logo + store badges already come from LoginForm.class.php markup */
.t5-login-form-side #login-wrapper > img,
.t5-login-form-side #login-wrapper table {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

.t5-escola-toggle {
    display: flex;
    gap: 8px;
    margin: 18px 0 22px;
}

.t5-escola-toggle button {
    flex: 1;
    border: 1px solid var(--t5-border);
    background: var(--t5-surface);
    color: var(--t5-muted);
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 6px;
    border-radius: 999px;
    cursor: default;
}

.t5-escola-toggle button.t5-active {
    background: var(--t5-accent);
    border-color: var(--t5-accent);
    color: #fff;
    cursor: pointer;
}

.t5-escola-toggle button[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Adianti form widgets rendered by BootstrapFormBuilderLogin */
body.theme5-login .card.panel {
    box-shadow: none !important;
    border: none !important;
}

body.theme5-login .card-body.panel-body {
    padding: 0 !important;
}

body.theme5-login .login-avatar {
    display: none !important; /* icons rebuilt with CSS ::before, see below */
}

body.theme5-login .fb-inline-field-container.form-line {
    position: relative;
    width: 100% !important;
    margin-bottom: 14px;
}

body.theme5-login .fb-inline-field-container.form-line .form-control {
    width: 100% !important;
    height: 46px !important;
    padding: 0 16px 0 42px !important;
    border: 1px solid var(--t5-border) !important;
    border-radius: var(--t5-radius-sm) !important;
    font-size: 14px;
    color: var(--t5-ink);
    float: none !important;
}

body.theme5-login .fb-inline-field-container.form-line .form-control:focus {
    outline: none;
    border-color: var(--t5-accent) !important;
    box-shadow: 0 0 0 3px rgba(240, 135, 59, 0.15);
}

/* field rows: [icon span][input] — icon span is hidden, we draw our own via the row wrapper */
body.theme5-login .form-group.tformrow {
    position: relative;
}

body.theme5-login .form-group.tformrow::before {
    font-family: 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    position: absolute;
    left: 14px;
    top: 12px;
    color: var(--t5-muted);
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
}

/* Pré-matrícula e recuperação de senha usam o mesmo canvas do login, mas
   possuem pares legados de ícone/campo e uma quantidade maior de linhas. */
body.theme5-login #login-wrapper .form-group.tformrow {
    display: flex;
    align-items: center;
    width: 100%;
}

body.theme5-login #login-wrapper .form-group.tformrow > .login-avatar {
    flex: 0 0 42px;
    margin-left: 0 !important;
}

body.theme5-login #login-wrapper .form-group.tformrow > .login-avatar + * {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
}

body.theme5-login #login-wrapper h3,
body.theme5-login #login-wrapper h4 {
    margin: 8px 0 20px;
    color: var(--t5-ink);
    text-align: center;
}

body.theme5-login #login-wrapper [style*="padding-left"] {
    padding-left: 0 !important;
    width: 100%;
    text-align: center !important;
}

body.theme5-login .form-group.tformrow:has(select[name="ESTADO"])::before { content: "\f57d"; } /* Estado — globe/map */
body.theme5-login .form-group.tformrow:has(select[name="CIDADE"])::before { content: "\f3c5"; } /* Cidade — pin */
body.theme5-login .form-group.tformrow:has(input[name="login"])::before { content: "\f007"; } /* Usuário */
body.theme5-login .form-group.tformrow:has(input[name="password"])::before { content: "\f084"; } /* Senha */

body.theme5-login a[href*="SystemRequestPasswordResetForm"] {
    color: var(--t5-muted);
    font-size: 13px;
    text-decoration: underline;
}

body.theme5-login button[type="submit"],
body.theme5-login input[type="submit"] {
    background: var(--t5-accent) !important;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    letter-spacing: .03em;
    transition: background-color .15s ease;
}

body.theme5-login button[type="submit"]:hover,
body.theme5-login input[type="submit"]:hover {
    background: var(--t5-accent-dark) !important;
}

/* --------------------------------------------------------------------
   Shell (logged-in layout)
   -------------------------------------------------------------------- */

body.theme5-shell {
    margin: 0;
    min-height: 100vh;
}

.t5-shell {
    display: flex;
    min-height: 100vh;
}

.t5-sidebar {
    flex: 0 0 var(--t5-sidebar-w);
    background: var(--t5-surface);
    border-right: 1px solid var(--t5-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--t5-sidebar-w);
    z-index: 40;
    transition: transform .2s ease;
}

.t5-sidebar-brand {
    padding: 22px 20px 8px;
    text-align: left;
}

.t5-sidebar-brand img {
    max-width: 130px;
    height: auto;
}

.t5-sidebar-escola {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--t5-teal);
    padding: 2px 16px 16px;
    line-height: 1.3;
}

.t5-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px;
}

/* AdiantiMenuBuilder's default branch renders <ul class="list"> with two
   throwaway <li> ("active" + "header MENU") before the real items. */
.t5-sidebar-nav ul.list {
    list-style: none;
    margin: 0;
    padding: 0;
    height: auto !important;
    overflow: visible !important;
}

.t5-sidebar-nav ul.list > li.active,
.t5-sidebar-nav ul.list > li.header {
    display: none;
}

.t5-sidebar-nav ul.list > li {
    margin-bottom: 2px;
}

.t5-sidebar-nav ul.list > li > a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--t5-radius-sm);
    color: var(--t5-ink);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.t5-sidebar-nav .t5-menu-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    line-height: 1.15;
}

.t5-sidebar-nav .t5-menu-description {
    display: block;
    margin-top: 3px;
    color: var(--t5-muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.15;
}

.t5-sidebar-nav ul.list > li > a:hover {
    background: var(--t5-bg);
}

.t5-sidebar-nav ul.list > li > a.t5-active {
    background: #FEF1E6;
    border-left-color: var(--t5-accent);
    color: var(--t5-accent-dark);
}

.t5-sidebar-nav ul.list > li > a i {
    width: 18px;
    text-align: center;
    color: var(--t5-teal);
    font-size: 15px;
    margin-top: 2px;
}

.t5-sidebar-nav ul.list > li > a.t5-active i {
    color: var(--t5-accent);
}

.t5-sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--t5-border);
}

.t5-sidebar-user .t5-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--t5-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.t5-sidebar-user .t5-user-meta {
    flex: 1;
    min-width: 0;
}

.t5-sidebar-user .t5-user-meta .t5-user-name {
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t5-sidebar-user .t5-user-meta .t5-user-role {
    font-size: 11px;
    color: var(--t5-muted);
}

.t5-sidebar-user .t5-user-meta .t5-user-version {
    font-size: 10px;
    color: var(--t5-muted);
}

.t5-sidebar-user a.t5-settings {
    color: var(--t5-muted);
    font-size: 15px;
}

.t5-sidebar-user a.t5-settings:hover {
    color: var(--t5-accent);
}

.t5-settings-wrapper {
    position: relative;
}

.t5-settings-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--t5-surface);
    border: 1px solid var(--t5-border);
    border-radius: var(--t5-radius-sm);
    box-shadow: var(--t5-shadow);
    min-width: 170px;
    z-index: 20;
    overflow: hidden;
}

.t5-settings-menu.t5-settings-menu-open {
    display: block;
}

.t5-settings-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--t5-ink);
    text-decoration: none;
}

.t5-settings-menu a:hover {
    background: var(--t5-bg);
}

.t5-settings-message {
    display: block;
}

.t5-settings-message:empty {
    display: none;
}

.t5-settings-message a {
    position: relative;
}

.t5-settings-message a::after {
    content: "Mensagens";
}

.t5-settings-message a i {
    width: 14px;
    text-align: center;
}

/* content area */

.t5-content {
    margin-left: var(--t5-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 28px 28px;
}

.t5-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 0 4px;
}

.t5-topbar .t5-user-line {
    margin-right: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--t5-ink);
}

.t5-topbar-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t5-muted);
    text-decoration: none;
    position: relative;
}

.t5-topbar-icon:hover {
    background: var(--t5-surface);
    color: var(--t5-accent);
}

.t5-topbar-icon i { font-size: 13px; }

#aluno_messages_badge a { color: var(--t5-ink) !important; }
#aluno_messages_badge a:hover { color: var(--t5-ink) !important; }

.t5-content-mobile-toggle {
    display: none;
}

.t5-panel {
    background: var(--t5-surface);
    border-radius: var(--t5-radius);
    box-shadow: var(--t5-shadow);
    padding: 24px;
    flex: 1;
    min-width: 0;
}

body.theme5-shell .t5-panel {
    margin-top: 5px;
}

/* --------------------------------------------------------------------
   Adianti compatibility

   Keep legacy pages inside the theme5 content column. Components may still
   define their own visual style; these rules only normalize structure,
   sizing and overflow in the shell.
   -------------------------------------------------------------------- */

body.theme5-shell #adianti_div_content,
body.theme5-shell #adianti_div_content > div,
body.theme5-shell #adianti_div_content > table,
body.theme5-shell #adianti_div_content .tform,
body.theme5-shell #adianti_div_content .panel,
body.theme5-shell #adianti_div_content .card,
body.theme5-shell #adianti_div_content form {
    max-width: 100%;
}

body.theme5-shell #adianti_div_content > .container,
body.theme5-shell #adianti_div_content > .container-fluid,
body.theme5-shell #adianti_div_content > .row {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.theme5-shell #adianti_div_content .panel,
body.theme5-shell #adianti_div_content .card,
body.theme5-shell #adianti_div_content .tform {
    margin-left: 0;
    margin-right: 0;
}

body.theme5-shell #adianti_div_content .panel-body,
body.theme5-shell #adianti_div_content .card-body,
body.theme5-shell #adianti_div_content .panel-footer,
body.theme5-shell #adianti_div_content .card-footer {
    min-width: 0;
    max-width: 100%;
}

body.theme5-shell #adianti_div_content .panel-body,
body.theme5-shell #adianti_div_content .card-body,
body.theme5-shell #adianti_div_content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.theme5-shell #adianti_div_content table {
    max-width: 100%;
}

body.theme5-shell #adianti_div_content table.tdatagrid_table,
body.theme5-shell #adianti_div_content table.table {
    width: 100% !important;
}

body.theme5-shell #adianti_div_content img,
body.theme5-shell #adianti_div_content video,
body.theme5-shell #adianti_div_content canvas,
body.theme5-shell #adianti_div_content iframe {
    max-width: 100%;
}

body.theme5-shell #adianti_div_content .fb-field-container,
body.theme5-shell #adianti_div_content .fb-inline-field-container,
body.theme5-shell #adianti_div_content .form-group,
body.theme5-shell #adianti_div_content .form-line,
body.theme5-shell #adianti_div_content .input-group,
body.theme5-shell #adianti_div_content .select2-container {
    max-width: 100%;
}

body.theme5-shell #adianti_div_content .form-control,
body.theme5-shell #adianti_div_content input,
body.theme5-shell #adianti_div_content select,
body.theme5-shell #adianti_div_content textarea {
    max-width: 100%;
}

body.theme5-shell #adianti_div_content .header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

/* Student pages and shell destinations: layout compatibility only. */
body.theme5-shell #adianti_div_content .left-mailbox {
    flex: 0 0 160px;
    min-width: 0;
}

body.theme5-shell #adianti_div_content .right-mailbox {
    flex: 1 1 auto;
    min-width: 0;
}

body.theme5-shell #adianti_div_content .right-mailbox .panel,
body.theme5-shell #adianti_div_content .right-mailbox .card,
body.theme5-shell #adianti_div_content .right-mailbox table {
    width: 100% !important;
}

body.theme5-shell #adianti_div_content .row > [class*="col-"] {
    min-width: 0;
}

body.theme5-shell #adianti_div_content .row > [class*="col-"] > .panel {
    width: 100%;
}

body.theme5-shell #adianti_right_panel {
    max-width: 100vw;
}

/* Infantil / SAEB: preserve legacy component styling while making their
   table-based page structure fit the theme5 content column. */
body.theme5-shell #adianti_div_content .theme5-infantil-page,
body.theme5-shell #adianti_div_content .theme5-infantil-page > table,
body.theme5-shell #adianti_div_content .theme5-infantil-content-table {
    width: 100% !important;
    max-width: 100%;
}

body.theme5-shell #adianti_div_content .theme5-infantil-content-table > tbody > tr > td {
    min-width: 0;
}

body.theme5-shell #adianti_div_content .theme5-infantil-month-grid {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 8px;
}

body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr > td {
    width: 25%;
    min-width: 0;
    vertical-align: top;
}

body.theme5-shell #adianti_div_content .theme5-infantil-month-grid .panel {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

body.theme5-shell #adianti_div_content .theme5-infantil-data-table td,
body.theme5-shell #adianti_div_content .theme5-infantil-data-table th,
body.theme5-shell #adianti_div_content .theme5-infantil-detail-panel label {
    overflow-wrap: anywhere;
}

.t5-footer {
    text-align: center;
    font-size: 11px;
    color: var(--t5-muted);
    padding: 14px 0 0;
}

.t5-mobile-toggle {
    display: none;
}

/* O menu público compartilha a estrutura do shell padrão do theme5. */
body.theme5-public .t5-public-access {
    margin-top: auto;
}

body.theme5-public #adianti_div_content:empty {
    min-height: 180px;
}

body.theme5-public .t5-sidebar-nav > ul,
body.theme5-public .t5-sidebar-nav .sidebar-menu {
    max-width: 100%;
}

@media (max-width: 900px) {
    .t5-sidebar {
        transform: translateX(-100%);
    }

    body.t5-sidebar-open .t5-sidebar {
        transform: translateX(0);
    }

    .t5-content {
        margin-left: 0;
        padding: 16px;
    }

    .t5-mobile-toggle {
        display: flex;
        margin-right: 8px;
    }

    .t5-panel {
        padding: 16px;
    }

    body.theme5-shell #adianti_div_content .panel-heading,
    body.theme5-shell #adianti_div_content .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    body.theme5-shell #adianti_div_content .panel-heading .header-actions,
    body.theme5-shell #adianti_div_content .card-header .header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    body.theme5-shell #adianti_div_content .form-group.row,
    body.theme5-shell #adianti_div_content .form-group.tformrow.row {
        margin-left: 0;
        margin-right: 0;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid,
    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody,
    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr {
        display: block;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 12px;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr > td {
        display: block;
        width: auto;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr:first-child > td {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575px) {
    .t5-content {
        padding: 10px;
    }

    .t5-content-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-bottom: 10px;
        border-radius: 50%;
        color: var(--t5-muted);
        background: var(--t5-surface);
        text-decoration: none;
    }

    .t5-topbar .t5-user-line {
        flex: 1 1 calc(100% - 50px);
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .t5-topbar > ul {
        margin-left: auto !important;
    }

    .t5-panel {
        padding: 10px;
        border-radius: var(--t5-radius-sm);
    }

    body.theme5-shell #adianti_div_content .panel-body,
    body.theme5-shell #adianti_div_content .card-body {
        padding-left: 10px;
        padding-right: 10px;
    }

    body.theme5-shell #adianti_div_content .btn {
        white-space: normal;
    }

    body.theme5-shell #adianti_right_panel.right-panel {
        width: 100%;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-month-grid > tbody > tr {
        grid-template-columns: minmax(0, 1fr);
    }

    body.theme5-shell #adianti_div_content .left-mailbox,
    body.theme5-shell #adianti_div_content .right-mailbox {
        display: block;
        width: 100%;
        float: none;
        margin-right: 0;
    }

    body.theme5-shell #adianti_div_content .left-mailbox {
        margin-bottom: 10px;
    }

    body.theme5-shell #adianti_div_content .form-horizontal .control-label {
        text-align: left;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-detail-panel .control-label,
    body.theme5-shell #adianti_div_content .theme5-infantil-detail-panel .col-sm-8 {
        width: 100%;
        text-align: left;
    }

    body.theme5-shell #adianti_div_content .theme5-infantil-detail-panel .col-sm-8 {
        padding-top: 2px !important;
    }
}

.debug-panel { font-family: 'Nunito', sans-serif; }

/* --------------------------------------------------------------------
   Dialogs — Bootstrap contextual presentation
   -------------------------------------------------------------------- */

.theme5-shell .t5-context-dialog,
.theme5-login .t5-context-dialog,
.theme5-public .t5-context-dialog {
    --t5-dialog-color: var(--bs-info, #0dcaf0);
    --t5-dialog-soft: rgba(13, 202, 240, .12);
}

.theme5-shell .t5-context-dialog .modal-dialog,
.theme5-login .t5-context-dialog .modal-dialog,
.theme5-public .t5-context-dialog .modal-dialog {
    width: min(520px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
}

.t5-context-dialog .modal-content {
    overflow: hidden;
    border: 0;
    border-top: 5px solid var(--t5-dialog-color);
    border-radius: var(--t5-radius);
    box-shadow: 0 20px 55px rgba(31, 42, 68, .24);
}

.t5-context-dialog .modal-header {
    padding: 18px 22px 14px;
    color: var(--t5-dialog-color);
    background: var(--t5-dialog-soft);
    border-bottom: 1px solid var(--t5-dialog-soft);
}

.t5-context-dialog .modal-title {
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
}

.t5-context-dialog .modal-body {
    padding: 24px 22px;
    color: var(--t5-ink);
    line-height: 1.55;
}

.t5-context-dialog .modal-body .icon-dialog {
    color: var(--t5-dialog-color) !important;
}

.t5-context-dialog .modal-footer {
    gap: 8px;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--t5-border);
}

.t5-context-dialog .modal-footer .btn {
    min-width: 96px;
    padding: 9px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
}

.t5-dialog-primary {
    --t5-dialog-color: var(--bs-primary, #0d6efd);
    --t5-dialog-soft: rgba(13, 110, 253, .12);
}

.t5-dialog-success {
    --t5-dialog-color: var(--bs-success, #198754);
    --t5-dialog-soft: rgba(25, 135, 84, .12);
}

.t5-dialog-info {
    --t5-dialog-color: var(--bs-info, #0dcaf0);
    --t5-dialog-soft: rgba(13, 202, 240, .12);
}

.t5-dialog-warning {
    --t5-dialog-color: var(--bs-warning, #ffc107);
    --t5-dialog-soft: rgba(255, 193, 7, .15);
}

.t5-dialog-danger {
    --t5-dialog-color: var(--bs-danger, #dc3545);
    --t5-dialog-soft: rgba(220, 53, 69, .12);
}

@media (max-width: 575px) {
    .t5-context-dialog .modal-body {
        padding: 20px 18px;
    }

    .t5-context-dialog .modal-footer {
        padding: 12px 18px 18px;
    }
}
