/*
|--------------------------------------------------------------------------
| QuestLAB UI
|--------------------------------------------------------------------------
| Sistema visual global da plataforma.
| Estilo: suave, moderno, sóbrio e com cantos retos.
|
| Uso recomendado:
| <link rel="stylesheet" href="<?= APP_URL ?>/assets/css/questlab-ui.css">
|--------------------------------------------------------------------------
*/

:root {
    --ql-bg: #f6f7f9;
    --ql-bg-soft: #fafbfc;

    --ql-surface: #ffffff;
    --ql-surface-soft: #f8fafc;
    --ql-surface-muted: #f1f4f7;

    --ql-text: #253044;
    --ql-text-strong: #172033;
    --ql-text-soft: #748094;
    --ql-text-muted: #8a94a3;

    --ql-primary: #102746;
    --ql-primary-2: #1d2d43;
    --ql-primary-soft: #536b86;
    --ql-primary-pale: #edf2f7;

    --ql-border: #dde2e9;
    --ql-border-soft: #e7eaee;
    --ql-border-strong: #cfd7e2;

    --ql-success: #526b5b;
    --ql-success-bg: #eef5f0;
    --ql-success-border: #d8e6dc;

    --ql-warning: #8a6744;
    --ql-warning-bg: #f8f3ec;
    --ql-warning-border: #eadfce;

    --ql-danger: #9b4d4d;
    --ql-danger-bg: #fbf1f1;
    --ql-danger-border: #ecd4d4;

    --ql-info: #4c6682;
    --ql-info-bg: #edf2f7;
    --ql-info-border: #d8e0e8;

    --ql-shadow-sm: 0 4px 12px rgba(15, 23, 42, .04);
    --ql-shadow: 0 7px 20px rgba(15, 23, 42, .05);
    --ql-shadow-lg: 0 12px 30px rgba(15, 23, 42, .08);

    --ql-container: 1250px;

    --ql-space-1: 6px;
    --ql-space-2: 10px;
    --ql-space-3: 14px;
    --ql-space-4: 18px;
    --ql-space-5: 22px;
    --ql-space-6: 28px;
    --ql-space-7: 36px;

    --ql-font-xs: 11px;
    --ql-font-sm: 13px;
    --ql-font-md: 15px;
    --ql-font-lg: 18px;
    --ql-font-xl: 24px;
    --ql-font-2xl: 34px;
}

/* =========================
   BASE
========================= */

html {
    background: var(--ql-bg);
}

body {
    margin: 0;
    background: var(--ql-bg);
    color: var(--ql-text);
    font-weight: 400;
}

body,
button,
input,
select,
textarea {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

/* =========================
   PÁGINA E CONTAINERS
========================= */

.ql-page {
    width: min(var(--ql-container), calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.ql-section {
    margin-bottom: 22px;
}

.ql-grid {
    display: grid;
    gap: 18px;
}

.ql-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ql-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ql-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ql-stack {
    display: grid;
    gap: 18px;
}

/* =========================
   TÍTULOS E TEXTO
========================= */

.ql-page-title {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: var(--ql-font-2xl);
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.4px;
}

.ql-section-title {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: var(--ql-font-xl);
    line-height: 1.25;
    font-weight: 600;
}

.ql-card-title {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: var(--ql-font-lg);
    line-height: 1.35;
    font-weight: 600;
}

.ql-subtitle,
.ql-muted {
    color: var(--ql-text-soft);
    font-weight: 400;
}

.ql-subtitle {
    margin-top: 8px;
    line-height: 1.65;
}

/* =========================
   HERO
========================= */

.ql-hero {
    background: var(--ql-primary);
    color: #fff;
    padding: 36px 38px;
    margin-bottom: 22px;
    border: 1px solid #17365f;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}

.ql-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 30px;
    align-items: center;
}

.ql-hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.4px;
}

.ql-hero p {
    margin: 0;
    color: #d3dbe7;
    line-height: 1.65;
}

.ql-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #c9d6e8;
    font-size: 13px;
    font-weight: 600;
}

.ql-kicker i {
    width: 17px;
    height: 17px;
}

/* =========================
   CARDS
========================= */

.ql-card {
    background: var(--ql-surface);
    border: 1px solid var(--ql-border);
    box-shadow: var(--ql-shadow);
    overflow: hidden;
}

.ql-card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 16px 19px;
    background: var(--ql-bg-soft);
    border-bottom: 1px solid var(--ql-border-soft);
    color: #293548;
    font-size: 15px;
    font-weight: 600;
}

.ql-card-header i {
    width: 19px;
    height: 19px;
    color: var(--ql-primary-soft);
}

.ql-card-body {
    padding: 20px;
}

.ql-card-footer {
    padding: 15px 20px;
    background: var(--ql-bg-soft);
    border-top: 1px solid var(--ql-border-soft);
}

.ql-card-flat {
    box-shadow: none;
}

.ql-card-dark {
    background: var(--ql-primary-2);
    color: #fff;
    border-color: #2c3d54;
}

.ql-card-dark .ql-card-header {
    color: #eef2f7;
    background: rgba(255, 255, 255, .035);
    border-bottom-color: rgba(255, 255, 255, .10);
}

.ql-card-dark .ql-card-header i {
    color: #a9bbce;
}

.ql-card-dark p,
.ql-card-dark .ql-muted {
    color: #c6d0dc;
}

/* =========================
   MÉTRICAS
========================= */

.ql-metric {
    min-height: 126px;
    padding: 20px;
    background: var(--ql-surface);
    color: var(--ql-text);
    border: 1px solid var(--ql-border);
    box-shadow: var(--ql-shadow-sm);
}

.ql-metric-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    background: var(--ql-surface-muted);
    color: var(--ql-primary-soft);
    border: 1px solid #dce3ec;
}

.ql-metric-icon i {
    width: 21px;
    height: 21px;
}

.ql-metric-label {
    display: block;
    margin-bottom: 8px;
    color: #637083;
    font-size: 13px;
    font-weight: 500;
}

.ql-metric-value {
    display: block;
    color: #1e293b;
    font-size: 30px;
    line-height: 1.08;
    font-weight: 600;
}

.ql-metric-help {
    margin-top: 9px;
    color: #748094;
    font-size: 12px;
    line-height: 1.45;
}

/* =========================
   BOTÕES
========================= */

.ql-button,
.ql-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ql-text);
    font-size: 13px;
    font-weight: 550;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background .16s ease,
        border-color .16s ease,
        color .16s ease,
        box-shadow .16s ease;
}

.ql-button i {
    width: 18px;
    height: 18px;
}

.ql-button-primary {
    background: var(--ql-primary);
    color: #fff;
    border-color: var(--ql-primary);
}

.ql-button-primary:hover {
    background: #17375f;
    border-color: #17375f;
}

.ql-button-secondary {
    background: #f3f5f7;
    color: #26384e;
    border-color: #dce2e8;
}

.ql-button-secondary:hover {
    background: #edf1f5;
}

.ql-button-ghost {
    background: transparent;
    color: var(--ql-primary-soft);
    border-color: var(--ql-border);
}

.ql-button-danger {
    background: var(--ql-danger-bg);
    color: var(--ql-danger);
    border-color: var(--ql-danger-border);
}

.ql-button-block {
    width: 100%;
}

/* =========================
   TAGS E BADGES
========================= */

.ql-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 9px;
    background: var(--ql-info-bg);
    color: var(--ql-info);
    border: 1px solid var(--ql-info-border);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.ql-tag-success {
    background: var(--ql-success-bg);
    color: var(--ql-success);
    border-color: var(--ql-success-border);
}

.ql-tag-warning {
    background: var(--ql-warning-bg);
    color: var(--ql-warning);
    border-color: var(--ql-warning-border);
}

.ql-tag-danger {
    background: var(--ql-danger-bg);
    color: var(--ql-danger);
    border-color: var(--ql-danger-border);
}

.ql-tag-muted {
    background: #f5f6f7;
    color: #8993a1;
    border-color: #e4e7eb;
}

/* =========================
   FORMULÁRIOS
========================= */

.ql-field {
    display: grid;
    gap: 7px;
}

.ql-label {
    color: #566273;
    font-size: 12px;
    font-weight: 500;
}

.ql-input,
.ql-select,
.ql-textarea {
    width: 100%;
    border: 1px solid var(--ql-border-strong);
    background: #fff;
    color: var(--ql-text);
    outline: none;
    font-size: 14px;
    font-weight: 400;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.ql-input,
.ql-select {
    height: 44px;
    padding: 0 12px;
}

.ql-textarea {
    min-height: 130px;
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
}

.ql-input:focus,
.ql-select:focus,
.ql-textarea:focus {
    border-color: #7f94aa;
    box-shadow: 0 0 0 3px rgba(83, 107, 134, .10);
}

.ql-input[readonly],
.ql-input:disabled,
.ql-select:disabled,
.ql-textarea:disabled {
    background: #f3f5f7;
    color: #8a94a3;
    cursor: not-allowed;
}


.ql-form {
    display: grid;
    gap: 18px;
}

.ql-form-grid {
    display: grid;
    gap: 16px;
}

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

.ql-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ql-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ql-form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ql-field-help {
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.ql-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    background: var(--ql-bg-soft);
    border: 1px solid var(--ql-border-soft);
    cursor: pointer;
}

.ql-check input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--ql-primary-soft);
}

.ql-check strong,
.ql-check small {
    display: block;
}

.ql-check strong {
    color: var(--ql-text-strong);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
}

.ql-check small {
    margin-top: 4px;
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.ql-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.ql-form-actions-left {
    justify-content: flex-start;
}

.ql-form-actions-center {
    justify-content: center;
}

.ql-form-actions-right {
    justify-content: flex-end;
}

.ql-form-actions-between {
    justify-content: space-between;
}

.ql-form-section {
    padding: 18px 0;
    border-top: 1px solid var(--ql-border-soft);
}

.ql-form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.ql-form-section-title {
    margin: 0 0 14px;
    color: var(--ql-text-strong);
    font-size: 15px;
    font-weight: 600;
}

.ql-field-error {
    color: var(--ql-danger);
    font-size: 11px;
    line-height: 1.4;
}

.ql-input.is-invalid,
.ql-select.is-invalid,
.ql-textarea.is-invalid {
    border-color: var(--ql-danger);
    background: var(--ql-danger-bg);
}

.ql-input.is-valid,
.ql-select.is-valid,
.ql-textarea.is-valid {
    border-color: var(--ql-success);
    background: var(--ql-success-bg);
}

.ql-inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.ql-inline-fields > .ql-field {
    flex: 1 1 180px;
}

/* =========================
   ALERTAS
========================= */

.ql-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    border: 1px solid var(--ql-border);
    background: var(--ql-surface);
    color: var(--ql-text);
    box-shadow: var(--ql-shadow-sm);
}

.ql-alert i {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.ql-alert strong,
.ql-alert span {
    display: block;
}

.ql-alert span {
    margin-top: 4px;
    color: var(--ql-text-soft);
    line-height: 1.5;
    font-size: 13px;
}

.ql-alert-success {
    background: var(--ql-success-bg);
    border-color: var(--ql-success-border);
    color: var(--ql-success);
}

.ql-alert-warning {
    background: var(--ql-warning-bg);
    border-color: var(--ql-warning-border);
    color: var(--ql-warning);
}

.ql-alert-danger {
    background: var(--ql-danger-bg);
    border-color: var(--ql-danger-border);
    color: var(--ql-danger);
}

/* =========================
   TABELAS
========================= */

.ql-table-wrap {
    overflow-x: auto;
}

.ql-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ql-table th {
    padding: 11px 12px;
    text-align: left;
    color: #778396;
    font-size: 11px;
    font-weight: 500;
    background: var(--ql-bg-soft);
    border-bottom: 1px solid var(--ql-border-soft);
    white-space: nowrap;
}

.ql-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--ql-border-soft);
    color: #38465a;
}

.ql-table tbody tr:hover {
    background: #fafbfc;
}

/* =========================
   LISTAS DE TAREFAS
========================= */

.ql-task-list {
    display: grid;
    gap: 10px;
}

.ql-task {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: var(--ql-bg-soft);
    border: 1px solid #e2e6ec;
}

.ql-task-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--ql-surface-muted);
    color: var(--ql-primary-soft);
    border: 1px solid #dce3ea;
}

.ql-task-icon i {
    width: 20px;
    height: 20px;
}

.ql-task-title {
    color: #273448;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
}

.ql-task-subtitle {
    margin-top: 3px;
    color: #778396;
    font-size: 11px;
}

/* =========================
   DIVISORES E ESTADOS VAZIOS
========================= */

.ql-divider {
    height: 1px;
    background: var(--ql-border-soft);
    border: 0;
    margin: 20px 0;
}

.ql-empty {
    padding: 28px;
    text-align: center;
    color: var(--ql-text-soft);
    background: var(--ql-bg-soft);
    border: 1px dashed var(--ql-border-strong);
}

.ql-empty i {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    color: var(--ql-primary-soft);
}


/* =========================
   MÉTRICAS AVANÇADAS
========================= */

.ql-stats-grid { margin-bottom: 22px; }

.ql-metric-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--ql-border-soft);
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.ql-compact-stats { display: grid; gap: 10px; }

.ql-compact-stat {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    background: var(--ql-bg-soft);
    border: 1px solid var(--ql-border-soft);
}

.ql-compact-stat-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--ql-surface-muted);
    color: var(--ql-primary-soft);
    border: 1px solid #dce3ea;
}

.ql-compact-stat-icon i { width: 18px; height: 18px; }

.ql-compact-stat-content span,
.ql-compact-stat-content strong,
.ql-compact-stat-content small { display: block; }

.ql-compact-stat-content span { color: var(--ql-text-soft); font-size: 11px; }
.ql-compact-stat-content strong { margin-top: 2px; color: var(--ql-text-strong); font-size: 18px; font-weight: 600; }
.ql-compact-stat-content small { margin-top: 2px; color: var(--ql-text-muted); font-size: 10px; }

.ql-progress-stat { display: grid; gap: 9px; }

.ql-progress-stat-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.ql-progress-stat-head span { color: var(--ql-text-soft); font-size: 12px; }
.ql-progress-stat-head strong { color: var(--ql-text-strong); font-size: 13px; font-weight: 600; }

.ql-progress-track { height: 8px; background: #e7ebef; overflow: hidden; }
.ql-progress-bar { height: 100%; background: var(--ql-primary-soft); transition: width .25s ease; }
.ql-progress-help { color: var(--ql-text-muted); font-size: 11px; line-height: 1.4; }

/* =========================
   PLANNER CARD
========================= */

.ql-planner-card { min-width: 0; }
.ql-planner-card .ql-card-body { display: grid; gap: 16px; }

.ql-planner-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.ql-planner-card-tags,
.ql-planner-card-details,
.ql-planner-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ql-planner-card-actions { gap: 10px; align-items: center; padding-top: 2px; }

.ql-planner-card-title {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: 21px;
    line-height: 1.25;
    font-weight: 600;
}

.ql-planner-card-meta {
    color: var(--ql-text-soft);
    font-size: 13px;
    line-height: 1.65;
}

.ql-planner-card-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 6px;
    color: #566273;
    font-size: 12px;
}

.ql-planner-card-delete { margin: 0; }
.ql-planner-delete-button { width: 40px; min-width: 40px; padding: 0; }
.ql-planner-delete-button span { display: none; }

/* =========================
   ALERTAS AVANÇADOS
========================= */

.ql-alert-content { min-width: 0; flex: 1; }

.ql-alert-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid currentColor;
    opacity: .82;
    font-size: 12px;
    line-height: 1.55;
}

.ql-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ql-alert-dismissible { position: relative; padding-right: 50px; }

.ql-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.ql-alert-close i { width: 17px; height: 17px; }

.ql-inline-notice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--ql-border);
    background: var(--ql-bg-soft);
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.4;
}

.ql-inline-notice i { width: 16px; height: 16px; }

/* =========================
   TABELAS AVANÇADAS
========================= */

.ql-table-caption {
    padding: 12px;
    text-align: left;
    color: var(--ql-text-strong);
    font-size: 13px;
    font-weight: 600;
    background: var(--ql-bg-soft);
    border-bottom: 1px solid var(--ql-border-soft);
}

.ql-table-align-left { text-align: left !important; }
.ql-table-align-center { text-align: center !important; }
.ql-table-align-right { text-align: right !important; }

.ql-table-empty-row td { padding: 0; }

.ql-table-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 28px;
    color: var(--ql-text-soft);
    text-align: center;
}

.ql-table-empty i { width: 26px; height: 26px; color: var(--ql-primary-soft); }

.ql-table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.ql-table-action { min-height: 34px; padding: 7px 10px; font-size: 11px; }

/* =========================
   MODAIS
========================= */

body.ql-modal-open { overflow: hidden; }

.ql-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ql-modal.is-open { display: flex; }

.ql-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
}

.ql-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--ql-surface);
    border: 1px solid var(--ql-border);
    box-shadow: var(--ql-shadow-lg);
    overflow: hidden;
}

.ql-modal-small .ql-modal-dialog { width: min(100%, 440px); }
.ql-modal-medium .ql-modal-dialog { width: min(100%, 620px); }
.ql-modal-large .ql-modal-dialog { width: min(100%, 820px); }
.ql-modal-wide .ql-modal-dialog { width: min(100%, 1100px); }

.ql-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 56px;
    padding: 15px 18px;
    background: var(--ql-bg-soft);
    border-bottom: 1px solid var(--ql-border-soft);
}

.ql-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ql-modal-title-wrap i { width: 19px; height: 19px; color: var(--ql-primary-soft); }

.ql-modal-title-wrap h2 {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: 17px;
    font-weight: 600;
}

.ql-modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--ql-border);
    background: var(--ql-surface);
    color: var(--ql-text-soft);
    cursor: pointer;
}

.ql-modal-close i { width: 17px; height: 17px; }

.ql-modal-body { padding: 20px; overflow-y: auto; }

.ql-modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    padding: 14px 18px;
    background: var(--ql-bg-soft);
    border-top: 1px solid var(--ql-border-soft);
}

.ql-modal-message { margin: 0; color: var(--ql-text-soft); line-height: 1.65; }

.ql-processing { display: grid; gap: 16px; text-align: center; }

.ql-processing-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    background: var(--ql-primary-pale);
    color: var(--ql-primary-soft);
    border: 1px solid var(--ql-info-border);
}

.ql-processing-icon i {
    width: 27px;
    height: 27px;
    animation: ql-spin 1s linear infinite;
}

.ql-processing p { margin: 0; color: var(--ql-text-soft); line-height: 1.55; }

.ql-processing-track { height: 8px; background: #e7ebef; overflow: hidden; }

.ql-processing-bar {
    width: 35%;
    height: 100%;
    background: var(--ql-primary-soft);
    animation: ql-processing 1.6s ease-in-out infinite;
}

@keyframes ql-spin {
    to { transform: rotate(360deg); }
}

@keyframes ql-processing {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}



/* =========================
   TASK CARD
========================= */

.ql-task-card {
    min-width: 0;
}

.ql-task-card .ql-card-body {
    display: grid;
    gap: 16px;
}

.ql-task-card-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.ql-task-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--ql-primary-pale);
    color: var(--ql-primary);
    border: 1px solid var(--ql-info-border);
}

.ql-task-card-icon i {
    width: 23px;
    height: 23px;
}

.ql-task-card-main {
    min-width: 0;
}

.ql-task-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.ql-task-card-title {
    margin: 0;
    color: var(--ql-text-strong);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 600;
}

.ql-task-card-description {
    margin: 7px 0 0;
    color: var(--ql-text-soft);
    font-size: 13px;
    line-height: 1.65;
}

.ql-task-card-materials {
    display: grid;
    gap: 10px;
}

.ql-task-card-material {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    background: var(--ql-bg-soft);
    border: 1px solid var(--ql-border-soft);
}

.ql-task-card-material > i {
    width: 19px;
    height: 19px;
    margin-top: 1px;
    color: var(--ql-primary-soft);
}

.ql-task-card-material strong,
.ql-task-card-material span {
    display: block;
}

.ql-task-card-material strong {
    color: var(--ql-text-strong);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.ql-task-card-material span {
    margin-top: 3px;
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.ql-task-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    padding-top: 2px;
}

/* =========================
   TIMELINE
========================= */

.ql-timeline {
    display: grid;
}

.ql-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
}

.ql-timeline-item:not(:last-child) {
    padding-bottom: 18px;
}

.ql-timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 1px;
    background: var(--ql-border);
}

.ql-timeline-marker {
    position: relative;
    z-index: 1;
}

.ql-timeline-number {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--ql-surface);
    color: var(--ql-text-soft);
    border: 1px solid var(--ql-border-strong);
    font-size: 12px;
    font-weight: 600;
}

.ql-timeline-content {
    min-width: 0;
    padding: 14px;
    background: var(--ql-surface);
    border: 1px solid var(--ql-border);
    box-shadow: var(--ql-shadow-sm);
}

.ql-timeline-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.ql-timeline-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--ql-bg-soft);
    color: var(--ql-primary-soft);
    border: 1px solid var(--ql-border-soft);
}

.ql-timeline-icon i {
    width: 18px;
    height: 18px;
}

.ql-timeline-heading strong,
.ql-timeline-heading span {
    display: block;
}

.ql-timeline-heading strong {
    color: var(--ql-text-strong);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.ql-timeline-heading span {
    margin-top: 2px;
    color: var(--ql-text-soft);
    font-size: 11px;
    line-height: 1.45;
}

.ql-timeline-body {
    margin-top: 12px;
}

.ql-timeline-item.is-active .ql-timeline-number {
    background: var(--ql-primary);
    color: #fff;
    border-color: var(--ql-primary);
}

.ql-timeline-item.is-active .ql-timeline-content {
    border-color: #bac7d6;
}

.ql-timeline-item.is-completed .ql-timeline-number {
    background: var(--ql-success-bg);
    color: var(--ql-success);
    border-color: var(--ql-success-border);
}

.ql-timeline-item.is-completed .ql-timeline-icon {
    color: var(--ql-success);
    background: var(--ql-success-bg);
    border-color: var(--ql-success-border);
}

.ql-timeline-item.is-completed:not(:last-child)::before {
    background: var(--ql-success-border);
}

.ql-timeline-item.is-pending {
    opacity: .82;
}


/* =========================
   COMPATIBILIDADE INICIAL
========================= */

/*
 * Use a classe ql-modern no <body> ou em um container principal
 * para aplicar o novo padrão gradualmente sem quebrar páginas antigas.
 */

.ql-modern .card,
.ql-modern .panel,
.ql-modern .box,
.ql-modern .modal-content {
    border-radius: 0 !important;
}

.ql-modern button,
.ql-modern input,
.ql-modern select,
.ql-modern textarea,
.ql-modern .badge,
.ql-modern .tag,
.ql-modern .btn {
    border-radius: 0 !important;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width: 1050px) {
    .ql-grid-4,
    .ql-grid-3,
    .ql-form-grid-4,
    .ql-form-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ql-hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ql-page {
        width: min(100% - 30px, var(--ql-container));
        padding: 28px 0 50px;
    }

    .ql-hero {
        padding: 28px 22px;
    }

    .ql-hero h1 {
        font-size: 30px;
    }

    .ql-grid-4,
    .ql-grid-3,
    .ql-grid-2,
    .ql-form-grid-4,
    .ql-form-grid-3,
    .ql-form-grid-2 {
        grid-template-columns: 1fr;
    }

    .ql-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ql-form-actions .ql-button {
        width: 100%;
    }

    .ql-inline-fields {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ql-card-body {
        padding: 18px;
    }

    .ql-task {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .ql-task > .ql-tag,
    .ql-task > .ql-button {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 47px;
    }
}

@media (max-width: 700px) {
    .ql-planner-card-top,
    .ql-planner-card-actions,
    .ql-alert-actions,
    .ql-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ql-planner-card-actions .ql-button,
    .ql-alert-actions .ql-button,
    .ql-modal-footer .ql-button {
        width: 100%;
    }

    .ql-planner-delete-button {
        width: 100%;
    }

    .ql-modal {
        padding: 14px;
    }

    .ql-modal-dialog {
        max-height: calc(100vh - 28px);
    }

    .ql-table-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ql-task-card-head {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .ql-task-card-icon {
        width: 40px;
        height: 40px;
    }

    .ql-task-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ql-task-card-actions .ql-button,
    .ql-task-card-actions form,
    .ql-task-card-actions form .ql-button {
        width: 100%;
    }

    .ql-timeline-item {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 11px;
    }

    .ql-timeline-number {
        width: 32px;
        height: 32px;
    }

    .ql-timeline-item:not(:last-child)::before {
        left: 15px;
        top: 32px;
    }

    .ql-timeline-content {
        padding: 12px;
    }
}