/* HelpDesk — tema dashboard moderno */
:root {
    --sidebar-bg: #6b0f12;
    --sidebar-bg-deep: #4a0a0c;
    --sidebar-text: #f5e6e7;
    --sidebar-active: #fff;
    --sidebar-hover: rgba(255, 255, 255, 0.12);
    --accent: #c41e24;
    --accent-soft: rgba(196, 30, 36, 0.12);
    --bg: #f1f3f7;
    --surface: #ffffff;
    --text: #1a1d26;
    --muted: #5c6370;
    --border: #e2e6ef;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 30px rgba(26, 29, 38, 0.08);
    --shadow-hover: 0 12px 40px rgba(26, 29, 38, 0.12);
    --font: "DM Sans", system-ui, sans-serif;
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --transition: 0.22s ease;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body.app-body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition), width var(--transition);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.35rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.sidebar__name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.sidebar__nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar__section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
    padding: 1rem 0.75rem 0.35rem;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.9rem;
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition), transform 0.15s ease;
    margin-bottom: 2px;
}

.sidebar__link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-active);
}

.sidebar__link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--sidebar-active);
    box-shadow: inset 3px 0 0 var(--sidebar-active);
}

.sidebar__icon {
    opacity: 0.85;
    font-size: 1rem;
}

.sidebar__collapse-btn {
    margin: 0.5rem 0.75rem 1rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--sidebar-text);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background var(--transition);
}

.sidebar__collapse-btn:hover {
    background: var(--sidebar-hover);
}

.sidebar__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.app-body.sidebar-collapsed .sidebar {
    width: 72px;
}

.app-body.sidebar-collapsed .sidebar__name,
.app-body.sidebar-collapsed .sidebar__section,
.app-body.sidebar-collapsed .sidebar__collapse-btn {
    display: none;
}

.app-body.sidebar-collapsed .sidebar__link {
    justify-content: center;
    padding: 0.72rem;
}

.app-body.sidebar-collapsed .sidebar__link span.sidebar__icon {
    font-size: 1.15rem;
}

/* Main */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.app-body.sidebar-collapsed .main-wrap {
    margin-left: 72px;
}

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.topbar__menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition);
}

.topbar__menu-btn:hover { background: var(--border); }

.topbar__title {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notif-wrap { position: relative; }

.notif-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: background var(--transition), transform 0.15s ease;
}

.notif-btn:hover {
    background: var(--border);
    transform: scale(1.04);
}

.notif-btn__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(340px, 92vw);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: fadeSlide 0.2s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.notif-list li {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.notif-list li:last-child { border-bottom: none; }

.link-btn {
    border: none;
    background: none;
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    padding: 0;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    background: var(--bg);
    border-radius: 99px;
}

.user-pill__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b1419);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-pill__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-pill__name {
    font-weight: 600;
    font-size: 0.85rem;
}

.user-pill__role {
    font-size: 0.72rem;
    color: var(--muted);
}

.topbar__logout {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.topbar__logout:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Cards & stats */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-hover); }

.card--center {
    max-width: 420px;
    margin: 3rem auto;
    text-align: center;
}

.card--form { max-width: 720px; margin: 0 auto; }

.card--narrow { max-width: 520px; margin: 0 auto; }

.card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.card__head--wrap { flex-wrap: wrap; }

.page-intro { margin-bottom: 1.25rem; }

.page-title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

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

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-card__label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.stat-card__value {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.stat-card--open .stat-card__value { color: #c41e24; }
.stat-card--prog .stat-card__value { color: #b8860b; }
.stat-card--wait .stat-card__value { color: #6d28d9; }
.stat-card--done .stat-card__value { color: #2e7d32; }
.stat-card--users .stat-card__value { color: #1565c0; }
.stat-card--clients .stat-card__value { color: #6a1b9a; }

.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-tile {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow);
}

.admin-tile:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.admin-tile strong { display: block; margin-bottom: 0.25rem; }
.admin-tile span { font-size: 0.8rem; color: var(--muted); }

/* Form */
.field {
    display: block;
    margin-bottom: 1.25rem;
}

.field__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.field__hint {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

.field__error {
    display: block;
    color: #c62828;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input--area { resize: vertical; min-height: 120px; }

.input--search { max-width: 280px; }

.field--choice { border: none; padding: 0; margin: 0 0 1.25rem; }

/* Só exibido quando o select de status está em "Resolvido" (atributo hidden + JS) */
.atendimento-solucao {
    margin-bottom: 1.25rem;
}
.atendimento-solucao[hidden] {
    display: none !important;
}


.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0.5rem 0.9rem;
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.12s ease;
    color: var(--text);
}

.chip:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(196, 30, 36, 0.35);
}

/* Categoria: cards com ícone (form novo chamado) */
.chip-group--category {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

@media (max-width: 640px) {
    .chip-group--category {
        grid-template-columns: repeat(2, 1fr);
    }
}

.chip-group--category .chip--category {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    min-height: auto;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e0e0e0;
    background: var(--surface);
    text-align: left;
    font-weight: 400;
    box-shadow: none;
    transform: none;
}

.chip-group--category .chip--category:hover {
    border-color: #b0bec5;
    transform: none;
    box-shadow: 0 2px 8px rgba(26, 29, 38, 0.06);
}

.chip-group--category .chip--category.is-active {
    border: 2px solid #1565c0;
    background: #e8f4fd;
    color: var(--text);
    box-shadow: none;
}

.chip-group--category .chip__ico {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
}

.chip-group--category .chip__svg {
    width: 1.75rem;
    height: 1.75rem;
}

.chip-group--category .chip__ico--hardware,
.chip-group--category .chip__ico--software,
.chip-group--category .chip__ico--rede,
.chip-group--category .chip__ico--email {
    color: #1565c0;
}

.chip-group--category .chip__ico--acesso {
    color: #f9a825;
}

.chip-group--category .chip__ico--impressora {
    color: #5c4d6b;
}

.chip-group--category .chip__ico--outro {
    color: #8d6e63;
}

.chip-group--category .chip__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.chip-group--category .chip__title {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    color: var(--text);
}

.chip-group--category .chip__desc {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--muted);
}

.chip-group--category .chip--category.is-active .chip__title {
    color: #0d47a1;
}

/* Prioridade: cards com selo colorido */
.chip-group--priority {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

@media (max-width: 900px) {
    .chip-group--priority {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .chip-group--priority {
        grid-template-columns: 1fr;
    }
}

.chip-group--priority .chip--priority {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e0e0e0;
    background: var(--surface);
    text-align: left;
    font-weight: 400;
    box-shadow: none;
    transform: none;
}

.chip-group--priority .chip--priority:hover {
    border-color: #b0bec5;
    transform: none;
}

.chip-group--priority .chip--priority.is-active {
    border: 2px solid #1565c0;
    background: #e8f4fd;
    color: var(--text);
    box-shadow: none;
}

.chip-group--priority .chip__desc {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--muted);
    margin: 0;
}

.prio-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.prio-badge--baixa {
    background: #e3f2fd;
    color: #1565c0;
}

.chip-group--priority .chip--baixa.is-active .prio-badge--baixa {
    background: transparent;
    color: #0d47a1;
    padding-left: 0;
    padding-right: 0;
}

.prio-badge--media {
    background: #e3f2fd;
    color: #1565c0;
}

.chip-group--priority .chip--media.is-active .prio-badge--media {
    background: transparent;
    color: #0d47a1;
    font-weight: 700;
    padding-left: 0;
    padding-right: 0;
}

.prio-badge--alta {
    background: #fff3e0;
    color: #ef6c00;
}

.chip-group--priority .chip--alta.is-active .prio-badge--alta {
    background: transparent;
    color: #e65100;
    font-weight: 700;
    padding-left: 0;
    padding-right: 0;
}

.prio-badge--urgente {
    background: #ffebee;
    color: #c62828;
}

.chip-group--priority .chip--urgente.is-active .prio-badge--urgente {
    background: transparent;
    color: #b71c1c;
    font-weight: 700;
    padding-left: 0;
    padding-right: 0;
}

/* Chips compactos genéricos (outras telas) */
.chip--baixa.is-active:not(.chip--priority) { background: #546e7a; border-color: #546e7a; box-shadow: 0 4px 14px rgba(84, 110, 122, 0.35); }
.chip--media.is-active:not(.chip--priority) { background: #1565c0; border-color: #1565c0; box-shadow: 0 4px 14px rgba(21, 101, 192, 0.35); }
.chip--alta.is-active:not(.chip--priority) { background: #ef6c00; border-color: #ef6c00; box-shadow: 0 4px 14px rgba(239, 108, 0, 0.35); }
.chip--urgente.is-active:not(.chip--priority) { background: #c62828; border-color: #c62828; box-shadow: 0 4px 14px rgba(198, 40, 40, 0.45); }

.form-actions { margin-top: 1.5rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform 0.12s ease, box-shadow var(--transition);
}

.btn:active { transform: scale(0.98); }

.btn--primary {
    background: linear-gradient(135deg, var(--accent), #8b1419);
    color: #fff;
    box-shadow: 0 4px 16px rgba(196, 30, 36, 0.35);
}

.btn--primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 22px rgba(196, 30, 36, 0.45);
}

.btn--secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn--ghost:hover { color: var(--accent); border-color: var(--accent); }

.btn--danger { color: #c62828; }
.btn--block { width: 100%; }
.btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn__loading[hidden] { display: none !important; }

/* Tables */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(196, 30, 36, 0.04);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge--aberto { background: rgba(196, 30, 36, 0.12); color: #8b1419; }
.badge--em_andamento { background: rgba(184, 134, 11, 0.15); color: #8a6d0b; }
.badge--aguardando { background: rgba(124, 58, 237, 0.12); color: #5b21b6; }
.badge--resolvido { background: rgba(46, 125, 50, 0.15); color: #2e7d32; }

.badge--prio-baixa { background: #f1f5f9; color: #475569; }
.badge--prio-media { background: #e0f2fe; color: #0369a1; }
.badge--prio-alta { background: #ffedd5; color: #c2410c; }
.badge--prio-urgente { background: #fee2e2; color: #dc2626; }

.link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.link:hover { text-decoration: underline; }

.table-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form { display: inline; }

.link-btn--danger { color: #c62828; }

.search-form, .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Detail */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 300px);
    gap: 1.25rem;
    align-items: start;
}

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

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.detail-id { font-weight: 700; color: var(--muted); }

.detail-title { margin: 0 0 1rem; font-size: 1.35rem; }

.detail-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.detail-meta li { margin-bottom: 0.35rem; }

.detail-body h3, .detail-anexos h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.prose { line-height: 1.6; font-size: 0.95rem; }

.stack-form { display: flex; flex-direction: column; gap: 0.5rem; }

.form-row {
    display: grid;
    gap: 1rem;
}
.form-row--2 {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
    .form-row--2 {
        grid-template-columns: 1fr;
    }
}
.field--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-direction: row;
}
.field--checkbox input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.config-section-title {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}
.card h2 + .muted {
    margin-top: -0.25rem;
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert--success {
    background: rgba(46, 125, 50, 0.12);
    color: #1b5e20;
    border: 1px solid rgba(46, 125, 50, 0.25);
}

.alert--error {
    background: rgba(198, 40, 40, 0.1);
    color: #b71c1c;
    border: 1px solid rgba(198, 40, 40, 0.25);
}

.alert--info {
    background: rgba(25, 118, 210, 0.1);
    color: #0d47a1;
    border: 1px solid rgba(25, 118, 210, 0.22);
}

.muted { color: var(--muted); }

/* Login */
.login-body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font);
    background: linear-gradient(145deg, var(--sidebar-bg-deep) 0%, #1a1d26 50%, var(--bg) 100%);
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
}

.login-card--wide {
    max-width: 440px;
}

.login-card__brand { text-align: center; margin-bottom: 1.5rem; }

.login-card__logo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #8b1419);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.login-card h1 {
    margin: 0;
    font-size: 1.5rem;
}

.login-card p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }

.login-form { margin-top: 1rem; }

.login-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-footer-links {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.9rem;
}

.login-footer-links a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.login-footer-links a:hover {
    text-decoration: underline;
}

.login-hint {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
}

.login-hint code { font-size: 0.7rem; background: var(--bg); padding: 0.15rem 0.35rem; border-radius: 4px; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* Mobile */
@media (max-width: 960px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .app-body.sidebar-open .sidebar__overlay {
        display: block;
    }

    .main-wrap {
        margin-left: 0 !important;
    }

    .topbar__menu-btn {
        display: grid;
        place-items: center;
    }

    .sidebar__collapse-btn {
        display: none;
    }

    .user-pill__meta {
        display: none;
    }

    .content { padding: 1rem; }
}

@media (max-width: 600px) {
    .topbar__title { font-size: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Painel administrativo (métricas, categorias, lista em cards) */
.admin-dashboard__intro {
    margin-bottom: 1.35rem;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .admin-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-kpi {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--surface);
    padding: 1rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.admin-kpi__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.admin-kpi__svg {
    width: 22px;
    height: 22px;
}

.admin-kpi__icon--neutral { background: #f1f5f9; color: #64748b; }
.admin-kpi__icon--blue { background: #eff6ff; color: #3b82f6; }
.admin-kpi__icon--amber { background: #fffbeb; color: #f59e0b; }
.admin-kpi__icon--violet { background: #f5f3ff; color: #7c3aed; }
.admin-kpi__icon--green { background: #ecfdf5; color: #10b981; }
.admin-kpi__icon--red { background: #fef2f2; color: #ef4444; }

.admin-kpi__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.admin-kpi__value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.admin-kpi__value--blue { color: #2563eb; }
.admin-kpi__value--amber { color: #d97706; }
.admin-kpi__value--violet { color: #7c3aed; }
.admin-kpi__value--green { color: #059669; }
.admin-kpi__value--red { color: #dc2626; }

.admin-kpi__label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
}

.admin-cat-section {
    margin-bottom: 0.5rem;
}

.admin-cat-section__title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.65rem;
}

.admin-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.admin-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.82rem;
    box-shadow: 0 1px 2px rgba(26, 29, 38, 0.04);
}

.admin-cat-pill__pct {
    color: var(--muted);
    font-weight: 500;
}

.admin-quick-links {
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.admin-filters-card {
    margin-bottom: 1rem;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-toolbar__search {
    position: relative;
    flex: 1 1 220px;
    min-width: min(100%, 200px);
}

.admin-toolbar__search-ico {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

.admin-toolbar__input {
    padding-left: 2.5rem;
}

.admin-toolbar__select {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 100%;
}

.admin-toolbar__btn {
    flex-shrink: 0;
}

.admin-list-count {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
}

.admin-chamados-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-chamado-card {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-chamado-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-hover);
}

.admin-chamado-card__main {
    flex: 1;
    min-width: 0;
}

.admin-chamado-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.admin-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
}

.admin-pill--status-aberto { background: #eff6ff; color: #2563eb; }
.admin-pill--status-em_andamento { background: #fffbeb; color: #b45309; }
.admin-pill--status-aguardando { background: #f5f3ff; color: #6d28d9; }
.admin-pill--status-resolvido { background: #d1fae5; color: #047857; }

.admin-pill--prio-baixa { background: #f1f5f9; color: #475569; }
.admin-pill--prio-media { background: #e0f2fe; color: #0369a1; }
.admin-pill--prio-alta { background: #ffedd5; color: #c2410c; }
.admin-pill--prio-urgente { background: #fee2e2; color: #dc2626; }

.admin-pill--cat {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

.admin-chamado-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.admin-chamado-card__snippet {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}

.admin-chamado-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.15rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.admin-chamado-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-card__ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.8;
}

.admin-chamado-card__action {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--muted);
}

.admin-card__chev {
    width: 22px;
    height: 22px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Página do chamado (detalhe) */
.chamado-page {
    max-width: 720px;
    margin: 0 auto;
}

.chamado-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color var(--transition);
}

.chamado-back:hover {
    color: var(--accent);
}

.chamado-hero__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.chamado-hero__title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.chamado-hero__id {
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

.chamado-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.chamado-hero__meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-right: 0.35rem;
}

.chamado-hero__meta-item--fechamento .chamado-hero__ico {
    opacity: 0.9;
}

.chamado-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chamado-hero__ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
}

.chamado-hero__desc {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.chamado-hero__solucao {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.chamado-hero__solucao-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.chamado-hero__solucao-prose .chamado-solucao-destaque {
    display: inline-block;
    padding: 0.2em 0.7em 0.22em;
    margin: 0.08em 0.1em 0;
    vertical-align: 0.12em;
    max-width: 100%;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88em;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: #14532d;
    background: linear-gradient(165deg, #f7fef9 0%, #ecfdf5 42%, #d1fae5 100%);
    border: 1px solid rgba(22, 163, 74, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 2px rgba(20, 83, 45, 0.05),
        0 6px 14px -4px rgba(22, 163, 74, 0.14);
}

.chamado-hero__sub {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.chamado-hero__anexos-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
}

.chamado-admin-panel {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1rem 1.15rem 1.1rem;
    margin-bottom: 1.5rem;
}

.chamado-admin-panel__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1d4ed8;
}

.chamado-admin-panel__shield {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chamado-admin-panel__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.chamado-admin-panel__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 120px;
    min-width: 0;
}

.chamado-admin-panel__field--grow {
    flex: 2 1 200px;
}

.chamado-admin-panel__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
}

.chamado-admin-panel__submit {
    width: 48px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-sm);
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    transition: filter var(--transition), transform 0.12s ease;
    align-self: flex-end;
}

.chamado-admin-panel__submit:hover {
    filter: brightness(1.06);
}

.chamado-admin-panel__submit:active {
    transform: scale(0.98);
}

.chamado-admin-panel__delete {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(37, 99, 235, 0.15);
}

.chamado-admin-panel .atendimento-solucao {
    margin-top: 1rem;
    width: 100%;
}

.chamado-chat-section {
    margin-bottom: 1.25rem;
}

.chamado-chat-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 600;
}

.chamado-chat-section__title-ico {
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.chamado-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.chamado-timeline__empty {
    margin: 0;
    font-size: 0.9rem;
}

.chamado-timeline__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.chamado-timeline__status:first-child {
    border-top: none;
    padding-top: 0;
}

.chamado-timeline__doc {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.chamado-msg {
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    max-width: 100%;
}

.chamado-msg--staff {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.chamado-msg--user {
    background: var(--bg);
    border: 1px solid var(--border);
}

.chamado-msg__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
}

.chamado-msg__shield {
    display: inline-flex;
    color: #2563eb;
}

.chamado-msg__author {
    font-weight: 600;
    color: var(--text);
}

.chamado-msg__time {
    color: var(--muted);
    font-size: 0.75rem;
}

.chamado-msg__body {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.chamado-msg__anexos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.chamado-msg__img-wrap {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: min(280px, 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.chamado-msg__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.chamado-msg__file-link {
    font-size: 0.85rem;
}

.chamado-reply {
    padding: 1rem 1.15rem;
}

.chamado-reply__textarea {
    min-height: 100px;
    resize: vertical;
    margin-bottom: 0.65rem;
}

.chamado-reply__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chamado-reply__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chamado-reply__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chamado-reply__attach {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.chamado-reply__attach:hover {
    color: var(--text);
    border-color: #cbd5e1;
    background: #fff;
}

.chamado-reply__filename {
    font-size: 0.75rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chamado-reply__hint {
    font-size: 0.75rem;
}

.chamado-reply__send {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: filter var(--transition);
}

.chamado-reply__send:hover {
    filter: brightness(1.06);
}

@media (max-width: 600px) {
    .chamado-admin-panel__row {
        flex-direction: column;
        align-items: stretch;
    }

    .chamado-admin-panel__submit {
        width: 100%;
        height: 44px;
    }
}
