@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

:root {
  /* Cores de fundo */
  --color-bg: #f4f7f8;
  --color-surface: #ffffff;
  --color-card: #ffffff;
  
  /* Bordas - estilo HomeCore */
  --color-border: #c7d2d8;
  --color-border-card: rgba(199, 210, 216, 0.7);
  --color-border-card-strong: rgba(199, 210, 216, 0.9);
  --color-border-card-light: rgba(199, 210, 216, 0.5);
  
  /* Textos */
  --color-text: #0d1416;
  --color-muted: #4b5a5e;
  --color-heading: #081012;
  
  /* Cores de acento */
  --color-accent: #1b5f73;
  --color-accent-dark: #144b5a;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  
  /* Sombras - mais suaves estilo HomeCore */
  --shadow-card: 0 6px 14px rgba(8, 16, 18, 0.06);
  --shadow-soft: 0 6px 14px rgba(8, 16, 18, 0.06);
  --shadow-hover: 0 6px 12px rgba(8, 16, 18, 0.08);
  
  /* Raios de borda - estilo HomeCore (5px) */
  --radius-sm: 5px;
  --radius-md: 5px;
  --radius-lg: 8px;
  
  /* Dimensões */
  --nav-height: 60px;
  --container-max: 1120px;
  --font-base: 0.93rem;
  
  /* Cores específicas */
  --form-bg: #f6f9f9;
  --form-bg-focus: #ffffff;
  --table-row-bg: rgba(255, 255, 255, 0.85);
  --table-row-hover: rgba(27, 95, 115, 0.08);
  --tb-header-bg: #f2f6f7;
  --tb-header-text: #102028;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(27, 95, 115, 0.16), transparent 65%),
    radial-gradient(900px 450px at 80% 0%, rgba(20, 75, 90, 0.12), transparent 60%);
  z-index: -1;
}

img { max-width: 100%; height: auto; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }

main { padding: 1.5rem 0 2.5rem; }

.container {
  width: min(var(--container-max), 100% - 2rem);
  margin: 0 auto;
}

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

.page-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-heading);
}

.page-sub {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 1rem; }

.text-center { text-align: center; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger  { color: var(--color-danger); }

.is-hidden { display: none !important; }

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

.muted { color: var(--color-muted); }
.inline { display: inline; }
.mono { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
}

/* NAVIGATION */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  min-height: var(--nav-height);
  box-shadow: 0 6px 26px rgba(11, 12, 16, 0.06);
  font-weight: 300;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(var(--container-max), 100% - 2rem);
  margin: 0 auto;
  padding: 0.65rem 0;
}

.navbar-left, .navbar-right { display: flex; align-items: center; gap: 0.7rem; }

.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem; 
  font-weight: 300;
  color: var(--color-heading); 
  font-size: 1.12rem;
  letter-spacing: 0.3px;
}

.brand-badge {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--color-accent);
  box-shadow: 0 4px 10px rgba(27, 95, 115, 0.35);
  position: relative;
}

.brand-badge::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--color-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover, .nav-link:focus { 
  color: var(--color-accent); 
  background: rgba(27, 95, 115, 0.1); 
}

.nav-link.active { 
  color: var(--color-accent); 
  background: rgba(27, 95, 115, 0.16); 
}

/* BUTTONS - estilo HomeCore refinado */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--radius-sm);
  border: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none;
  background: transparent;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(27, 95, 115, 0.15);
  outline: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #fff;
}


.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
}

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

.btn-outline-brand,
.btn-logout {
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline-brand:hover,
.btn-logout:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-soft {
  background: rgba(27, 95, 115, 0.12);
  color: var(--color-accent);
  border: none;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.btn-xs {
  width: 32px;          /* garante tamanho igual para todos */
  height: 32px;         /* garante altura igual */
  display: inline-flex; /* centraliza o conteúdo no eixo X */
  align-items: center;  /* centraliza no eixo Y */
  justify-content: center;
  padding: 0 !important; /* remove variações de padding */
  font-size: 0.8rem;    /* mantém seu tamanho de texto */
  border-radius: 5px;
  border-width: 0.3px;
  line-height: 1 !important; /* evita distorções com ícones */
}

.btn-icon { 
  width: 2.4rem; 
  height: 2.4rem; 
  padding: 0; 
}

.panel, .card, .section-card {
  background: var(--color-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.cards-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.1rem;
}

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

.card-title { 
  margin: 0; 
  font-size: 1rem; 
  color: var(--color-heading); 
  font-weight: 600; 
}

.kpi { 
  margin: 0; 
  font-size: 2rem; 
  font-weight: 600; 
  color: var(--color-heading);
}

.kpi-lg { 
  font-size: 2rem; 
  font-weight: 600; 
  margin-top: 0.4rem; 
  color: var(--color-heading); 
}

.section-title-sm { 
  font-size: 1.05rem; 
  line-height: 1.8; 
  margin: 0 0 0.6rem; 
  color: var(--color-heading);
  font-weight: 600;
}

.sub { 
  color: var(--color-muted); 
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 95, 115, 0.18);
  color: var(--color-accent);
}

.card-icon.-danger { 
  background: rgba(220, 38, 38, 0.12); 
  color: var(--color-danger); 
}

.card-icon.-success { 
  background: rgba(22, 163, 74, 0.12); 
  color: var(--color-success); 
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border-card-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.list-item .meta { 
  color: var(--color-muted); 
  font-size: 0.85rem;
  font-weight: 300;
}

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

.list-actions { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  flex-wrap: wrap; 
}

.cards.cards-compact,
.cards.is-summary { margin-bottom: 1rem; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.qa {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-heading);
  background: #fff;
  font-weight: 300;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.grid-2 { 
  display: grid; 
  grid-template-columns: 2fr 1fr; 
  gap: 1rem; 
}

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

/* TABLES - estilo HomeCore */
.table, table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.85rem;
}

.table th, table th {
  background: var(--tb-header-bg);
  color: var(--tb-header-text);
  text-align: left;
  padding: 0.5rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 300;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td, table td {
  padding: 0.5rem 0.5rem;
  border-top: 1px solid var(--color-border-card-light);
  font-size: 0.85rem;
  background: var(--table-row-bg);
  color: var(--color-text);
  font-weight: 300;
}

.table tbody tr {
  background: var(--table-row-bg);
  border-bottom: 1px solid var(--color-border-card-light);
}

.table tbody tr:hover,
.table tbody tr:hover td { 
  background: var(--table-row-hover); 
}

.table-wrap { 
  overflow-x: auto; 
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-card-light);
}

.col-id { width: 80px; }
.col-actions { width: 180px; }
.col-type { width: 100px; }
.col-code { width: 120px; }
.col-link { width: 150px; }
.col-w-32 { width: 32%; }
.col-w-26 { width: 26%; }
.col-w-18 { width: 18%; }
.col-w-12 { width: 12%; }

@media (max-width: 860px) {
  .table thead { display: none; }
  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
  }
  .table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: none;
  }
  .table td::before {
    content: attr(data-label);
    font-weight: 400;
    color: var(--color-muted);
  }
}

/* BADGES & CHIPS */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 300;
  border: 1px solid transparent;
  background: rgba(27, 95, 115, 0.14);
  color: var(--color-accent);
}

.badge.draft { 
  background: #e0f2fe; 
  color: #0369a1; 
  border-color: #bae6fd; 
}

.badge.active { 
  background: #dcfce7; 
  color: #166534; 
  border-color: #bbf7d0; 
}

.badge.review { 
  background: #fef3c7; 
  color: #92400e; 
  border-color: #fed7aa; 
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--color-heading);
}

/* FORMS - estilo HomeCore */
.form-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 1rem; 
}

.form-group { 
  display: flex; 
  flex-direction: column; 
  gap: 0.4rem; 
}

.form-group.full-row { 
  grid-column: 1 / -1; 
}

.form-label { 
  font-weight: 400; 
  color: var(--color-muted); 
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea,
.form-control {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--form-bg);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus, 
select:focus, 
textarea:focus,
.form-control:focus {
  outline: none;
  background: var(--form-bg-focus);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.18rem rgba(27, 95, 115, 0.18);
}

.mass-small-input { width: 100%; }

.mass-collaborator {
  margin: 1rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 420px;
}

.mass-collaborator label {
  font-weight: 500;
  color: var(--color-muted);
}

.mass-collaborator select {
  width: 100%;
}

.assign-extra { 
  display: flex; 
  gap: 0.5rem; 
  flex-wrap: wrap; 
  margin-top: 0.35rem; 
}

.form-actions.align-start { 
  justify-content: flex-start; 
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.filters .field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filters .helper-link { 
  margin-left: auto; 
  font-size: 0.85rem;
  font-weight: 300;
}

.filters__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters__actions .helper-link {
  margin-left: 0;
}

.filters__archived-btn {
  white-space: nowrap;
}

.filters__archived-btn.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.segmented a {
  padding: 0.35rem 0.7rem;
  color: var(--color-muted);
  border-right: 1px solid var(--color-border);
  font-size: 0.82rem;
  font-weight: 300;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented a:last-child { 
  border-right: none; 
}

.segmented a.active {
  background: var(--color-accent);
  color: #fff;
}

.custom-range { 
  display: none; 
  width: 100%; 
}

.custom-range.is-active { 
  display: block; 
}

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

.inline-check { 
  display: flex; 
  align-items: center; 
  gap: 0.45rem; 
  font-size: 0.9rem; 
  font-weight: 300;
  color: var(--color-heading); 
}

.form-actions { 
  display: flex; 
  justify-content: flex-end; 
  gap: 0.6rem; 
  margin-top: 1rem; 
}

.pass-tools { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
}

/* TABLE ACTIONS */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.row-actions form { 
  display: inline; 
}

/* ALERTS - estilo HomeCore */
.alert, .status-box, .error {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  background: #fff;
  font-weight: 300;
}

.alert.error, .error {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.status-box.success { 
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.empty, .empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
  font-weight: 300;
}

/* PROGRESS */
.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.progress > span { 
  display: block; 
  height: 100%; 
  width: var(--val, 0%); 
  background: var(--color-success); 
}

.progress.-warn > span { 
  background: var(--color-warning); 
}

.progress.-danger > span { 
  background: var(--color-danger); 
}

.gauge {
  --p: 0;
  --gap: 62%;
  width: 130px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(var(--color-card) 0 var(--gap), transparent calc(var(--gap) + 1px)),
    conic-gradient(var(--color-accent) calc(var(--p) * 1%), rgba(148, 163, 184, 0.25) 0);
}

.gauge .val { 
  font-size: 1.4rem; 
  font-weight: 600; 
  color: var(--color-heading); 
}

.gauge.-warn { 
  background: radial-gradient(var(--color-card) 0 var(--gap), transparent calc(var(--gap)+1px)), 
              conic-gradient(var(--color-warning) calc(var(--p)*1%), rgba(148,163,184,0.25) 0); 
}

.gauge.-danger { 
  background: radial-gradient(var(--color-card) 0 var(--gap), transparent calc(var(--gap)+1px)), 
              conic-gradient(var(--color-danger) calc(var(--p)*1%), rgba(148,163,184,0.25) 0); 
}

.stack-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.stack-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(148, 163, 184, 0.2);
}

.seg { 
  height: 100%; 
  width: var(--val, 0%); 
}

.seg.-c { background: #34d399; }
.seg.-p { background: #f59e0b; }
.seg.-n { background: #ef4444; }

/* AUTH / HERO */
.hero, .auth-wrap { 
  min-height: calc(100vh - var(--nav-height)); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 2rem 1rem; 
}

.login-card {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--color-border-card-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-header { 
  text-align: center; 
  margin-bottom: 1rem; 
}

.card-title { 
  margin: 0 0 0.35rem; 
  font-size: 1.3rem; 
  font-weight: 600; 
}

.card-sub { 
  margin: 0; 
  color: var(--color-muted);
  font-weight: 300;
}

/* PROCEDURE FORM PAGE */
.page-procedure-form .grid.two { 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
}

.page-procedure-form .actions { 
  justify-content: space-between; 
}

.page-procedure-form .helper-link { 
  order: 3; 
  width: 100%; 
  text-align: right; 
}

/* PUBLIC PROCEDURE */
.page-procedure-public header { 
  text-align: center; 
  padding: 2.5rem 1.5rem 1.2rem; 
}

.page-procedure-public header h1 { 
  font-size: 2rem; 
  font-weight: 600; 
  margin: 0 0 0.75rem; 
}

.page-procedure-public header p { 
  margin: 0; 
  color: var(--color-muted);
  font-weight: 300;
}

.page-procedure-public main { 
  max-width: 900px; 
  margin: 0 auto; 
  padding: 0 1.5rem 3rem; 
}

.page-procedure-public .card { 
  border-radius: 20px; 
}

.page-procedure-public .markdown-body h1,
.page-procedure-public .markdown-body h2,
.page-procedure-public .markdown-body h3 { 
  border-bottom: 1px solid var(--color-border); 
  padding-bottom: 0.35rem; 
}

/* CALENDAR PAGE */
.page-calendar .calendar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.page-calendar .legend { 
  display: flex; 
  gap: 0.8rem; 
  flex-wrap: wrap; 
  color: var(--color-muted);
  font-weight: 300;
}

.page-calendar .dot { 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  display: inline-flex; 
  border: 1px solid transparent; 
}

.page-calendar .dot.-none { 
  background: #d1d5db; 
  border-color: #cbd5e1; 
}

.page-calendar .dot.-partial { 
  background: #fde68a; 
  border-color: #fcd34d; 
}

.page-calendar .dot.-done { 
  background: var(--color-success); 
  border-color: var(--color-success); 
}

.page-calendar .dot.-link { 
  background: #93c5fd; 
  border-color: #60a5fa; 
}

.page-calendar .dot.-today { 
  background: #c7d2fe; 
  border-color: #a5b4fc; 
}

.page-calendar .calendar-grid { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 0.55rem; 
}

.page-calendar .calendar-head { 
  text-align: center; 
  font-weight: 400;
  color: #334155; 
  font-size: 0.85rem; 
}

.page-calendar .day {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  min-height: 120px;
  display: flex;
  flex-direction: column;
}

.page-calendar .day.-today { 
  box-shadow: 0 0 0 2px rgba(27, 95, 115, 0.2); 
}

.page-calendar .day-head { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0.35rem 0.45rem; 
  border-bottom: 1px solid var(--color-border); 
}

.page-calendar .day-date { 
  font-weight: 600; 
  color: var(--color-heading); 
}

.page-calendar .pct-badge { 
  padding: 0.15rem 0.35rem; 
  font-size: 0.78rem; 
  font-weight: 300;
  border-radius: 4px; 
  border: 1px solid transparent; 
}

.page-calendar .pct-badge.-none { 
  background: #fee2e2; 
  color: #b91c1c; 
  border-color: #fecaca; 
}

.page-calendar .pct-badge.-partial { 
  background: #ffedd5; 
  color: #92400e; 
  border-color: #fed7aa; 
}

.page-calendar .pct-badge.-done { 
  background: #dcfce7; 
  color: #166534; 
  border-color: #bbf7d0; 
}

.page-calendar .day-body { 
  padding: 0.35rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.35rem; 
}

.page-calendar .task { 
  border: 1px solid var(--color-border); 
  border-radius: 6px; 
  padding: 0.35rem 0.45rem; 
  background: rgba(148, 163, 184, 0.15);
  font-weight: 300;
}

.page-calendar .today-quick__list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 0.6rem; 
}

.page-calendar .tq-row { 
  display: grid; 
  grid-template-columns: auto auto 1fr auto auto; 
  gap: 0.4rem; 
  align-items: center; 
}

.page-calendar .status-pill { 
  border: 1px solid var(--color-border); 
  border-radius: 4px; 
  padding: 0.18rem 0.45rem; 
  font-size: 0.78rem; 
  font-weight: 300;
  background: #fff; 
  color: var(--color-heading); 
}

.page-calendar .status-pill.-partial { 
  border-color: var(--color-warning); 
  color: #a16207; 
}

.page-calendar .status-pill.-done { 
  border-color: var(--color-success); 
  color: #0f5132; 
}

.page-calendar .comment-input, 
.page-calendar .comment-readonly { 
  border: 1px solid var(--color-border); 
  border-radius: 6px; 
  padding: 0.5rem 0.65rem; 
  font-size: 0.85rem; 
  font-weight: 300;
  background: #fff; 
}

.page-calendar .comment-readonly { 
  background: rgba(148, 163, 184, 0.12); 
}

@media (max-width: 860px) {
  .page-calendar .calendar-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  .page-calendar .today-quick__list { 
    grid-template-columns: 1fr; 
  }
}

/* TOAST */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #111827;
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
  font-weight: 300;
}

.toast.show { 
  opacity: 1; 
  transform: translateY(0); 
}

.toast.-error { 
  background: rgba(220, 38, 38, 0.9); 
}

/* MISC */
.custom-range { 
  display: none; 
  width: 100%; 
}

.custom-range.is-active { 
  display: block; 
}

.combo { 
  position: relative; 
}

.combo-input { 
  width: 100%; 
  border: 1px solid var(--color-border); 
  border-radius: var(--radius-md); 
  padding: 0.5rem 0.65rem;
  font-weight: 300;
}

.combo-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-height: 220px;
  overflow: auto;
  display: none;
}

.combo-item { 
  padding: 0.45rem 0.6rem; 
  cursor: pointer; 
  display: flex; 
  gap: 0.45rem; 
  align-items: center;
  font-weight: 300;
}

.combo-item:hover { 
  background: rgba(27, 95, 115, 0.08); 
}

.error-card {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.error-code {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
  font-weight: 600;
}

/* MODALS */
.markdown-guide,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.markdown-guide.active,
.modal-backdrop.active { 
  display: flex; 
}

.markdown-guide .modal,
.modal-card {
  width: min(480px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.markdown-guide .modal h2,
.modal-card h3 { 
  margin: 0 0 0.5rem; 
  font-size: 1.2rem; 
  font-weight: 600; 
}

.markdown-guide .modal .modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-muted);
}

.modal-card .modal-close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-muted);
}

.modal-actions { 
  display: flex; 
  justify-content: flex-end; 
  gap: 0.5rem; 
  margin-top: 1rem; 
}

.modal-error { 
  color: var(--color-danger); 
  font-size: 0.85rem; 
  font-weight: 300;
  margin-top: 0.5rem; 
  min-height: 1.2rem; 
}

.modal-card .modal-actions { 
  display: flex; 
  justify-content: flex-end; 
  gap: 0.5rem; 
  margin-top: 1rem; 
}
