/* ===================================================
   RONDA NEWS — Design System
   Estética editorial: tipografia forte, superfícies
   limpas, hierarquia clara, sem sombras decorativas.
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --bg:         #f5f7fb;
    --surface:    #ffffff;
    --border:     #e4e4e0;
    --border-md:  #d0d0cb;
    --text-1:     #111110;
    --text-2:     #555552;
    --text-3:     #999894;
    --blue:       #1a56db;
    --blue-bg:    #eff4ff;
    --blue-bd:    #c7d7fd;
    --blue-dark:  #185FA5;
    --amber:      #854F0B;
    --amber-bg:   #fffbeb;
    --amber-bd:   #fde68a;
    --amber-dark: #BA7517;
    --red:        #b91c1c;
    --red-bg:     #fef2f2;
    --red-bd:     #fecaca;
    --green:      #166534;
    --green-bg:   #f0fdf4;
    --green-bd:   #bbf7d0;
    --green-dark: #3B6D11;
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --sidebar-w:  240px;
    --sidebar-bg: #1a56db;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== TELAS AUTH ===== */
.tela { display: none; }
.tela.active { display: flex; }

#tela-app { min-height: 100vh; }

#tela-login, #tela-cadastro {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.auth-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-box .logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 32px;
}

.auth-brand { font-size: 15px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-1); }
.auth-brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: 0.5px; }

.auth-box h2 { font-size: 20px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.auth-box p.subtitulo { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.auth-erro { color: var(--red); font-size: 12px; margin-top: 6px; min-height: 16px; }
.auth-ok   { color: var(--green); font-size: 12px; margin-top: 6px; min-height: 16px; }
.auth-link { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-2); }
.auth-link a { color: var(--blue); cursor: pointer; font-weight: 500; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* ===== LAYOUT PRINCIPAL ===== */
.container { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.logo-wordmark {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
}

.logo-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Oculta o emoji do logo-icon original */
.logo-icon { display: none; }

.menu { flex: 1; padding: 12px 0; }

.menu-section {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 12px 20px 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 2px solid transparent;
    font-weight: 400;
}

.menu-item:hover { background: rgba(255,255,255,0.08); color: #ffffff; }

.menu-item.active {
    color: #ffffff;
    font-weight: 500;
    background: rgba(255,255,255,0.12);
    border-left-color: #ffffff;
}

.menu-item .icon { font-size: 15px; opacity: 0.7; }

.user-profile {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
}

.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 13px; font-weight: 500; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 11px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 0 20px 16px;
    padding: 8px 12px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-logout:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar por página */
.page-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-topbar-title {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-2);
}

.page-topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ===== PÁGINAS ===== */
.page { display: none; flex: 1; }
.page.active { display: flex; flex-direction: column; }

/* Header legado (rondas, fontes, registros, perfil) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 0;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-1);
}

/* ===== BOTÕES ===== */
.btn-primary {
    background: var(--blue);
    color: var(--surface);
    border: none;
    padding: 0 16px;
    height: 34px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-primary:hover { opacity: 0.82; }

.btn-secondary {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 0 16px;
    height: 34px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-secondary:hover { background: var(--bg); }

.btn-full { width: 100%; height: 40px; justify-content: center; font-size: 13px; }

/* ===== DASHBOARD ===== */
.dashboard-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

/* Kanban */
.kanban-wrap { padding: 20px 24px; overflow-y: auto; }

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: start;
}

.kanban-column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.kanban-column:nth-child(1) { border-top: 3px solid var(--blue); }
.kanban-column:nth-child(2) { border-top: 3px solid var(--amber-dark); }
.kanban-column:nth-child(3) { border-top: 3px solid var(--green-dark); }

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.col-hd-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.col-icon-blue  { background: var(--blue-bg); color: var(--blue); }
.col-icon-amber { background: var(--amber-bg); color: var(--amber-dark); }
.col-icon-green { background: var(--green-bg); color: var(--green-dark); }

.col-title { font-size: 13px; font-weight: 500; color: var(--text-1); }
.col-sub   { font-size: 10px; color: var(--text-3); margin-top: 1px; }

.col-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    flex-shrink: 0;
}

.col-badge-blue  { background: var(--blue); }
.col-badge-amber { background: var(--amber-dark); }
.col-badge-green { background: var(--green-dark); }

.column-header h3 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.col-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.col-dot-blue   { background: #378ADD; }
.col-dot-amber  { background: #BA7517; }
.col-dot-green  { background: #3B6D11; }

/* Remove border-bottom colorida legada */
.column-header.em-andamento,
.column-header.factual,
.column-header.concluida { border-bottom: 1px solid var(--border); }

.count {
    font-size: 11px;
    color: var(--text-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 1px 8px;
    font-weight: 500;
}

.column-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 200px;
    padding: 8px;
}

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 6px;
    transition: border-color 0.15s;
    border-left: 3px solid var(--blue);
    cursor: default;
}

.card:hover { border-color: var(--border-md); }
.card:last-child { margin-bottom: 0; }

.card.quente    { border-left-color: var(--amber-dark); background: #fffbf5; }
.card.concluida { border-left-color: var(--green-dark); opacity: 0.75; }

.card.urgente {
    border-left-color: var(--red) !important;
    background: var(--red-bg);
}

.badge-urgente {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid var(--red-bd);
    border-radius: 99px;
    padding: 2px 7px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.35;
    margin-bottom: 4px;
}

.card-source {
    font-size: 11px;
    color: var(--blue);
    margin-bottom: 4px;
}

.card-description {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-3);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.btn-small {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-2);
    transition: background 0.15s;
    letter-spacing: 0.2px;
    height: 26px;
    display: inline-flex;
    align-items: center;
}

.btn-small:hover { background: var(--bg); color: var(--text-1); border-color: var(--border-md); }

/* Ação primária — azul */
.btn-action-primary {
    height: 26px;
    padding: 0 10px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: var(--blue);
    color: #fff;
    white-space: nowrap;
}

.btn-action-primary-amber { background: var(--amber-dark); }
.btn-action-primary-green { background: var(--green-dark); }

/* Ação secundária — neutro */
.btn-action-secondary {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-2);
    white-space: nowrap;
}

.btn-action-secondary:hover { background: var(--bg); }

/* Menu 3 pontos */
.btn-more {
    height: 26px;
    width: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-more:hover { background: var(--bg); }

/* Dropdown do menu 3 pontos */
.card-more-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    z-index: 50;
    min-width: 130px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-more-menu.open { display: block; }

.card-more-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.card-more-item:last-child { border-bottom: none; }
.card-more-item:hover { background: var(--bg); }
.card-more-item.danger { color: var(--red); }

.card-wrap { position: relative; }

.btn-editar { color: var(--blue); border-color: var(--blue-bd); }
.btn-editar:hover { background: var(--blue-bg); color: var(--blue); }

.btn-deletar { color: var(--red); border-color: var(--red-bd); }
.btn-deletar:hover { background: var(--red-bg); color: var(--red); }

/* ===== TEMPO PARADO ===== */
.card-tempo-parado {
    font-size: 10px;
    color: var(--text-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 2px 8px;
    display: inline-block;
    margin-bottom: 6px;
}

.card-alerta {
    font-size: 10px;
    color: var(--amber);
    background: var(--amber-bg);
    border: 1px solid var(--amber-bd);
    border-radius: 99px;
    padding: 2px 8px;
    display: inline-block;
    font-weight: 500;
    margin-bottom: 6px;
}

/* ===== MURAL + PAINEL DIREITO ===== */
.feed-sidebar {
    border-left: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.panel-hd-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-2);
}

.panel-hd-mes {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
}

/* Mural legado — mantém compatibilidade */
.feed-sidebar h2 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.feed-list { overflow-y: auto; }

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.feed-item:last-child { border-bottom: none; }

.feed-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
    margin-top: 5px;
}

.feed-item-body { flex: 1; min-width: 0; }

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}

.feed-author { font-size: 12px; font-weight: 500; color: var(--text-1); }
.feed-time   { font-size: 10px; color: var(--text-3); }

.feed-content {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-attachment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--blue);
    background: var(--blue-bg);
    border: 1px solid var(--blue-bd);
    padding: 2px 8px;
    border-radius: 99px;
}

/* Input do mural */
.mural-form {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.mural-form .search-input {
    flex: 1;
    font-size: 12px;
    height: 32px;
    padding: 0 10px;
}

.mural-form .btn-primary {
    height: 32px;
    padding: 0 12px;
    font-size: 11px;
}

/* ===== CAIXAS DE CONTEÚDO (rondas, fontes, registros) ===== */
.content-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 0 28px 28px;
}

.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 0 12px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-1);
    background: var(--surface);
    transition: border-color 0.15s;
}

.search-input:focus { outline: none; border-color: var(--border-md); }

.filter-select {
    padding: 0 12px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-1);
    background: var(--surface);
    cursor: pointer;
}

/* ===== RONDAS ===== */
.rondas-list { display: flex; flex-direction: column; gap: 8px; }

.ronda-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s;
}

.ronda-item:hover { border-color: var(--border-md); }

.ronda-info h3 { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 3px; }
.ronda-meta    { font-size: 12px; color: var(--text-3); }

.ronda-status {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 99px;
}

.ronda-status.ativa   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.ronda-status.pausada { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd); }

/* ===== FONTES ===== */
.fontes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.fonte-card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.15s;
}

.fonte-card:hover { border-color: var(--border-md); }

.fonte-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.fonte-nome   { font-size: 14px; font-weight: 500; color: var(--text-1); }

.fonte-tipo {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid var(--blue-bd);
}

.fonte-contato  { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.fonte-confianca { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }

.confianca-alta  { color: var(--green); font-weight: 500; }
.confianca-media { color: var(--amber); font-weight: 500; }
.confianca-baixa { color: var(--red); font-weight: 500; }

/* ===== REGISTROS ===== */
.registros-timeline { display: flex; flex-direction: column; gap: 10px; }

.registro-item {
    padding: 14px 16px;
    border-left: 3px solid var(--border-md);
    background: var(--bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.registro-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.registro-titulo  { font-size: 13px; font-weight: 500; color: var(--text-1); }
.registro-data    { font-size: 11px; color: var(--text-3); }

/* ===== FORMS ===== */
.form-section { margin-bottom: 28px; }

.form-section h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 16px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    color: var(--text-1);
    background: var(--surface);
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-md);
}

.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.checkbox-label input { width: auto; }

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 16px; font-weight: 600; color: var(--text-1); }

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-3);
    line-height: 1;
    padding: 2px;
}

.close-btn:hover { color: var(--text-1); }

/* ===== RESPONSIVE ===== */

/* Tablet largo — mural some */
@media (max-width: 1200px) {
    .dashboard-body { grid-template-columns: 1fr; }
    .feed-sidebar { display: none; }
}

/* Tablet — kanban 2 colunas */
@media (max-width: 1024px) {
    .kanban-board { grid-template-columns: 1fr 1fr; }
}

/* Mobile — layout completo */
@media (max-width: 768px) {

    /* Sidebar vira drawer oculto */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 200;
        width: 260px;
    }

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

    /* Overlay escuro atrás do drawer */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 199;
    }

    .sidebar-overlay.active { display: block; }

    .main-content { margin-left: 0; }

    /* Topbar mobile: hambúrguer + título + botão novo */
    .page-topbar {
        padding: 0 14px;
        gap: 8px;
    }

    .page-topbar-actions {
        gap: 6px;
    }

    /* Esconde busca e filtro de autor no mobile — espaço demais */
    #search-kanban,
    #filter-autor { display: none; }

    /* Stats strip mais compacto */
    .stat-item { padding: 10px 12px; }
    .stat-n    { font-size: 18px; }
    .stat-l    { font-size: 9px; }

    /* Kanban coluna única */
    .kanban-board { grid-template-columns: 1fr; }
    .kanban-wrap  { padding: 12px; }

    /* Colunas sem min-height vazia */
    .column-content { min-height: 0; }

    /* Colunas com cards vazios ficam menores */
    .kanban-column:not(:has(.card)) .column-content { min-height: 40px; }

    /* Cards mais compactos */
    .card { padding: 10px 12px; }
    .card-title { font-size: 13px; }
    .card-description { font-size: 12px; }

    /* Botões de ação menores */
    .btn-small { padding: 4px 8px; font-size: 10px; }

    /* Conteúdo de páginas internas */
    .content-box { margin: 12px; padding: 16px; }
    .header { padding: 16px 16px 0; margin-bottom: 12px; }
    .header h1 { font-size: 17px; }

    /* Fontes em coluna única */
    .fontes-grid { grid-template-columns: 1fr; }

    /* Form rows em coluna */
    .form-row { grid-template-columns: 1fr; }

    /* Modal full-width */
    .modal-content { padding: 20px; width: 95%; }

    /* Botão novo no topbar menor */
    .btn-primary { font-size: 11px; padding: 0 12px; }
}

/* ===== FONTE CARD — novo layout ===== */
.fonte-cidade {
    font-size: 11px;
    color: var(--text-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}

.fonte-funcao {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
}

.fonte-obs {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 8px;
    font-style: italic;
}

/* Remove filtro de tipo que não existe mais */
#filter-tipo { display: none; }

/* ===== HAMBÚRGUER (mobile only) ===== */
.btn-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-2);
    padding: 4px 6px;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .btn-hamburger { display: flex; align-items: center; }
}

/* ===== RANKING DO MÊS ===== */
.ranking-panel {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 16px 10px;
}

.ranking-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
}

.ranking-mes {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
}

.ranking-list { padding: 0 8px 8px; }

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.ranking-item:hover { background: var(--bg); }

.ranking-primeiro {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.ranking-pos {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.ranking-info { flex: 1; min-width: 0; }

.ranking-nome {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ranking-stats {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

.ranking-score {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
    flex-shrink: 0;
}

.badge-rank-urgente {
    font-size: 10px;
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-bd);
    border-radius: 99px;
    padding: 1px 6px;
}

.badge-rank-alta {
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid var(--green-bd);
    border-radius: 99px;
    padding: 1px 5px;
}

.ranking-empty {
    font-size: 12px;
    color: var(--text-3);
    padding: 12px 8px;
    text-align: center;
}

/* ===== LGPD ===== */
.lgpd-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.lgpd-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.lgpd-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}

.lgpd-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 3px;
}

.lgpd-item p {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

/* ===== LOGIN SPLIT ===== */
.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

.login-esquerda {
    background: var(--sidebar-bg);
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-brand     { font-size: 11px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase; color: #ffffff; opacity: 0.9; }
.login-brand-sub { font-size: 10px; letter-spacing: 1px; color: rgba(255,255,255,0.35); margin-top: 3px; }

.login-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.login-direita {
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
}

.login-bv {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}

.login-title { font-size: 22px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.login-sub   { font-size: 13px; color: var(--text-2); margin-bottom: 28px; }

@media (max-width: 768px) {
    .login-split { grid-template-columns: 1fr; }
    .login-esquerda { display: none; }
    .login-direita { padding: 48px 28px; min-height: 100vh; }
}

/* ===== DEMANDAS ===== */
.demandas-section {
    border-bottom: 1px solid var(--amber-bd);
    background: var(--amber-bg);
    padding: 10px 8px 8px;
}

.demandas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.demandas-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--amber);
}

.btn-demanda-add {
    height: 24px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    background: var(--amber-dark);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-demanda-add:hover { opacity: 0.85; }

.demanda-card {
    background: var(--surface);
    border: 1px solid var(--amber-bd);
    border-left: 3px solid var(--amber-dark);
    border-radius: var(--radius-md);
    padding: 9px 11px;
    margin-bottom: 6px;
}

.demanda-concluida { opacity: 0.55; border-left-color: var(--green-dark); }

.demanda-responsavel {
    font-size: 11px;
    font-weight: 600;
    color: var(--amber);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demanda-texto {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.35;
    margin-bottom: 6px;
}

.demanda-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-3);
    margin-bottom: 6px;
}

.demanda-actions { display: flex; align-items: center; gap: 6px; }
.demanda-sep { font-size: 10px; color: var(--text-3); text-align: center; padding: 4px 0; letter-spacing: 0.5px; text-transform: uppercase; }
.demanda-empty { font-size: 11px; color: var(--text-3); text-align: center; padding: 8px; }

/* ===== CALENDÁRIO ===== */
#page-calendario { flex: 1; display: flex; flex-direction: column; }
#page-calendario > div[style] { flex: 1; display: flex; flex-direction: column; }

.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cal-nav { display: flex; align-items: center; gap: 12px; }

.cal-btn-vista {
    height: 30px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
    color: var(--text-2);
    transition: all 0.15s;
}

.cal-btn-vista.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.cal-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex: 1;
}

/* Grade mensal */
.cal-grid-mes {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-header-dia {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.cal-dia {
    min-height: 100px;
    padding: 6px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.cal-dia:nth-child(7n) { border-right: none; }
.cal-dia:hover { background: var(--bg); }
.cal-dia-vazio { background: var(--bg); opacity: 0.4; cursor: default; }

.cal-dia-hoje .cal-dia-num {
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-dia-num {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-pauta-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-mais { font-size: 10px; color: var(--text-3); padding: 0 2px; }

/* Tipos */
.cal-tipo-pauta    { background: var(--blue-bg);  color: var(--blue-dark); }
.cal-tipo-gravacao { background: var(--red-bg);   color: var(--red); }
.cal-tipo-reuniao  { background: var(--amber-bg); color: var(--amber); }
.cal-tipo-outro    { background: var(--bg);        color: var(--text-2); border: 1px solid var(--border); }

/* Grade semanal */
.cal-grid-semana {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    max-height: 70vh;
    overflow-y: auto;
}

.cal-sem-header {
    padding: 8px 4px;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 2;
}

.cal-sem-header.cal-dia-hoje { background: var(--blue-bg); color: var(--blue); }
.cal-sem-num { font-size: 16px; font-weight: 500; color: var(--text-1); }

.cal-hora {
    padding: 4px 6px;
    font-size: 10px;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    text-align: right;
    white-space: nowrap;
}

.cal-slot {
    min-height: 40px;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    padding: 2px;
    cursor: pointer;
}

.cal-slot:hover { background: var(--blue-bg); }

.cal-evento {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    line-height: 1.3;
}

/* Grade diária */
.cal-grid-dia { max-height: 70vh; overflow-y: auto; }

.cal-dia-linha {
    display: grid;
    grid-template-columns: 50px 1fr;
    border-bottom: 1px solid var(--border);
}

.cal-slot-dia { min-height: 50px; padding: 4px 8px; cursor: pointer; }
.cal-slot-dia:hover { background: var(--blue-bg); }

.cal-evento strong { display: block; font-size: 12px; }
.cal-evento span   { font-size: 10px; opacity: 0.75; }
.cal-evento div    { font-size: 11px; opacity: 0.8; margin-top: 2px; }

/* Responsivo calendário */
@media (max-width: 768px) {
    .cal-toolbar { flex-direction: column; gap: 10px; align-items: flex-start; }
    .cal-dia { min-height: 60px; }
    .cal-dia-num { font-size: 11px; }
}

/* ===== CALENDÁRIO — correção altura total ===== */
#page-calendario {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 52px);
}

#page-calendario .header {
    flex-shrink: 0;
}

#page-calendario > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cal-toolbar { flex-shrink: 0; }

.cal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cal-grid-mes {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    grid-template-rows: auto repeat(6, 1fr);
}

.cal-dia {
    min-height: 0;
}

/* ===== CALENDÁRIO — altura forçada ===== */
#page-calendario {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 52px) !important;
}

#page-calendario > * { flex-shrink: 0; }

#page-calendario > div[style*="padding"] {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#page-calendario .cal-body {
    flex: 1 !important;
    overflow: auto !important;
    min-height: 500px;
}

#page-calendario .cal-grid-mes {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    grid-auto-rows: minmax(120px, 1fr) !important;
    height: 100% !important;
    min-height: 500px;
}
