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

/* ─── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

/* ─── Design Tokens (Monday.com inspired) ────────────────────────────────── */
:root {
  /* Brand */
  --primary:            #0073ea;
  --primary-hover:      #0060b9;
  --primary-selected:   #cce5ff;
  --primary-50:         #e6f2ff;

  /* Text */
  --text:               #323338;
  --text-2:             #676879;
  --text-3:             #c3c6d4;
  --text-on-primary:    #fff;

  /* Backgrounds */
  --bg:                 #f6f7fb;
  --surface:            #ffffff;
  --surface-2:          #f6f7fb;
  --surface-hover:      rgba(103,104,121,.1);

  /* Borders & UI */
  --border:             #d0d4e4;
  --border-ui:          #c3c6d4;
  --ui-bg:              #dcdfec;

  /* Elevation */
  --shadow-xs:          0 4px 6px -4px rgba(0,0,0,.10);
  --shadow-sm:          0 2px 8px rgba(0,0,0,.08);
  --shadow:             0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:          0 6px 20px rgba(0,0,0,.18);

  /* Radii */
  --radius-sm:          4px;
  --radius:             8px;
  --radius-lg:          12px;

  /* Status colors */
  --green:              #00854d;
  --green-bg:           #d4f4e2;
  --orange:             #d97706;
  --orange-bg:          #fef3c7;
  --red:                #e44258;
  --red-bg:             #fde8ec;
  --blue:               #0073ea;
  --blue-bg:            #cce5ff;
  --gray:               #676879;
  --gray-bg:            #ecedf5;

  /* Layout */
  --header-h:           48px;
  --transition:         70ms ease;
  --transition-med:     100ms ease;

  /* Typography */
  --font:               'Figtree', Roboto, 'Noto Sans Hebrew', sans-serif;
  --font-title:         'Poppins', Roboto, sans-serif;
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1 { font-family: var(--font-title); font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -.1px; }
h2 { font-family: var(--font-title); font-size: 18px; font-weight: 500; line-height: 1.33; letter-spacing: -.1px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.375; }
h4 { font-size: 14px; font-weight: 600; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.app-header .brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title);
  font-size: 16px; font-weight: 700; color: var(--text);
  text-decoration: none; letter-spacing: -.2px;
}
.app-header .brand-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}
.app-header .brand:hover { text-decoration: none; }

.app-header nav { display: flex; align-items: center; gap: 4px; }
.app-header nav a {
  color: var(--text-2); font-size: 14px; padding: 5px 12px;
  border-radius: var(--radius-sm); transition: var(--transition);
  text-decoration: none; font-weight: 400;
}
.app-header nav a:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.app-header nav a.active { background: var(--surface-hover); color: var(--text); font-weight: 500; }

/* ─── Main Layout ────────────────────────────────────────────────────────── */
.app-main {
  margin-top: var(--header-h);
  padding: 24px 32px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; transition: var(--transition-med);
  white-space: nowrap; text-decoration: none;
  font-family: var(--font); line-height: 1.375;
  user-select: none;
}
.btn:active { transform: scale(0.95); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,132,255,.5), 0 0 0 1px var(--primary-hover) inset;
}

.btn-primary   { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: var(--text-on-primary); }

.btn-secondary {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-ui);
}
.btn-secondary:hover { background: var(--surface-hover); text-decoration: none; }

.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c0303f; text-decoration: none; color: #fff; }

.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; text-decoration: none; color: #fff; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #006b3f; text-decoration: none; color: #fff; }

.btn-ghost {
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-50); text-decoration: none; }

.btn-sm  { padding: 4px 8px; font-size: 12px; height: 32px; }
.btn-lg  { padding: 10px 20px; font-size: 16px; }
.btn-icon { padding: 6px; border-radius: var(--radius-sm); width: 32px; height: 32px; justify-content: center; }
.btn:disabled { opacity: .38; cursor: not-allowed; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}

.form-control {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border-ui); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: var(--surface);
  transition: border-color var(--transition-med), box-shadow var(--transition-med);
  font-family: var(--font); line-height: 1.375;
}
.form-control:hover  { border-color: var(--text-2); }
.form-control:focus  {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,132,255,.3);
}
.form-control::placeholder { color: var(--text-2); }
select.form-control  { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  border: 1px solid var(--border-ui); border-radius: 2px;
  accent-color: var(--primary); cursor: pointer;
}
.form-check-label { font-size: 14px; }

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

/* Multi-check groups */
.multi-check { display: flex; flex-wrap: wrap; gap: 8px; }
.multi-check-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1px solid var(--border-ui);
  border-radius: 20px; cursor: pointer; font-size: 13px;
  transition: var(--transition-med); user-select: none;
}
.multi-check-item:hover { border-color: var(--text-2); }
.multi-check-item:has(input:checked) {
  background: var(--primary-50); border-color: var(--primary);
  color: var(--primary); font-weight: 500;
}
.multi-check-item input { display: none; }

/* Toggle switch */
.toggle-group { display: flex; flex-wrap: wrap; gap: 16px; }
.toggle-item  { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.toggle-item label.toggle-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-2); letter-spacing: .04em; }

.toggle {
  position: relative; display: inline-flex; align-items: center;
  width: 44px; height: 24px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border-ui);
  border-radius: 12px; transition: var(--transition-med);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; background: #fff;
  border-radius: 50%; top: 3px; left: 3px;
  transition: var(--transition-med); box-shadow: var(--shadow-xs);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
}
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body   { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ─── Status Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  line-height: 16px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.badge-confirmado          { background: var(--green-bg);  color: var(--green); }
.badge-confirmado .badge-dot { background: var(--green); }
.badge-a_definir,
.badge-a-definir           { background: var(--orange-bg); color: var(--orange); }
.badge-a_definir .badge-dot,
.badge-a-definir .badge-dot { background: var(--orange); }
.badge-cancelado           { background: var(--red-bg);    color: var(--red); }
.badge-cancelado .badge-dot { background: var(--red); }
.badge-assinado            { background: var(--green-bg);  color: var(--green); }
.badge-elaboracao          { background: var(--orange-bg); color: var(--orange); }
.badge-negociacao          { background: var(--blue-bg);   color: var(--blue); }
.badge-default             { background: var(--gray-bg);   color: var(--gray); }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  font-size: 14px; font-weight: 400; color: var(--text-2);
  border: none; background: transparent; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color var(--transition-med);
}
.tab-btn:hover   { color: var(--text); }
.tab-btn.active  { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab-pane        { display: none; }
.tab-pane.active { display: block; }

/* ─── Checklist ──────────────────────────────────────────────────────────── */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color var(--transition-med);
}
.checklist-item:hover { border-color: var(--primary); }
.checklist-item.done  { background: var(--surface-2); }
.checklist-item.done .item-text { text-decoration: line-through; color: var(--text-2); }
.checklist-item input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.checklist-item .item-text    { flex: 1; font-size: 14px; cursor: pointer; }
.checklist-item .item-actions { display: flex; gap: 4px; opacity: 0; transition: var(--transition-med); }
.checklist-item:hover .item-actions { opacity: 1; }
.item-edit-input { flex: 1; border: none; outline: none; font-size: 14px; font-family: inherit; background: transparent; }
.checklist-add { display: flex; gap: 8px; margin-top: 12px; }
.checklist-add input { flex: 1; }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--text); color: #fff; padding: 10px 16px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 14px; display: flex; align-items: center; gap: 8px;
  transform: translateY(80px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.show         { transform: translateY(0); opacity: 1; }
.toast.toast-success { background: var(--green); }
.toast.toast-error   { background: var(--red); }

/* ─── Stats Cards ────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px;
  transition: box-shadow var(--transition-med);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-card .stat-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  color: var(--text-2); letter-spacing: .04em;
}
.stat-card .stat-value { font-size: 32px; font-weight: 700; line-height: 1; color: var(--text); font-family: var(--font-title); }
.stat-card .stat-desc  { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-card.confirmado .stat-value { color: var(--green); }
.stat-card.cancelado  .stat-value { color: var(--red); }
.stat-card.a-definir  .stat-value { color: var(--orange); }

/* Colored left border accent */
.stat-card { border-left: 3px solid var(--border); }
.stat-card.confirmado { border-left-color: var(--green); }
.stat-card.cancelado  { border-left-color: var(--red); }
.stat-card.a-definir  { border-left-color: var(--orange); }

/* ─── Filters Bar ────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); padding: 12px 16px;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-xs); margin-bottom: 16px;
}
.filters-bar .form-control {
  width: auto; min-width: 140px; font-size: 14px;
  padding: 6px 10px; height: 32px;
}
.filters-bar .search-wrap { flex: 1; min-width: 200px; position: relative; }
.filters-bar .search-wrap input { padding-left: 32px; }
.filters-bar .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 13px; }

/* ─── Event Cards ────────────────────────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.event-card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-med), transform var(--transition-med);
  display: flex; flex-direction: column; cursor: pointer;
}
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.event-card-img {
  width: 100%; height: 130px; object-fit: cover;
  background: linear-gradient(135deg, #0073ea 0%, #00c8ff 100%);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.event-card-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card-img-placeholder { font-size: 2rem; opacity: .45; }

.event-card-body {
  padding: 14px 16px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.event-card-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.event-card-meta  { display: flex; flex-wrap: wrap; gap: 4px; }
.meta-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-2);
  font-weight: 500; border: 1px solid var(--border);
}
.event-card-date  { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.event-card-local { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.event-card-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface-2);
}
.event-card-actions { display: flex; gap: 4px; }

/* ─── Section Headers ────────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 14px; font-weight: 600; }

/* ─── Supplier Cards ─────────────────────────────────────────────────────── */
.supplier-section { margin-bottom: 24px; }
.supplier-section h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--primary); letter-spacing: .06em;
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--primary-50);
}

/* ─── Contract / Investment Summary ─────────────────────────────────────── */
.investment-summary {
  background: linear-gradient(135deg, #0060b9 0%, #0073ea 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.inv-item .inv-label { font-size: 11px; opacity: .8; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.inv-item .inv-value { font-size: 28px; font-weight: 700; margin-top: 2px; font-family: var(--font-title); }

/* ─── Results ────────────────────────────────────────────────────────────── */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.result-card {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border); text-align: center;
  box-shadow: var(--shadow-xs);
}
.result-card .result-icon  { font-size: 28px; margin-bottom: 8px; }
.result-card .result-value { font-size: 28px; font-weight: 700; color: var(--primary); font-family: var(--font-title); }
.result-card .result-label { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 540px; width: 100%;
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-body   { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ─── Empty State ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .35; }
.empty-state p { margin-top: 6px; font-size: 14px; }

/* ─── Loading ────────────────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 48px; gap: 12px; color: var(--text-2); }
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Upload ─────────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border-ui); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: var(--transition-med); background: var(--surface-2);
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--primary); background: var(--primary-50); }
.upload-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 12px; }

/* ─── Event Detail Header ────────────────────────────────────────────────── */
.detail-header {
  background: var(--surface); color: var(--text);
  padding: 20px 24px; margin: -24px -32px 24px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; border-bottom: 1px solid var(--border);
}
.detail-header .back-link {
  color: var(--text-2); font-size: 13px;
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 6px; text-decoration: none;
}
.detail-header .back-link:hover { color: var(--primary); }
.detail-header h1 { font-size: 20px; line-height: 1.3; }
.detail-header-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: flex-start; margin-top: 20px; }

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── Info Grid ──────────────────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.info-item .info-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  color: var(--text-2); letter-spacing: .04em; margin-bottom: 3px;
}
.info-item .info-value { font-size: 14px; color: var(--text); }

/* ─── Calendar View ──────────────────────────────────────────────────────── */
.cal-wrapper {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs); overflow: hidden;
}
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.cal-title { font-size: 16px; font-weight: 500; font-family: var(--font-title); }
.cal-grid  { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700;
  text-transform: uppercase; color: var(--text-2);
  padding: 8px 4px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); letter-spacing: .06em;
}
.cal-cell {
  min-height: 100px; padding: 6px 8px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-empty  { background: var(--bg); }
.cal-today  { background: var(--primary-50); }
.cal-day-num {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px; border-radius: 50%;
}
.cal-today .cal-day-num { background: var(--primary); color: #fff; }
.cal-events-list { display: flex; flex-direction: column; gap: 2px; }
.cal-event {
  display: block; font-size: 11px; padding: 2px 6px;
  border-radius: 3px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-decoration: none;
  transition: opacity var(--transition);
}
.cal-event:hover            { opacity: .75; text-decoration: none; }
.cal-event-confirmado { background: var(--green-bg);  color: var(--green); }
.cal-event-a-definir  { background: var(--orange-bg); color: var(--orange); }
.cal-event-cancelado  { background: var(--red-bg);    color: var(--red); }

/* ─── Kanban View ────────────────────────────────────────────────────────── */
.kb-board {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; align-items: start;
}
.kb-col {
  background: var(--surface-2); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.kb-col-header {
  padding: 10px 16px; display: flex; align-items: center;
  justify-content: space-between; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em;
}
.kb-a-definir  { background: var(--orange-bg); color: var(--orange); }
.kb-confirmado { background: var(--green-bg);  color: var(--green);  }
.kb-cancelado  { background: var(--red-bg);    color: var(--red);    }
.kb-count {
  background: rgba(0,0,0,.1); border-radius: 10px;
  padding: 1px 8px; font-size: 12px; font-weight: 600;
}
.kb-cards {
  padding: 8px; display: flex; flex-direction: column;
  gap: 6px; min-height: 100px; transition: background var(--transition-med);
}
.kb-cards.drag-over { background: var(--primary-50); border-radius: var(--radius-sm); }
.kb-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: var(--shadow-xs); cursor: grab;
  transition: box-shadow var(--transition-med), transform var(--transition-med), opacity var(--transition-med);
}
.kb-card:hover    { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kb-card.dragging { opacity: .4; cursor: grabbing; }
.kb-card-title { font-size: 14px; font-weight: 500; line-height: 1.35; margin-bottom: 6px; }
.kb-card-meta  { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; font-size: 12px; color: var(--text-2); }
.kb-card-link  { font-size: 12px; color: var(--primary); text-decoration: none; }
.kb-card-link:hover { text-decoration: underline; }
.kb-empty { color: var(--text-2); font-size: 13px; text-align: center; padding: 24px; font-style: italic; }

/* ─── Table View ─────────────────────────────────────────────────────────── */
.tbl-wrap {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  overflow-x: auto;
}
.tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.tbl-th {
  padding: 10px 16px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
  background: var(--surface-2); border-bottom: 2px solid var(--border);
  text-align: left; white-space: nowrap;
}
.tbl-th.sortable { cursor: pointer; user-select: none; transition: color var(--transition-med); }
.tbl-th.sortable:hover { color: var(--primary); }
.tbl-td {
  padding: 10px 16px; font-size: 14px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.tbl tr:last-child .tbl-td { border-bottom: none; }
.tbl tr:hover .tbl-td { background: var(--surface-2); }
.tbl-name { font-weight: 500; max-width: 260px; }
.tbl-name a { color: var(--text); }
.tbl-name a:hover { color: var(--primary); }
.tbl-local { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-num   { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.tbl-page-info { font-size: 13px; color: var(--text-2); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-main       { padding: 16px; }
  .app-header     { padding: 0 16px; }
  .form-row-2,
  .form-row-3     { grid-template-columns: 1fr; }
  .events-grid    { grid-template-columns: 1fr; }
  .detail-header  { padding: 16px; margin: -16px -16px 16px; }
  .detail-header h1 { font-size: 16px; }
  .investment-summary { padding: 16px; gap: 16px; }
  .inv-item .inv-value { font-size: 22px; }
  .tabs { border-bottom-width: 1px; }
  .tab-btn { padding: 8px 12px; font-size: 13px; }
  .kb-board { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .kb-board { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cal-cell  { min-height: 60px; padding: 4px; }
  .cal-event { font-size: 10px; }
  .cal-dow   { font-size: 10px; padding: 6px 2px; }
}
