/* Padrões de talkthink2/static/painel.css: Arial, azul institucional e Font Awesome. */
:root {
  --ink: #0b1e39;
  --muted: #64748b;
  --line: #d6e0ee;
  --bg: #f8fafc;
  --panel: #fff;
  --nav: #1a2c3f;
  --accent: #0b5fc0;
  --blue: #0b5fc0;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #dc2626;
  --shadow: 0 4px 14px rgba(11,30,57,.08);
}
body { font-family: Arial, 'Segoe UI Emoji', sans-serif; }
.shell button, .shell input, .shell textarea, .shell select, .drawer button, .drawer input, .drawer select { font-family: Arial, sans-serif; }
.shell { display: block; padding-top: 59px; }
.sidebar { inset: 0 0 auto; width: 100%; height: 59px; padding: 6px 24px; flex-direction: row; align-items: center; gap: 24px; background: #1a2c3f; }
.brand { padding: 0; gap: 12px; flex-shrink: 0; }
.brand img { width: 137px; height: 35px; object-fit: contain; }
.brand > span { font: 400 12px Arial,sans-serif; letter-spacing: 0; color: #cbd5e1; border-left: 1px solid #64748b; padding-left: 12px; }
#nav { flex-direction: row; gap: 8px; margin-left: auto; }
.nav-item { position: relative; color: #fff; padding: 6px 10px; min-width: 38px; min-height: 34px; border-radius: 6px; gap: 8px; font-family: Arial,sans-serif; }
.nav-item .nav-icon { font-size: 18px; }
.nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.25); box-shadow: none; }
.nav-item.active { box-shadow: inset 0 -2px #fff; }
.nav-badge { position: absolute; right: -3px; top: -4px; background: #dc2626; color: #fff; font-size: 9px; padding: 2px 5px; }
.sidebar-foot { margin: 0; position: relative; flex-shrink: 0; }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: #40566d; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.account-avatar:hover, .account-avatar[aria-expanded="true"] { background: #0b5fc0; border-color: #93c5fd; }
.account-menu { position: absolute; top: calc(100% + 12px); right: 0; width: min(280px,calc(100vw - 24px)); padding: 6px; background: #fff; color: #0b1e39; border: 1px solid #d6e0ee; border-radius: 12px; box-shadow: 0 12px 32px #0b1e3926; }
.account-menu[hidden] { display: none; }
.account-menu-info { display: grid; gap: 5px; padding: 12px; }
.account-menu-info > span { font-size: 11px; color: #64748b; }
.account-menu-info > span:not(:first-child) { margin-top: 8px; }
.account-menu-info strong { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.account-menu #logoutButton { display: flex; align-items: center; gap: 9px; width: 100%; background: #fff; color: #b91c1c; border: 0; border-top: 1px solid #edf1f7; border-radius: 0 0 7px 7px; padding: 12px; text-align: left; font-size: 13px; cursor: pointer; }
.account-menu #logoutButton:hover { background: #fef2f2; }
.sidebar .account-menu button:focus-visible { outline-color: #0b5fc0; }
.environment { display: none; }
.user { padding: 0; gap: 10px; }
.user > span { background: #64748b; color: #fff; border-radius: 50%; width: 30px; height: 30px; }
.user small, .user b { color: #cbd5e1; }
.user div { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.user strong { overflow: hidden; text-overflow: ellipsis; }
.topbar { top: 59px; height: 62px; padding: 0 24px; }
.crumb span, .crumb b { color: #64748b; }
.search { width: 270px; }
.search input, .search kbd { font-family: Arial,sans-serif; }
.search kbd { white-space: nowrap; }
.primary { background: #0b5fc0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primary:hover { background: #094ba1; }
.secondary, .period, .action-btn { color: #0b1e39; border-color: #d6e0ee; }
.secondary:hover, .period:hover, .action-btn:hover { background: #eff6ff; border-color: #0b5fc0; }
button:focus-visible, a:focus-visible { outline: 2px solid #0b5fc0; outline-offset: 3px; }
.sidebar button:focus-visible { outline-color: #fff; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #0b5fc0; outline-offset: 1px; }
.notification i { position: static; width: auto; height: auto; background: transparent; border: 0; border-radius: 0; }
.notification-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; background: #dc2626; border-radius: 50%; }
.content { padding: 24px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { color: #0b1e39; font: 700 24px/1.2 Arial,sans-serif; letter-spacing: 0; margin: 6px 0 8px; }
.page-head p { color: #64748b; line-height: 1.45; font-size: 14px; }
.eyebrow { color: #64748b; letter-spacing: .7px; }
.panel-head h2, .app-card h3, .ticket-detail h2, .drawer-head h2 { font-family: Arial,sans-serif; color: #0b1e39; }
.metric-value, .app-card-stats b { font-family: Arial,sans-serif; }
.metric, .panel, .app-card, .media-card { box-shadow: var(--shadow); }
.metric-icon, .app-logo, .channel-icon { background: #eff6ff; color: #0b5fc0; }
.panel-head a { color: #0b5fc0; }
.bar, .legend i { background: #0b5fc0; }
.bar.alt, .legend .alt { background: #93c5fd; border-color: #60a5fa; }
.healthy, .pill.active { background: #dcfce7; color: #15803d; }
.warning { background: #fef3c7; color: #92400e; }
.offline, .critical { background: #fee2e2; color: #b91c1c; }
.neutral { background: #f1f5f9; color: #64748b; }
.data-table th { background: #f8fafc; color: #64748b; font-size: 11px; }
.data-table td { font-size: 13px; }
.data-table tbody tr:hover { background: #f8fafc; }
.table-panel { overflow-x: auto; }
.table-toolbar { flex-wrap: wrap; }
.channel-label { display: inline-flex; align-items: center; gap: 7px; }
.channel-image { width: 20px; height: 20px; object-fit: contain; }
.action-btn { font: 600 12px Arial,sans-serif; padding: 7px 9px; }
.action-btn i { margin-right: 4px; }
.media-preview.logo-art { background: #1a2c3f; color: #fff; }
.media-preview.cover { background: #e2e8f0; }
.media-asset { max-width: 70%; max-height: 75px; object-fit: contain; }
.media-preview.cover .media-asset { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.media-type { z-index: 1; }
.mini-modal i { background: #0b5fc0; }
.ticket-item.active { color: #0b1e39; background: #eff6ff; border-left-color: #0b5fc0; }
.message-avatar { background: #e2e8f0; color: #0b1e39; }
.bubble { background: #f1f5f9; }
.form-note { background: #eff6ff; color: #2463a9; }
.drawer { overflow-y: auto; }
.drawer form { padding-bottom: 80px; }
.drawer-actions { position: sticky; bottom: 0; background: #fff; padding-bottom: 10px; }
.drawer input:focus, .drawer select:focus { border-color: #0b5fc0; box-shadow: 0 0 0 3px rgba(11,95,192,.1); }
.toast { background: #1a2c3f; }
.toast > span { color: #86efac; }
.menu-btn { display: none; }
@media(max-width: 780px) {
  .sidebar { transform: none; padding: 6px 12px; gap: 12px; }
  .brand > span, .user div, .user b { display: none; }
  .sidebar-foot { margin-left: auto; }
  #nav { display: none; position: absolute; top: 121px; left: 0; right: 0; margin: 0; padding: 12px; background: #1a2c3f; flex-direction: column; box-shadow: var(--shadow); }
  .sidebar.open #nav { display: flex; }
  .nav-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .nav-item { min-height: 42px; }
  .nav-badge { position: static; margin-left: auto; }
  .menu-btn { display: inline-block; margin-right: 10px; }
  .topbar { padding: 0 12px; }
  .content { padding: 20px 12px; }
  .table-toolbar { gap: 8px; }
  .filter-input { width: 100%; min-width: 0; }
  .health-row { grid-template-columns: 31px minmax(0,1fr) auto; padding: 8px; gap: 6px; }
  .health-row strong { overflow-wrap: anywhere; }
  .toast { right: 12px; left: 12px; bottom: 12px; }
}
@media(max-width: 480px) {
  .top-actions .primary { font-size: 14px; width: 38px; padding: 0; }
  .top-actions .primary span { display: none; }
  .page-head h1 { font-size: 24px; }
  .drawer { padding: 20px; }
}
.media-preview.cover .media-asset { position: absolute; inset: 0; } .media-type { color: #0b1e39; } .media-preview.brand-icon { background: #fff; }
.signal-schedule { color: #64748b; font-size: 13px; margin: -4px 0 20px; line-height: 1.6; }
.app-thumbnails { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 14px; }
.app-thumbnail { --card-accent: #0b5fc0; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 14px; text-align: left; background: #fff; border: 1px solid #dce5ef; border-top: 3px solid var(--card-accent); border-radius: 14px; padding: 16px; color: #0b1e39; cursor: pointer; box-shadow: 0 2px 8px #1a2c3f06; min-width: 0; font: 13px Arial,sans-serif; transition: border-color .15s,box-shadow .15s,transform .15s; }
.app-thumbnail.is-offline { --card-accent: #dc5962; }
.app-thumbnail:hover { border-color: var(--card-accent); box-shadow: 0 6px 18px #0b1e3912; transform: translateY(-2px); }
.app-thumbnail:focus-visible { outline: 3px solid #0b5fc0; outline-offset: 3px; }
.thumbnail-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.app-thumbnail h2 { font: 700 16px/1.35 Arial,sans-serif; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.thumbnail-top .pill { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 11px; padding: 4px 8px; }
.thumbnail-stats { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(0,.7fr) minmax(0,.9fr); gap: 10px; background: #f5f8fc; border: 1px solid #edf1f7; border-radius: 9px; padding: 12px 10px; align-items: center; }
.thumbnail-label { display: block; color: #63758b; font-size: 10px; line-height: 1.4; font-weight: 400; }
.thumbnail-monthly-fee { align-self: flex-start; max-width: 100%; box-sizing: border-box; padding: 5px 8px; border-radius: 6px; background: #eef5ff; color: #0b5fc0; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.thumbnail-monthly-fee { border: 1px solid #cbdff9; cursor: pointer; font-family: inherit; text-align: left; }
.thumbnail-monthly-fee:hover { background: #dceaff; }
.thumbnail-footer button.thumbnail-open { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; color: #0b5fc0; font-weight: 700; }
.credit-report-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; }
.credit-report-filter label { display: grid; gap: 6px; flex: 1 1 160px; }
.credit-report-filter input { min-width: 0; width: 100%; box-sizing: border-box; }
.credit-report-totals { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.credit-report-totals div { background: #f5f8fc; border-radius: 9px; padding: 16px; }
.credit-report-totals dt { color: #63758b; font-size: 13px; }
.credit-report-totals dd { margin: 8px 0 0; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.thumbnail-balance strong { display: block; font-size: 19px; line-height: 1.3; margin-top: 3px; overflow-wrap: anywhere; }
.thumbnail-stat { text-align: center; border-left: 1px solid #dce5ef; }
.thumbnail-stat strong { display: block; font-size: 18px; line-height: 1.4; }
.thumbnail-stat strong span { font-size: 12px; font-weight: 400; color: #63758b; }
.thumbnail-alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.app-thumbnail .thumbnail-tickets, .thumbnail-webhook-alert { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; line-height: 1.5; padding: 4px 7px; border-radius: 6px; color: #64748b; background: #f5f8fc; }
.app-thumbnail .thumbnail-tickets.has-tickets { color: #9a3412; background: #fff0e5; }
.thumbnail-webhook-alert { color: #92400e; background: #fff6da; }
.thumbnail-activity { margin-top: auto; padding-top: 12px; border-top: 1px solid #edf1f7; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thumbnail-activity span, .thumbnail-activity time { display: block; font-size: 11px; line-height: 1.5; }
.thumbnail-activity span { color: #64748b; }
.thumbnail-activity time { margin-top: 2px; color: #334155; font-variant-numeric: tabular-nums; }
.thumbnail-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 10px; color: #64748b; }
.thumbnail-open { color: #0b5fc0; font-weight: 700; white-space: nowrap; }
.thumbnail-open i { margin-left: 4px; }
.app-thumbnail .delivery-warning { margin: 0; padding: 8px; font-size: 11px; }
@media(prefers-reduced-motion:reduce) { .app-thumbnail { transition: none; } .app-thumbnail:hover { transform: none; } }
.app-accounts-dialog { width: min(900px,calc(100% - 32px)); max-height: calc(100dvh - 40px); border: 1px solid #d6e0ee; border-radius: 14px; padding: 24px; color: #0b1e39; box-shadow: 0 24px 70px #0b1e3940; }
.app-accounts-dialog::backdrop { background: #0b1e3999; }
.accounts-header, .accounts-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.accounts-header h2 { font: 700 22px Arial,sans-serif; margin: 0; overflow-wrap: anywhere; }
.accounts-header button { flex-shrink: 0; }
.accounts-description { color: #64748b; font-size: 13px; line-height: 1.5; }
.accounts-error:empty { display: none; }
.accounts-error { color: #b91c1c; background: #fef2f2; padding: 12px; border-radius: 8px; }
.accounts-toolbar { margin: 20px 0; }
.account-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.account-summary { flex: 1; min-width: 0; }
.account-summary strong { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.account-summary small, .account-summary .url { display: block; margin-top: 6px; font-size: 12px; color: #64748b; max-width: 100%; }
.account-form { border-top: 1px solid #d6e0ee; margin-top: 20px; padding-top: 16px; }
.account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.account-form label[hidden] { display: none; }
.account-form input:not([type=checkbox]), .account-form select { display: block; width: 100%; padding: 10px; margin-top: 7px; border: 1px solid #cbd5e1; border-radius: 8px; font: 14px Arial,sans-serif; }
.account-form small { display: block; font-weight: 400; color: #64748b; margin-top: 6px; }
.account-form-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media(max-width:600px) { .app-accounts-dialog { padding: 16px; } .account-fields { grid-template-columns: 1fr; gap: 0; } .account-row { flex-wrap: wrap; } .account-summary { flex-basis: 70%; } .account-row .row-actions { width: 100%; } .app-thumbnails { grid-template-columns: 1fr; } }
.app-accounts-dialog, .app-accounts-dialog button, .app-accounts-dialog input, .app-accounts-dialog select { font-family: Arial,sans-serif; }
.app-thumbnail { display: flex; flex-direction: column; align-items: stretch; }
.app-thumbnail .thumbnail-meta { margin-top: auto; }

.webhook-warning { display: block; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.5; margin: 8px 0 12px; }
.account-stale { background: #fffbeb; border-left: 3px solid #f59e0b; padding-left: 10px; padding-right: 10px; }
.account-summary .webhook-warning { margin-bottom: 0; }
.delivery-warning { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: 10px; margin: 0 0 12px; font-size: 12px; line-height: 1.5; }
.app-accounts-dialog > .delivery-warning { margin-top: 12px; }

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