/* =========================================================
   Leão Amorim Advocacia — CRM
   Design premium / legaltech. Tema claro + escuro (data-bs-theme).
   Identidade: navy + dourado. Tipografia: Manrope (UI) + Sora (títulos).
   ========================================================= */

/* ---------------- Tokens (tema claro) ---------------- */
:root {
  --navy: #163a5f;
  --navy-700: #102a45;
  --navy-300: #2f6699;
  --gold: #c9a14a;
  --gold-soft: #ddc07f;
  --gold-deep: #a9842f;

  --bg: #eef2f7;
  --bg-grad-1: rgba(201, 161, 74, .06);
  --bg-grad-2: rgba(22, 58, 95, .05);
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --surface-3: #eaeff5;
  --card-grad: linear-gradient(155deg, #ffffff 0%, #eef4fb 55%, #e4ecf7 100%);
  --card-grad-hover: linear-gradient(155deg, #ffffff 0%, #e8f0f9 55%, #dde8f5 100%);
  /* Gradiente da página (escuro em cima → claro embaixo) */
  --page-grad: linear-gradient(180deg, #97a9c3 0%, #b9c6dc 22%, #d8e1ee 50%, #eef2f8 78%, #f8fafd 100%);
  --ink: #0f1d2e;
  --ink-soft: #36465a;
  --muted: #6b7a8d;
  --line: #e3e9f1;
  --line-strong: #d3dbe6;

  --sidebar-bg-1: #14283d;
  --sidebar-bg-2: #0e1d2e;
  --sidebar-ink: #c2cedb;
  --sidebar-ink-dim: #7589a0;

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 29, 46, .05), 0 1px 3px rgba(15, 29, 46, .04);
  --shadow-md: 0 8px 28px rgba(15, 29, 46, .09);
  --shadow-lg: 0 26px 60px rgba(15, 29, 46, .22);
  --ring: 0 0 0 3px rgba(201, 161, 74, .25);

  --t-fast: .16s ease;
  --t: .26s cubic-bezier(.4, 0, .2, 1);
  --t-spring: .5s cubic-bezier(.2, .7, .2, 1);
}

/* ---------------- Tokens (tema escuro) ---------------- */
[data-bs-theme="dark"] {
  --bg: #0a1320;
  --bg-grad-1: rgba(201, 161, 74, .08);
  --bg-grad-2: rgba(40, 90, 140, .12);
  --surface: #111e30;
  --surface-2: #16243a;
  --surface-3: #1c2e47;
  --card-grad: linear-gradient(155deg, #18273e 0%, #131f33 55%, #0f1b2c 100%);
  --card-grad-hover: linear-gradient(155deg, #1c2e47 0%, #16243a 55%, #111d2f 100%);
  /* Gradiente da página (escuro em cima → menos escuro embaixo) */
  --page-grad: linear-gradient(180deg, #03070d 0%, #0a1421 45%, #142539 100%);
  --ink: #e9eef6;
  --ink-soft: #c2cdda;
  --muted: #8aa0b8;
  --line: #233650;
  --line-strong: #2c425f;

  --sidebar-bg-1: #0c1a2a;
  --sidebar-bg-2: #081320;
  --sidebar-ink: #b6c5d6;
  --sidebar-ink-dim: #6c8198;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, .6);

  /* Recolore as variáveis base do Bootstrap p/ casar com a identidade */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Marca d'água da logo — ocupa a tela toda, centralizada e BEM suave */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/static/assets/VERTICAL%2001.png") center center / auto 96vh no-repeat;
  opacity: .045;
  pointer-events: none;
  z-index: -1;
  filter: saturate(.8);
}
[data-bs-theme="dark"] body::before { opacity: .07; }
@media (max-width: 992px) { body::before { background-size: auto 70vh; } }

body {
  background:
    radial-gradient(1100px 560px at 100% -8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 500px at -5% 0%, var(--bg-grad-2), transparent 55%),
    var(--page-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6,
.topbar h3, .brand-fallback, .stat-value, .login-card h4,
.font-display {
  font-family: "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* Scrollbar refinada */
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

/* ---------------- Animações ---------------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -480px 0; } 100% { background-position: 480px 0; } }
.view-fade { animation: fadeInUp .4s cubic-bezier(.2, .7, .2, 1) both; }

/* ================= LOGIN ================= */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 50% -12%, rgba(201, 161, 74, .16), transparent 60%),
    radial-gradient(800px 500px at 80% 110%, rgba(47, 102, 153, .18), transparent 60%),
    linear-gradient(160deg, #14283d 0%, #0c1827 60%, #070f19 100%);
  padding: 1.5rem;
}
#login-screen::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
#login-screen .login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(201, 161, 74, .2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(23, 38, 58, .94), rgba(15, 26, 41, .94));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #e8edf3;
  padding: 2.6rem 2.3rem;
  animation: scaleIn .55s cubic-bezier(.2, .7, .2, 1) both;
}
#login-screen .login-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.login-seal { display: block; width: 122px; height: auto; margin: 0 auto .4rem; mix-blend-mode: screen; animation: fadeIn .9s ease both; }
.login-card h4 { color: #fff; font-weight: 700; }
.login-card .login-sub { color: #9fb0c2; font-size: .86rem; }
.login-card .form-label { color: #c3cedb; font-size: .82rem; font-weight: 600; }
.login-card .form-control {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .68rem .85rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.login-card .form-control::placeholder { color: #7e8ca0; }
.login-card .form-control:focus { border-color: var(--gold); box-shadow: var(--ring); background: rgba(255, 255, 255, .1); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  border: none; color: #1c1405; font-weight: 700;
  border-radius: var(--radius-sm); padding: .7rem;
  letter-spacing: .01em;
  box-shadow: 0 6px 18px rgba(201, 161, 74, .28);
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(201, 161, 74, .4); color: #1c1405; }
.btn-gold:active { transform: translateY(0); }

/* ================= LAYOUT ================= */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg-1), var(--sidebar-bg-2));
  height: 100vh; width: 256px;
  position: fixed; top: 0; left: 0;
  padding: 1.1rem .7rem 1.4rem;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column;
  overflow-y: auto;
  /* rolagem suave e barra discreta (telas/notebooks menores) */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .38); }
/* o menu pode crescer e rolar; a marca fica no topo */
.sidebar .brand-wrap { flex: 0 0 auto; }
.sidebar .nav { flex: 1 1 auto; }
.sidebar .brand-wrap {
  padding: .4rem .6rem 1.05rem;
  margin-bottom: .7rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}
.sidebar-logo { max-width: 178px; width: 100%; height: auto; mix-blend-mode: screen; }
.sidebar .brand-fallback { color: var(--gold); font-weight: 800; font-size: 1.1rem; line-height: 1.15; }
.sidebar .nav-link {
  color: var(--sidebar-ink);
  padding: .66rem .85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: .72rem;
  font-size: .915rem; font-weight: 500;
  margin-bottom: .12rem;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.sidebar .nav-link i { font-size: 1.08rem; opacity: .92; width: 1.2rem; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(201, 161, 74, .24), rgba(201, 161, 74, .04));
  color: #fff; font-weight: 600;
}
.sidebar .nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 3px; border-radius: 4px; background: var(--gold);
  box-shadow: 0 0 10px rgba(201, 161, 74, .7);
}
.sidebar .nav-section {
  color: var(--sidebar-ink-dim);
  font-size: .67rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700;
  padding: 1rem .85rem .4rem;
}

.main-content { margin-left: 256px; padding: 1.5rem 2.2rem 2.4rem; min-height: 100vh; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin: -1.5rem -2.2rem 1.6rem;
  padding: 1.05rem 2.2rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar h3 { font-weight: 700; color: var(--ink); margin: 0; font-size: 1.42rem; position: relative; }
.user-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .28rem .35rem .28rem .85rem; box-shadow: var(--shadow-sm);
}
.user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-300), var(--navy));
  color: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
  overflow: hidden;
}
.user-chip .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-chip #user-name { color: var(--muted); font-weight: 600; }
.user-chip .btn { border-radius: 50%; width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }

/* ================= CARDS ================= */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-grad);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t), background var(--t);
}
.card-body { padding: 1.15rem 1.25rem; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card.lift:hover, .card.shadow-sm:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); background: var(--card-grad-hover); border-color: var(--line-strong); }

/* Cartões de estatística do dashboard */
.stat-card {
  border: none; border-radius: var(--radius); color: #fff;
  box-shadow: var(--shadow-sm); overflow: hidden; position: relative;
  transition: transform var(--t), box-shadow var(--t);
}
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card .card-body { position: relative; z-index: 1; }
.stat-card .stat-value { font-size: 2.15rem; font-weight: 800; line-height: 1.05; }
.stat-card .stat-label { opacity: .94; font-size: .86rem; font-weight: 600; }
.stat-card .stat-ic { position: absolute; right: 16px; top: 14px; font-size: 1.6rem; opacity: .42; }
.bg-clients { background: linear-gradient(135deg, #2f6699, #163a5f); }
.bg-processes { background: linear-gradient(135deg, #2f9d6b, #1f7a4d); }
.bg-deadlines { background: linear-gradient(135deg, #d2683a, #a23f1f); }
.bg-appointments { background: linear-gradient(135deg, #7a57d1, #4f389e); }
.bg-finance { background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); }

/* ================= TABELAS ================= */
.card > .table-responsive { border-radius: var(--radius); overflow: hidden; }
.table { margin: 0; color: var(--ink); }
.table thead th {
  background: var(--surface-2); color: var(--ink-soft); font-weight: 700;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line); white-space: nowrap; padding: .8rem 1rem;
}
.table tbody td { vertical-align: middle; border-color: var(--line); padding: .8rem 1rem; }
.table-hover tbody tr { transition: background var(--t-fast); }
.table-hover tbody tr:hover { background: var(--surface-2); }

/* ================= BOTÕES / BADGES ================= */
.btn { border-radius: var(--radius-sm); font-weight: 600; transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast), background var(--t-fast); }
.btn-sm { border-radius: 9px; }
.btn-primary { background: var(--navy); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-300); border-color: var(--navy-300); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 58, 95, .28); }
.btn-success { box-shadow: 0 6px 16px rgba(31, 122, 77, .22); }
.btn-primary:active, .btn:active { transform: translateY(0); }
.btn-outline-primary { color: var(--navy-300); border-color: var(--line-strong); }
.btn-outline-primary:hover { background: var(--navy); border-color: var(--navy); }
.badge { font-weight: 700; letter-spacing: .02em; border-radius: 7px; padding: .36em .6em; }
.btn-link { text-decoration: none; }

/* ================= FORMULÁRIOS ================= */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: var(--ring); }
.form-label { font-weight: 600; color: var(--ink-soft); }
.input-clean { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }

/* ================= NAV TABS (página de caso) ================= */
.nav-tabs { border-bottom: 1px solid var(--line); gap: .15rem; }
.nav-tabs .nav-link {
  border: none; color: var(--muted); font-weight: 600; padding: .6rem 1rem;
  border-radius: 0; position: relative; background: transparent;
  transition: color var(--t-fast);
}
.nav-tabs .nav-link:hover { color: var(--ink); }
.nav-tabs .nav-link.active {
  color: var(--navy-300); background: transparent; border: none;
}
.nav-tabs .nav-link.active::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2.5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 3px;
}
[data-bs-theme="dark"] .nav-tabs .nav-link.active { color: var(--gold-soft); }

/* ================= PIPELINE / FUNIL ================= */
.pipeline-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.pipeline-column { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; min-width: 274px; flex: 1; padding: .9rem; }
.pipeline-column h6 { font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.pipeline-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .85rem; margin-bottom: .6rem; box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast); animation: fadeInUp .3s ease both;
}
.pipeline-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pipeline-card .move-btns button { font-size: .7rem; padding: .12rem .45rem; }

/* ===== Funil de Precatórios (Kanban) ===== */
.funil-board { gap: .7rem; }
.funil-col { min-width: 230px; max-width: 260px; flex: 0 0 auto; padding: .7rem; }
.funil-col-head { font-size: .82rem; font-weight: 700; }
.funil-col-head .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.funil-col-sum { font-size: .74rem; color: var(--ink-dim, #7a8aa0); margin: -4px 0 8px; font-weight: 600; }
.funil-col-body { min-height: 40px; }
.funil-col.drag-hover { outline: 2px dashed var(--gold, #c9a14a); outline-offset: -4px; }
.funil-card { padding: .6rem .7rem; margin-bottom: .5rem; }
.funil-card .funil-valor { font-weight: 800; color: var(--gold, #c9a14a); font-size: .95rem; margin-top: 2px; }
.funil-empty { color: var(--ink-faint, #8a98ac); font-size: .8rem; text-align: center; padding: 8px 0; }

/* ================= STATUS / URGÊNCIAS ================= */
.badge-urgency-alta { background: #e0492f !important; }
.badge-urgency-media { background: #d2683a !important; }
.badge-urgency-baixa { background: #2f9d6b !important; }
.deadline-overdue { color: #e0492f; font-weight: 700; }
.deadline-soon { color: #d2683a; font-weight: 700; }
.cursor-pointer { cursor: pointer; }

/* ================= DASHBOARD CHARTS ================= */
.chart-card { padding: 1.2rem 1.3rem; }
.chart-toolbar .btn { padding: .2rem .7rem; font-size: .8rem; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; }
.seg button { border: none; background: transparent; color: var(--muted); padding: .26rem .85rem; border-radius: 8px; font-size: .82rem; font-weight: 700; cursor: pointer; transition: all var(--t-fast); }
.seg button.active { background: var(--surface); color: var(--navy-300); box-shadow: var(--shadow-sm); }
[data-bs-theme="dark"] .seg button.active { color: var(--gold-soft); }

/* ================= GRID EDITÁVEL (legado) ================= */
.grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
table.grid thead th { position: sticky; top: 0; background: var(--navy); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; padding: .6rem; white-space: nowrap; z-index: 2; }
table.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; }
table.grid td:last-child { border-right: none; }
table.grid tbody tr:hover { background: var(--surface-2); }
table.grid .cell-input { width: 100%; min-width: 120px; border: none; background: transparent; padding: .5rem .55rem; font: inherit; color: var(--ink); }
table.grid .cell-input:focus { outline: 2px solid var(--gold); outline-offset: -2px; background: var(--surface-3); border-radius: 4px; }
table.grid select.cell-input { cursor: pointer; }
.grid-row-num { color: var(--muted); font-size: .75rem; text-align: center; min-width: 36px; }

/* ================= DIVERSOS ================= */
.section-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.empty-state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.modal-content { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--card-grad); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1.1rem 1.3rem; }
.modal-header .modal-title { font-family: "Sora", sans-serif; font-weight: 700; font-size: 1.12rem; }
.modal-body { padding: 1.2rem 1.3rem; }
.modal-footer { border-top: 1px solid var(--line); padding: .9rem 1.3rem; }
.spinner-border.text-primary { color: var(--navy-300) !important; }
.list-group-item { background: transparent; border-color: var(--line); color: var(--ink); }
.alert { border-radius: var(--radius-sm); }

/* ================= TIMELINE (processo) ================= */
.timeline { position: relative; padding: .25rem 0; }
.tl-item { position: relative; padding: 0 0 1rem 2.4rem; border-left: 2px solid var(--line); margin-left: 12px; }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -14px; top: -2px; width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: .8rem; box-shadow: 0 0 0 3px var(--surface); }
.tl-body { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: .55rem .75rem; }

/* Timeline da página de caso (precatório) */
.timeline-list li { position: relative; padding-left: .25rem; }

/* ================= AGENDA (calendário) ================= */
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .2rem 0; }
.cal-cell { min-height: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 4px 5px; overflow: hidden; transition: border-color var(--t-fast); }
.cal-cell:hover { border-color: var(--line-strong); }
.cal-cell.muted { background: var(--surface-2); }
.cal-cell.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-daynum { font-weight: 700; font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.cal-ev { display: block; border-radius: 5px; padding: 1px 5px; margin-top: 3px; font-size: .7rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev:hover { filter: brightness(1.08); }
.cal-ev.aud { background: var(--navy-300); }
.cal-ev.prz { background: #c05621; }

/* ================= RESPONSIVO ================= */
@media (max-width: 992px) {
  .sidebar { width: 100%; min-height: auto; position: relative; flex-direction: column; }
  .main-content { margin-left: 0; padding: 1rem; }
  .topbar { margin: -1rem -1rem 1.1rem; padding: .9rem 1rem; }
}
@media (max-width: 768px) {
  .cal-cell { min-height: 60px; }
  .cal-ev { font-size: .62rem; }
  .topbar h3 { font-size: 1.2rem; }
}
