/* CSS das paginas e componentes de Features/<contexto> (antes em <style> inline nos .razor).
   Carregado depois de todos os outros CSS: a ordem e a precedencia que o <style> inline tinha. */

/* ===== Features/Suporte/Tickets/Pages/AbrirTicketPage.razor ===== */
    .atk-page { display: flex; flex-direction: column; gap: 0.5rem; padding-bottom: 2rem; }


    .atk-breadcrumb { color: var(--text-secondary); font-size: 0.85rem; display: flex; gap: 0.4rem; align-items: center; }

    .atk-breadcrumb a { color: var(--primary); text-decoration: none; }

    .atk-breadcrumb a:hover { text-decoration: underline; }


    .atk-page h1 { color: var(--text-primary); font-size: 1.6rem; font-weight: 800; margin: 0.25rem 0 0; }

    .atk-subtitulo { color: var(--text-secondary); font-size: 0.92rem; margin: 0.25rem 0 1.25rem; max-width: 720px; }


    .atk-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 1.25rem; align-items: start; }


    .atk-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
    }


    .atk-card h2 { color: var(--text-primary); font-size: 1.05rem; font-weight: 700; margin: 0; }

    .atk-card h3 { color: var(--text-primary); font-size: 0.95rem; font-weight: 700; margin: 0 0 0.4rem; }


    .atk-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }


    .atk-card label {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        color: var(--text-primary);
        font-size: 0.88rem;
        font-weight: 600;
    }


    .atk-label-texto { display: inline-flex; align-items: baseline; gap: 0.25rem; }

    .atk-obrigatorio { color: var(--error); font-weight: 700; }

    .atk-opcional { color: var(--text-secondary); font-size: 0.78rem; font-weight: 400; }


    .atk-card select, .atk-card input[type="text"], .atk-card textarea {
        background: var(--surface);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 0.9rem;
        font-weight: 400;
        padding: 0.65rem 0.85rem;
        font-family: inherit;
    }

    .atk-card select:focus, .atk-card input[type="text"]:focus, .atk-card textarea:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(50,91,179,0.12);
    }

    .atk-card textarea { resize: vertical; }


    .atk-urgencia-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

    .atk-urgencia-btn {
        background: var(--surface-subtle);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        color: var(--text-primary);
        cursor: pointer;
        font-size: 0.85rem;
        font-weight: 600;
        padding: 0.6rem 0.75rem;
        text-align: left;
        transition: all 0.12s;
    }

    .atk-urgencia-btn:hover { border-color: var(--primary); }

    .atk-urgencia-btn.ativo { background: rgba(50,91,179,0.12); border-color: var(--primary); color: var(--primary); }


    .atk-drop {
        align-items: center;
        border: 1px dashed var(--border-color);
        border-radius: 12px;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        font-size: 0.8rem;
        font-weight: 400;
        gap: 0.4rem;
        padding: 1.15rem;
        text-align: center;
        transition: border-color 0.12s, color 0.12s;
    }

    .atk-drop i { font-size: 1.4rem; color: var(--primary); }

    .atk-drop:hover { border-color: var(--primary); color: var(--text-primary); }


    .atk-files { display: flex; flex-direction: column; gap: 0.4rem; }

    .atk-file {
        align-items: center;
        background: var(--bg-secondary);
        border-radius: 8px;
        display: flex;
        gap: 0.5rem;
        padding: 0.45rem 0.65rem;
    }

    .atk-file i { color: var(--primary); }

    .atk-file-name { color: var(--text-primary); flex: 1; font-size: 0.82rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .atk-file-size { color: var(--text-secondary); font-size: 0.76rem; font-weight: 400; }

    .atk-file-del { background: none; border: none; color: var(--text-secondary); cursor: pointer; }

    .atk-file-del:hover { color: var(--error); }


    .atk-erro { background: rgba(239,68,68,0.1); border-radius: 10px; color: var(--error); font-size: 0.85rem; font-weight: 600; margin: 0; padding: 0.7rem 0.9rem; }


    .atk-acoes { display: flex; justify-content: flex-end; }

    .atk-btn-primario {
        background: var(--primary);
        border: none;
        border-radius: 10px;
        color: #fff;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 700;
        padding: 0.75rem 1.5rem;
        transition: opacity 0.12s;
    }

    .atk-btn-primario:disabled { cursor: not-allowed; opacity: 0.6; }

    .atk-btn-primario:not(:disabled):hover { opacity: 0.92; }


    .atk-lateral { display: flex; flex-direction: column; gap: 1rem; }

    .atk-lateral p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }


    @media (max-width: 900px) {

        .atk-layout { grid-template-columns: 1fr; }
}

/* ===== Features/Suporte/Tickets/Pages/SuporteTicketsPage.razor ===== */
    .sup-page { display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 2rem; }


    .sup-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

    .sup-header h1 { color: var(--text-primary); font-size: 1.6rem; font-weight: 800; margin: 0; }

    .sup-header p { color: var(--text-secondary); font-size: 0.9rem; margin: 0.25rem 0 0; max-width: 560px; }


    .sup-btn-primario {
        background: var(--primary);
        border: none;
        border-radius: 10px;
        color: #fff;
        cursor: pointer;
        font-size: 0.88rem;
        font-weight: 700;
        padding: 0.7rem 1.25rem;
        white-space: nowrap;
        transition: opacity 0.12s;
    }

    .sup-btn-primario:hover { opacity: 0.92; }


    .sup-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

    .sup-stat {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1rem 1.25rem;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .sup-stat span { color: var(--text-primary); font-size: 1.8rem; font-weight: 800; line-height: 1; }

    .sup-stat small { color: var(--text-secondary); font-size: 0.78rem; font-weight: 600; }


    .sup-filtros { display: flex; gap: 0.75rem; flex-wrap: wrap; }

    .sup-filtros input, .sup-filtros select {
        background: var(--surface);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 0.88rem;
        height: 42px;
        padding: 0 0.85rem;
    }

    .sup-filtros input { flex: 1; min-width: 220px; }

    .sup-filtros input:focus, .sup-filtros select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(50,91,179,0.12); }


    .sup-vazio { color: var(--text-secondary); font-size: 0.9rem; padding: 2rem 0; text-align: center; }

    .sup-vazio a { color: var(--primary); }


    .sup-table {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        border-collapse: collapse;
        overflow: hidden;
        width: 100%;
    }

    .sup-table th {
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        padding: 0.85rem 1.1rem;
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .sup-table td {
        border-top: 1px solid var(--border-color);
        color: var(--text-primary);
        font-size: 0.86rem;
        padding: 0.8rem 1.1rem;
        vertical-align: middle;
    }

    .sup-row { cursor: pointer; }

    .sup-table tbody tr:hover { background: var(--bg-secondary); }

    .sup-mono { color: var(--text-secondary); font-family: monospace; font-size: 0.8rem; }


    .sup-badge {
        border-radius: 999px;
        display: inline-flex;
        font-size: 0.74rem;
        font-weight: 700;
        padding: 0.22rem 0.65rem;
        white-space: nowrap;
    }

    .sup-estado-Aberto { background: rgba(245,158,11,.14); color: var(--warning); }

    .sup-estado-EmAndamento { background: rgba(59,130,246,.14); color: #3b82f6; }

    .sup-estado-Resolvido { background: rgba(16,185,129,.14); color: var(--success); }

    .sup-estado-Fechado { background: var(--bg-secondary); color: var(--text-secondary); }


    .sup-pager .mud-pagination-item .mud-button-root { border: 1px solid var(--border-color); color: var(--text-primary); min-width: 34px; }

    .sup-pager .mud-pagination-item .mud-button-root:hover { background: var(--bg-secondary); border-color: var(--primary); color: var(--primary); }

    .sup-pager .mud-pagination-item .mud-button-root.mud-button-filled-primary { background: var(--primary); border-color: var(--primary); color: #fff; }


    @media (max-width: 640px) {

        .sup-header { flex-direction: column; }

        .sup-btn-primario { width: 100%; }
}

/* ===== Features/Suporte/Tickets/Pages/TicketDetalhePage.razor ===== */
.tkd-page { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }


.tkd-vazio { color: var(--text-secondary); font-size: 0.9rem; padding: 2rem 0; text-align: center; }


.tkd-breadcrumb { color: var(--text-secondary); font-size: 0.85rem; display: flex; gap: 0.4rem; align-items: center; }

.tkd-breadcrumb a { color: var(--primary); text-decoration: none; }

.tkd-breadcrumb a:hover { text-decoration: underline; }


.tkd-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.tkd-cabecalho { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; padding: 1.5rem; }

.tkd-cabecalho h1 { color: var(--text-primary); font-size: 1.35rem; font-weight: 800; margin: 0; }

.tkd-cabecalho p { color: var(--text-secondary); font-size: 0.85rem; margin: 0.25rem 0 0; }


.tkd-badge {
    border-radius: 999px;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    white-space: nowrap;
}

.tkd-estado-Aberto { background: rgba(245,158,11,.14); color: var(--warning); }

.tkd-estado-EmAndamento { background: rgba(59,130,246,.14); color: #3b82f6; }

.tkd-estado-Resolvido { background: rgba(16,185,129,.14); color: var(--success); }

.tkd-estado-Fechado { background: var(--bg-secondary); color: var(--text-secondary); }


.tkd-secao { border-top: 1px solid var(--border-color); padding: 1.5rem; }

.tkd-secao h2 { color: var(--text-primary); font-size: 0.95rem; font-weight: 700; margin: 0 0 1rem; }


.tkd-conversa { display: flex; flex-direction: column; gap: 0.85rem; }


.tkd-msg {
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    max-width: 75%;
    padding: 0.85rem 1.1rem;
}

.tkd-msg p { color: var(--text-primary); font-size: 0.9rem; margin: 0.3rem 0 0; white-space: pre-wrap; }

.tkd-msg-autor { align-items: center; color: var(--text-primary); display: flex; font-size: 0.82rem; font-weight: 700; gap: 0.5rem; }

.tkd-msg-autor span { color: var(--text-secondary); font-size: 0.75rem; font-weight: 400; }


.tkd-msg-cliente { align-self: flex-start; }

.tkd-msg-admin { align-self: flex-end; background: rgba(50,91,179,0.08); border-color: rgba(50,91,179,0.25); }


.tkd-anexos { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.6rem; }

.tkd-anexos a { align-items: center; color: var(--primary); display: flex; font-size: 0.82rem; gap: 0.35rem; text-decoration: none; }

.tkd-anexos a:hover { text-decoration: underline; }


.tkd-resposta { display: flex; flex-direction: column; gap: 0.75rem; }

.tkd-resposta textarea {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
    resize: vertical;
}

.tkd-resposta textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(50,91,179,0.12); }


.tkd-drop {
    align-items: center;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    font-weight: 400;
    gap: 0.4rem;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.12s, color 0.12s;
}

.tkd-drop i { color: var(--primary); font-size: 1.3rem; }

.tkd-drop:hover { border-color: var(--primary); color: var(--text-primary); }


.tkd-files { display: flex; flex-direction: column; gap: 0.4rem; }

.tkd-file { align-items: center; background: var(--bg-secondary); border-radius: 8px; display: flex; gap: 0.5rem; padding: 0.4rem 0.6rem; }

.tkd-file i { color: var(--primary); }

.tkd-file-name { color: var(--text-primary); flex: 1; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tkd-file-del { background: none; border: none; color: var(--text-secondary); cursor: pointer; }

.tkd-file-del:hover { color: var(--error); }


.tkd-resposta-acoes { display: flex; justify-content: flex-end; }

.tkd-resposta button[type="submit"] {
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.6rem 1.3rem;
}

.tkd-resposta button[type="submit"]:disabled { cursor: not-allowed; opacity: 0.6; }
