@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

body { 
    font-family: 'Inter', sans-serif; 
}

:root {
    --cx-blue: #0072ce;
    --cx-blue-dark: #075ca8;
    --cx-blue-soft: #e8f4fd;
    --cx-ink: #1f2937;
    --cx-muted: #5f6b7a;
    --cx-border: #d8e2ee;
    --cx-page: #f4f8fb;
    --cx-card: #ffffff;
}

body {
    background:
        linear-gradient(180deg, #ffffff 0, #f5f9fc 17rem, #eef4f9 100%) !important;
    color: var(--cx-ink);
}

.app-container {
    width: calc(100% - 0.75rem);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .app-container {
        width: calc(100% - 1rem);
    }
}

@media (min-width: 1024px) {
    .app-container {
        width: calc(100% - 1.5rem);
    }
}

@media (min-width: 1536px) {
    .app-container {
        width: calc(100% - 2rem);
    }
}

:root {
    color-scheme: light;
}

header.bg-white,
header.bg-indigo-900 {
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--cx-ink) !important;
    border-bottom: 1px solid var(--cx-border) !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06) !important;
    backdrop-filter: blur(12px);
}

header a,
header button,
header span {
    color: inherit;
}

header .text-indigo-300,
header .text-indigo-400,
header .text-indigo-500,
header .text-white {
    color: var(--cx-blue) !important;
}

header .bg-indigo-50,
header .bg-slate-100,
header .bg-white\/10 {
    background-color: var(--cx-blue-soft) !important;
    color: var(--cx-blue-dark) !important;
    border-color: #c7e4f8 !important;
}

header .hover\:bg-gray-50:hover,
header .hover\:bg-white\/20:hover,
header .hover\:bg-slate-200:hover {
    background-color: #dff0fb !important;
}

header .bg-indigo-600,
header .bg-emerald-600,
header .bg-purple-600 {
    background-color: var(--cx-blue) !important;
    color: #ffffff !important;
    border-color: var(--cx-blue) !important;
}

main.app-container {
    animation: supportFadeIn 0.18s ease-out;
}

@keyframes supportFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--cx-border);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(232, 244, 253, 0.92), rgba(255, 255, 255, 0.96)),
        radial-gradient(circle at top right, rgba(0, 114, 206, 0.13), transparent 28rem);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.support-page-heading--compact {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0.9rem;
    padding: 0.55rem 0.9rem;
}

.support-page-heading--compact h1 {
    position: absolute;
    left: 50%;
    width: min(620px, calc(100% - 260px));
    margin: 0;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-page-heading--compact .support-count-pill {
    margin-left: auto;
    white-space: nowrap;
}

.support-page-heading h1 {
    color: #1f3f5b !important;
    letter-spacing: -0.01em;
}

.support-page-heading .support-subtitle {
    color: var(--cx-muted);
    margin-top: 0.35rem;
    font-size: 0.93rem;
}

.support-count-pill {
    color: var(--cx-blue-dark) !important;
    background: #ffffff !important;
    border: 1px solid #b9ddf5 !important;
    box-shadow: 0 10px 24px rgba(0, 114, 206, 0.08);
}

.bg-white.rounded-xl,
.bg-white.rounded-lg,
.bg-white.shadow-sm,
table {
    border-color: var(--cx-border) !important;
}

main .bg-white {
    background-color: #ffffff !important;
}

main .shadow-sm {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
}

main .bg-slate-50,
main .bg-gray-50,
main .bg-slate-50\/50 {
    background-color: #f7fbfe !important;
}

main .text-indigo-600,
main .text-indigo-700,
main .text-indigo-800 {
    color: var(--cx-blue-dark) !important;
}

main .bg-indigo-600,
main button.bg-indigo-600,
main a.bg-indigo-600 {
    background-color: var(--cx-blue) !important;
    border-color: var(--cx-blue) !important;
    color: #ffffff !important;
}

main .bg-indigo-50 {
    background-color: var(--cx-blue-soft) !important;
}

main .border-indigo-100,
main .border-blue-100,
main .border-gray-100,
main .border-gray-200 {
    border-color: var(--cx-border) !important;
}

thead.bg-white,
thead.bg-gray-50 {
    background-color: #f4f9fd !important;
}

@media (max-width: 767px) {
    .support-page-heading {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 1rem;
    }

    .support-page-heading--compact {
        align-items: flex-start;
        min-height: auto;
        padding: 0.8rem 1rem;
    }

    .support-page-heading--compact h1 {
        position: static;
        width: 100%;
        transform: none;
        text-align: left;
        white-space: normal;
    }

    .support-page-heading--compact .support-count-pill {
        margin-left: 0;
    }
}

:root.dark,
:root.dark-mode,
html[data-theme="dark"] {
    color-scheme: dark;
}

.theme-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: #3730a3;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(12px);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: #eef2ff;
}

.header-shell {
    position: relative;
    gap: 1rem;
}

.header-left,
.header-right {
    position: relative;
    z-index: 2;
}

.header-center-title {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: min(560px, 34vw);
    gap: 0.65rem;
    transform: translate(-50%, -50%);
    font-size: 0.95rem;
    line-height: 1.1;
    pointer-events: none;
}

.header-center-pill {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid #b9ddf5;
    border-radius: 9999px;
    background: #ffffff;
    color: var(--cx-blue-dark);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-theme-toggle {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    min-height: 2.35rem;
    padding: 0.55rem 0.75rem;
    box-shadow: none;
    backdrop-filter: none;
}

.header-theme-toggle:hover {
    transform: none;
}

.ticket-equipment-collapse summary::-webkit-details-marker {
    display: none;
}

.ticket-equipment-collapse summary::marker {
    content: '';
}

.ticket-equipment-toggle::before {
    content: '+';
}

.ticket-equipment-collapse[open] .ticket-equipment-toggle::before {
    content: '-';
}

.ticket-equipment-summary:hover {
    background-color: #eef2ff;
}

.ticket-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    justify-content: start;
}

@media (min-width: 640px) {
    .ticket-grid {
        grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    }
}

@media (min-width: 1024px) {
    .ticket-grid {
        grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1280px) {
    .ticket-grid {
        grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
    }
}

@media (min-width: 1536px) {
    .ticket-grid {
        grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    }
}

.ticket-grid > * {
    min-width: 0;
}

.ticket-grid > .bg-white,
.ticket-grid > div {
    border-color: var(--cx-border) !important;
    border-radius: 0.9rem !important;
    background: var(--cx-card) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07) !important;
}

.ticket-grid > div:hover {
    box-shadow: 0 20px 46px rgba(0, 114, 206, 0.13) !important;
    border-color: #a8d8f4 !important;
}

.ticket-grid .bg-gray-50\/50 {
    background: linear-gradient(180deg, #ffffff, #f7fbfe) !important;
}

.ticket-grid h3 {
    color: #142f47 !important;
    font-weight: 700 !important;
}

.ticket-grid .ticket-equipment-summary {
    background: #f4f9fd !important;
    color: #20445f !important;
}

.ticket-grid .ticket-equipment-summary:hover {
    background-color: var(--cx-blue-soft) !important;
}

.ticket-grid .ticket-equipment-toggle {
    color: var(--cx-blue) !important;
    border-color: #b9ddf5 !important;
}

.ticket-grid a {
    color: var(--cx-blue-dark) !important;
}

.ticket-grid .px-3.py-2.bg-gray-50 {
    background: #ffffff !important;
}

@media (max-width: 767px) {
    main.app-container {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .theme-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .header-theme-toggle {
        right: auto;
        bottom: auto;
    }
}

@media (min-width: 1920px) {
    body {
        font-size: 15px;
    }
}

.theme-toggle span {
    display: none;
}

@media (min-width: 640px) {
    .theme-toggle span {
        display: inline;
    }
}

html.dark body,
html.dark-mode body,
html[data-theme="dark"] body,
body.dark,
body.dark-mode,
html.dark .bg-slate-50,
html.dark .bg-gray-50,
html.dark-mode .bg-slate-50,
html.dark-mode .bg-gray-50,
html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .bg-gray-50 {
    background-color: #0f172a !important;
    color: #e5e7eb !important;
}

html.dark .bg-white,
html.dark .bg-slate-50\/50,
html.dark .bg-slate-50\/40,
html.dark .bg-gray-50\/50,
html.dark .bg-purple-50\/30,
html.dark .bg-emerald-50\/30,
html.dark-mode .bg-white,
html.dark-mode .bg-slate-50\/50,
html.dark-mode .bg-slate-50\/40,
html.dark-mode .bg-gray-50\/50,
html.dark-mode .bg-purple-50\/30,
html.dark-mode .bg-emerald-50\/30,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-slate-50\/50,
html[data-theme="dark"] .bg-slate-50\/40,
html[data-theme="dark"] .bg-gray-50\/50,
html[data-theme="dark"] .bg-purple-50\/30,
html[data-theme="dark"] .bg-emerald-50\/30 {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .bg-slate-100,
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .bg-indigo-50,
html[data-theme="dark"] .bg-purple-50,
html[data-theme="dark"] .bg-sky-50,
html[data-theme="dark"] .bg-emerald-50,
html[data-theme="dark"] .bg-amber-50,
html[data-theme="dark"] .bg-blue-50,
html[data-theme="dark"] .bg-red-50,
html[data-theme="dark"] .bg-green-50,
html.dark .bg-slate-100,
html.dark .bg-gray-100,
html.dark .bg-indigo-50,
html.dark .bg-purple-50,
html.dark .bg-sky-50,
html.dark .bg-emerald-50,
html.dark .bg-amber-50,
html.dark .bg-blue-50,
html.dark .bg-red-50,
html.dark .bg-green-50 {
    background-color: #1f2937 !important;
}

html[data-theme="dark"] .bg-indigo-900,
html.dark .bg-indigo-900 {
    background-color: #020617 !important;
}

html[data-theme="dark"] .divide-gray-50 > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-50 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

html[data-theme="dark"] a:not(.bg-indigo-600):not(.bg-emerald-600):not(.bg-purple-600):not(.bg-slate-800),
html.dark a:not(.bg-indigo-600):not(.bg-emerald-600):not(.bg-purple-600):not(.bg-slate-800) {
    color: #c7d2fe;
}

html[data-theme="dark"] .rounded-xl,
html[data-theme="dark"] .rounded-lg,
html[data-theme="dark"] .rounded-md,
html.dark .rounded-xl,
html.dark .rounded-lg,
html.dark .rounded-md {
    border-color: #334155;
}

html[data-theme="dark"] [class*="border-"],
html.dark [class*="border-"] {
    border-color: #334155 !important;
}

html[data-theme="dark"] .text-gray-400,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-slate-500,
html.dark .text-gray-400,
html.dark .text-gray-500,
html.dark .text-slate-500 {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-slate-700,
html.dark .text-gray-600,
html.dark .text-gray-700,
html.dark .text-slate-600,
html.dark .text-slate-700 {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-900,
html.dark .text-gray-800,
html.dark .text-gray-900,
html.dark .text-slate-800,
html.dark .text-slate-900 {
    color: #f8fafc !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html.dark input,
html.dark textarea,
html.dark select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html.dark table,
html.dark thead,
html.dark tbody,
html.dark tr {
    color: #e5e7eb !important;
}

html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .hover\:bg-gray-50\/50:hover,
html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-gray-50:hover,
html.dark tbody tr:hover,
html.dark .hover\:bg-gray-50\/50:hover,
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-gray-50:hover {
    background-color: #1e293b !important;
}

html[data-theme="dark"] .shadow-sm,
html[data-theme="dark"] .shadow-md,
html[data-theme="dark"] .shadow-lg,
html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg {
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .theme-toggle,
html.dark .theme-toggle {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
}

html[data-theme="dark"] .theme-toggle:hover,
html.dark .theme-toggle:hover {
    background: #1e293b;
}

html[data-theme="dark"] .ticket-equipment-summary,
html.dark .ticket-equipment-summary {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .ticket-equipment-summary:hover,
html.dark .ticket-equipment-summary:hover {
    background-color: #273449 !important;
}

html[data-theme="dark"] .ticket-equipment-toggle,
html.dark .ticket-equipment-toggle {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #c7d2fe !important;
}

/* Animação suave para as linhas da tabela */
tbody tr {
    transition: background-color 0.2s ease-in-out;
}

/* Estilo auxiliar para simular estado :checked no radio de categoria do Tailwind */
.has-\[\:checked\]\:border-purple-300:has(input:checked) {
    border-color: #d8b4fe;
}
.has-\[\:checked\]\:bg-purple-50:has(input:checked) {
    background-color: #faf5ff;
}
.has-\[\:checked\]\:border-sky-300:has(input:checked) {
    border-color: #7dd3fc;
}
.has-\[\:checked\]\:bg-sky-50:has(input:checked) {
    background-color: #f0f9ff;
}
.has(input:checked) .fa-check-circle {
    display: inline-block;
    opacity: 1;
}

/* Tema noturno final: deve ficar no fim para vencer as regras do tema claro. */
html[data-theme="dark"],
html[data-theme="dark"] body,
html.dark,
html.dark body {
    background: #0f172a !important;
    color: #e5edf7 !important;
}

html[data-theme="dark"] body,
html.dark body {
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 114, 206, 0.18), transparent 28rem),
        linear-gradient(180deg, #0b1220 0%, #0f172a 45%, #111827 100%) !important;
}

html[data-theme="dark"] header.bg-white,
html[data-theme="dark"] header.bg-indigo-900,
html.dark header.bg-white,
html.dark header.bg-indigo-900 {
    background: rgba(11, 18, 32, 0.97) !important;
    color: #e5edf7 !important;
    border-bottom-color: #26364c !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] header .bg-indigo-50,
html[data-theme="dark"] header .bg-slate-100,
html[data-theme="dark"] header .bg-white\/10,
html.dark header .bg-indigo-50,
html.dark header .bg-slate-100,
html.dark header .bg-white\/10 {
    background-color: #172235 !important;
    color: #dbeafe !important;
    border-color: #2e4967 !important;
}

html[data-theme="dark"] .support-page-heading,
html.dark .support-page-heading {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.98)),
        radial-gradient(circle at top right, rgba(0, 114, 206, 0.22), transparent 30rem) !important;
    border-color: #2b3d55 !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .support-page-heading h1,
html.dark .support-page-heading h1 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .support-page-heading .support-subtitle,
html.dark .support-page-heading .support-subtitle {
    color: #b8c7d9 !important;
}

html[data-theme="dark"] .support-count-pill,
html.dark .support-count-pill {
    background: #0b1220 !important;
    color: #bfdbfe !important;
    border-color: #2e4967 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] main .bg-white,
html[data-theme="dark"] .ticket-grid > .bg-white,
html[data-theme="dark"] .ticket-grid > div,
html.dark main .bg-white,
html.dark .ticket-grid > .bg-white,
html.dark .ticket-grid > div {
    background: #111827 !important;
    color: #e5edf7 !important;
    border-color: #2b3d55 !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] main .bg-slate-50,
html[data-theme="dark"] main .bg-gray-50,
html[data-theme="dark"] main .bg-slate-50\/50,
html[data-theme="dark"] .ticket-grid .bg-gray-50\/50,
html.dark main .bg-slate-50,
html.dark main .bg-gray-50,
html.dark main .bg-slate-50\/50,
html.dark .ticket-grid .bg-gray-50\/50 {
    background: #162033 !important;
    color: #e5edf7 !important;
}

html[data-theme="dark"] .ticket-grid h3,
html[data-theme="dark"] main .text-gray-700,
html[data-theme="dark"] main .text-gray-800,
html[data-theme="dark"] main .text-gray-900,
html.dark .ticket-grid h3,
html.dark main .text-gray-700,
html.dark main .text-gray-800,
html.dark main .text-gray-900 {
    color: #f8fafc !important;
}

html[data-theme="dark"] main .text-gray-400,
html[data-theme="dark"] main .text-gray-500,
html[data-theme="dark"] main .text-gray-600,
html.dark main .text-gray-400,
html.dark main .text-gray-500,
html.dark main .text-gray-600 {
    color: #a9bbcf !important;
}

html[data-theme="dark"] .ticket-grid .ticket-equipment-summary,
html.dark .ticket-grid .ticket-equipment-summary {
    background: #1e293b !important;
    color: #e5edf7 !important;
    border-color: #2b3d55 !important;
}

html[data-theme="dark"] .ticket-grid .ticket-equipment-toggle,
html.dark .ticket-grid .ticket-equipment-toggle {
    background: #0b1220 !important;
    color: #93c5fd !important;
    border-color: #2e4967 !important;
}

html[data-theme="dark"] .ticket-grid .px-3.py-2.bg-gray-50,
html.dark .ticket-grid .px-3.py-2.bg-gray-50 {
    background: #111827 !important;
}

html[data-theme="dark"] footer,
html.dark footer {
    background: #0b1220 !important;
    border-top-color: #26364c !important;
    color: #a9bbcf !important;
}

html[data-theme="dark"] .theme-toggle,
html.dark .theme-toggle {
    background: #111827 !important;
    color: #e5edf7 !important;
    border-color: #93c5fd !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
}
