/* Verde profundo na navegação; branco nas áreas de trabalho. */
:root {
  --green: #16866c;
  --border: #e1e9e5;
  --mint: #29b48b;
  --hover-background: #142820;
  --ink: #142b24;
  color: var(--ink);
  background: #f5f8f6;
}
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { -webkit-font-smoothing: antialiased; }
.sidebar {
  width: 280px;
  padding: 32px 22px;
  background: #142620;
  border-color: #284038;
  color: #e8f4ee;
}
.brand { gap: 13px; margin-bottom: 55px; font-size: 20px; letter-spacing: -.8px; }
.brand-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #43c99e, #b7e7d7);
  color: white;
  font-size: 29px;
}
.brand-icon span { display: none; }
.brand small { color: #9db9ad; font-size: 10px; letter-spacing: 1.7px; margin-top: 7px; }
.nav-label { color: #95b3a6; font-size: 11px; letter-spacing: 1.8px; margin-bottom: 19px; }
.nav-item {
  position: relative;
  color: #a9c1b6;
  font-size: 15px;
  padding: 18px;
  border-radius: 13px;
  gap: 15px;
  align-items: center;
  margin-bottom: 9px;
}
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
.nav-item:hover { background: #1c372d; color: #e0f5eb; }
.nav-item.active { background: #1b4033; color: #d7f4e7; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 17px; bottom: 17px; width: 3px; border-radius: 2px; background: #34c598; }
.sidebar-bottom { border-color: #2b4439; color: #a8c2b5; padding: 22px 0 0; font-size: 13px; }
.sidebar-bottom small { color: #92ada0; font-size: 11px; margin-top: 12px; }
.online-dot { background: #32c399; width: 8px; height: 8px; }
main { margin-left: 280px; }
.topbar { height: 90px; padding: 0 44px; background: #142620; color: #95b6a5; border-color: #2a4338; font-size: 14px; }
.topbar strong { color: #edf7f1; font-weight: 600; }
.slash { margin: 0 9px; color: #739a87; }
.version { background: #0e1d17; border-color: #2a4338; color: #a2bfb0; font-size: 10px; letter-spacing: 1.5px; border-radius: 9px; padding: 11px 15px; }
.content { max-width: 1500px; padding: 46px 44px 25px; }
.page-heading { margin-bottom: 32px; gap: 24px; }
.eyebrow { color: #16866c !important; font-size: 11px !important; letter-spacing: 2.2px; margin-bottom: 15px !important; }
h1 { font-size: clamp(28px, 2.6vw, 40px); letter-spacing: -1.6px; line-height: 1.2; margin-bottom: 12px; }
.page-heading p { color: #6b8377; font-size: 14px; }
.primary { background: #1b9978; border-radius: 9px; padding: 13px 20px; font-size: 13px; }
.primary:hover { background: #157d62; }
#new-event { background: #29b48b; padding: 17px 25px; font-size: 14px; }
#new-event:hover { background: #219c78; }
.event-bar { padding: 26px 28px; border-radius: 17px; background: #172e25; border-color: #27493b; color: #eef8f2; gap: 28px; margin-bottom: 24px; }
.event-bar label { color: #a5c5b6; font-size: 10px; letter-spacing: 1.6px; margin-bottom: 13px; }
.event-select select { background: #172e25; color: #eef8f2; border-bottom: 1px solid #345446; padding: 7px 5px 10px; font-size: 20px; color-scheme: dark; }
.operator { border: 0; flex: 1; padding-left: 0; }
.operator input { color: #eef8f2; background: transparent; font-size: 17px; width: 100%; border-color: #345446; padding: 9px 3px 12px; }
.operator input::placeholder { color: #90ac9d; }
.event-tag { color: #6ce1b8; background: #214a3a; padding: 10px 14px; border-radius: 25px; font-size: 11px; white-space: nowrap; }
.stats { gap: 22px; margin-bottom: 28px; }
.stats article { padding: 27px 24px; min-height: 132px; border-radius: 17px; gap: 19px; box-shadow: 0 3px 10px #1b403303; }
.stat-icon { width: 54px; height: 54px; font-size: 29px; border-radius: 15px; flex-shrink: 0; }
.blue { color: #5e8fe3; background: #edf2fc; }
.green { color: #23a67f; background: #e7f5ee; }
.amber { color: #d49a33; background: #fff4df; }
.stats p { color: #73877b; font-size: 12px; line-height: 1.5; margin-bottom: 3px; }
.stats strong { font-size: 38px; line-height: 1.2; letter-spacing: -1.5px; }
#count-total { color: #5b87d3; }
#count-present { color: #1b9f79; }
#count-waiting { color: #d59b38; }
#notice { background: #e4f5ed; border: 1px solid #c4e7d7; border-left: 4px solid #29b48b; padding: 19px 23px; border-radius: 12px; color: #286c52; margin-bottom: 24px; line-height: 1.6; }
#notice.error { border-color: #ecc9ce; border-left-color: #c45c6c; color: #92384a; }
.import-card { border-radius: 16px; padding: 25px; background: #edf5f0; border-color: #b4d2c2; }
.import-icon { border-radius: 13px; color: #16866c; }
h2 { font-size: 16px; }
.import-description p { font-size: 12px; line-height: 1.6; color: #5e7b6b; }
.import-description small { color: #6c8879; line-height: 1.6; }
.file-label { color: #237659; font-size: 12px; }
#import-target { display: inline-block; padding: 7px 10px; margin: 12px 0 0; border-radius: 6px; background: #deeee4; color: #245f45; font-size: 12px; font-weight: 600; }
.file-label input { font-size: 11px; }
.file-label input::file-selector-button { background: white; border: 1px solid #c0d8cb; padding: 7px 9px; border-radius: 6px; color: #31765a; cursor: pointer; }
.participants-card { border-radius: 17px; background: #172e25; border-color: #27493b; color: #eef8f2; }
.participants-card .table-heading p,
.participants-card .person small,
.participants-card .empty p { color: #a5c5b6; }
.participants-card th { background: #142820; color: #a5c5b6; border-color: #345446; }
.participants-card td { border-color: #345446; }
.participants-card .table-footer { background: #142820; color: #a5c5b6; border-color: #345446; }
.participants-card tbody tr:focus-within { background: #142820; }
.table-heading { padding: 27px 26px 22px; }
.table-heading p { color: #73877b; font-size: 12px; }
.secondary { border-color: #d9e4dc; color: #496855; border-radius: 8px; padding: 10px 15px; }
.secondary:hover { background: #edf5ef; }
.search-bar { padding: 0 26px 24px; }
.search-box { max-width: 530px; border-color: #dce6df; border-radius: 8px; background: #fcfdfc; }
.search-box input { font-size: 12px; padding: 13px 0; color: #244a35; }
.search-box input::placeholder { color: #7e9486; }
th { background: #f5f8f6; color: #718778; border-color: #e7eee9; padding-top: 17px; padding-bottom: 17px; }
td { border-color: #edf2ee; padding-top: 19px; padding-bottom: 19px; }
tbody tr:hover { background: #fbfdfb; }
.avatar { background: #e6f3ec; color: #308364; }
.person small { color: #718b7a; }
.table-footer { background: #fcfdfc; color: #748c7c; border-color: #e7eee9; padding: 17px 26px; font-size: 11px; }
.empty { padding: 45px 20px 50px; }
.empty-icon { background: #edf5f0; color: #5c9c7b; }
.empty p { color: #72897a; }
.footnote { color: #718779; font-size: 11px; }
dialog { border-radius: 17px; color: var(--ink); }
dialog::backdrop { background: #0a2118a6; backdrop-filter: blur(3px); }
dialog input { border-color: #ceded3; }
dialog p { color: #6b8375; }
:is(button, a, input, select):focus-visible { outline: 3px solid #4abe98; outline-offset: 4px; }
section[id] { scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 5px 0 22px; }
.section-heading h2 { margin: 0; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 24px; }
.event-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: linear-gradient(145deg, #dce7df, #cbdccf); border: 2px solid #87a591; border-radius: 18px; padding: 0; box-shadow: 0 6px 18px #173c2920, 0 1px 3px #173c2914; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease; cursor: pointer; }
.event-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.event-card-cover { width: 100%; height: 280px; object-fit: contain; border-bottom: 2px solid #a0bca9; background: #d2e0d6; }
.event-card h2 { font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.event-card p { font-size: 12px; color: #55735f; line-height: 1.7; margin: 11px 0 24px; }
.event-card-links { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid #bdcfc2; padding-top: 20px; margin-top: auto; color: #196e50; }
.event-card-cta { font-size: 12px; font-weight: 700; }
.event-card-arrow { display: grid; place-items: center; width: 34px; height: 34px; background: #cde3d5; border-radius: 50%; font-size: 20px; transition: background .2s ease, transform .2s ease; }
.event-card:focus-visible { outline: 3px solid #16866c; outline-offset: 5px; }
.event-card:active { transform: translateY(1px); box-shadow: 0 2px 6px #173c2914; }
.cover-preview { background: #e8f0eb; border: 2px dashed #acc7b7; border-radius: 12px; overflow: hidden; min-height: 150px; display: grid; place-items: center; text-align: center; }
.cover-preview img { width: 100%; height: 260px; object-fit: contain; }
.cover-preview span { font-size: 12px; padding: 24px; color: #607d6a; }
#event-image, #new-event-image { font-size: 12px; }
#image-error, #new-event-error { background: #fcebee; border-radius: 6px; color: #92384a; padding: 10px; }
#new-cover-preview { margin-top: 16px; }
#event-dialog, #edit-event-dialog { max-height: calc(100dvh - 40px); overflow-y: auto; }
#edit-event-image { margin-top: 12px; font-size: 12px; }
#edit-event-error { background: #fcebee; border-radius: 6px; color: #92384a; padding: 10px; }
.delete-event-section { margin-top: 24px; padding: 16px; border: 1px solid #e7bdc4; border-radius: 10px; background: #fff6f7; }
.delete-event-section summary { cursor: pointer; color: #a03549; font-size: 13px; font-weight: 700; }
.delete-event-section p { color: #86434f; font-size: 12px; }
.delete-event-section label { line-height: 1.6; overflow-wrap: anywhere; }
.danger { margin-top: 15px; padding: 12px 16px; border-radius: 8px; background: #ad354c; color: white; font-size: 12px; }
.danger:not(:disabled):hover { background: #842439; transform: scale(1.02); }
.event-card-links a { font-size: 11px; text-align: center; }
.event-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.event-links a { display: inline-block; }
.event-links .selected { background: #1b9978; border-color: #1b9978; color: white; box-shadow: 0 3px 10px #13795b18; }
.event-links .selected:hover { background: #157d62; color: white; }
.event-links .back-events { margin-right: auto; background: #1b9978; border-color: #1b9978; color: white; box-shadow: 0 3px 10px #13795b18; }
#page-title { overflow-wrap: anywhere; }
#events-empty { border: 1px dashed #bfd6c7; background: white; border-radius: 16px; }
@media (hover: hover) and (pointer: fine) {
  .event-card:hover { transform: translateY(-5px); border-color: #3f9068; background: linear-gradient(145deg, #d1e1d5, #bdd4c4); box-shadow: 0 14px 28px #183d2926; }
  .event-card:hover .event-card-arrow { transform: translate(2px, -2px); background: #b5dac5; }
}
@media (max-width: 760px) {
  .sidebar .nav-item { display: inline-flex; padding: 11px 14px; margin: 18px 7px 0 0; gap: 9px; font-size: 12px; }
  .sidebar .nav-item svg { width: 16px; height: 16px; }
  .sidebar .nav-item.active::before { top: 10px; bottom: 10px; }
  .event-card-body { padding: 24px; }
  .event-card-cover { height: 230px; }
  .event-links a { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .event-card:hover { transform: none; }
  .event-card:active, .event-card:hover .event-card-arrow { transform: none; }
}
/* Resposta visual dos controles e superfícies. */
:is(button, .secondary, .brand, .nav-item, .file-label, .stat-icon) {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease,
    box-shadow .2s ease, transform .2s ease;
}
:is(.stats article, .event-bar, .import-card, .participants-card, .search-box, dialog input, .operator input, .event-select select) {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease,
    transform .2s ease;
}
tbody tr { transition: background-color .18s ease; }
.primary:not(:disabled):active, .secondary:not(:disabled):active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
}
.nav-item:active { transform: scale(.98); }
.search-box:focus-within {
  background: white;
  border-color: #33aa83;
  box-shadow: 0 0 0 3px #29b48b1a;
}
.search-box:focus-within span { color: #16866c; }
dialog input:focus-visible {
  border-color: #2bab81;
  box-shadow: 0 0 0 3px #29b48b1a;
}
.operator input:focus-visible, .event-select select:focus-visible {
  background: #1e3a2e;
  border-color: #61d3a9;
  border-radius: 5px;
}
.file-label:focus-within { color: #125c43; }
tbody tr:focus-within { background: #f0f8f3; }
.row-actions button:disabled { opacity: .45; }
@media (hover: hover) and (pointer: fine) {
  .primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 13px #13795b25;
  }
  #new-event:hover { box-shadow: 0 6px 18px #16866c33; }
  .secondary:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: #8cbda3;
    box-shadow: 0 3px 8px #193e2810;
  }
  .brand:hover { transform: translateY(-1px); color: #b5f1d8; }
  .nav-item:hover { transform: translateX(3px); }
  .nav-item.active:hover { background: #24533f; }
  .stats article:hover {
    transform: translateY(-4px);
    border-color: #b3d4bf;
    box-shadow: 0 10px 24px #183d2910;
  }
  .stats article:hover .stat-icon { transform: scale(1.06); }
  .event-bar:hover { border-color: #44765d; box-shadow: 0 5px 17px #142b2410; }
  .event-select select:hover { border-color: #64bd96; cursor: pointer; }
  .operator input:hover { border-color: #64bd96; }
  .import-card:hover { border-color: #6eaf8d; background: #e7f3eb; box-shadow: 0 5px 18px #193e2808; }
  .participants-card:hover { border-color: #c1d6c8; }
  .search-box:hover { border-color: #9fc6af; }
  .search-box:focus-within:hover { border-color: #33aa83; }
  tbody tr:hover { background: #f0f8f3; }
  .file-label:hover { color: #124f3a; }
  .file-label input:hover::file-selector-button { background: #e5f4eb; border-color: #79b695; }
  dialog input:hover { border-color: #96bda5; }
  .close:hover { color: #1b6f50; background: #edf5ef; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  :is(button, a, .stats article, .stat-icon):is(:hover, :active) { transform: none !important; }
}
@media (min-width: 1600px) {
  .sidebar { width: 310px; padding: 36px 25px; }
  main { margin-left: 310px; }
  .content { padding: 54px; }
  .topbar { padding: 0 54px; }
  .stats article { padding: 32px; min-height: 155px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 240px; padding: 30px 18px; }
  .brand { font-size: 16px; gap: 10px; }
  .brand-icon { width: 41px; height: 44px; }
  .brand small { font-size: 9px; }
  main { margin-left: 240px; }
  .topbar { padding: 0 28px; }
  .content { padding: 36px 28px; }
  .nav-item { font-size: 13px; gap: 12px; padding: 16px; }
  .stats { gap: 14px; }
  .stats article { gap: 12px; padding: 23px 18px; }
  .stat-icon { width: 43px; height: 46px; }
  .stats p { font-size: 11px; }
  .stats strong { font-size: 32px; }
  .event-tag { display: none; }
  .event-bar { gap: 25px; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .sidebar { width: 210px; padding-inline: 14px; }
  main { margin-left: 210px; }
  .brand { font-size: 14px; }
  .brand-icon { width: 33px; height: 37px; font-size: 25px; border-radius: 10px; }
  .brand small { font-size: 8px; letter-spacing: 1px; }
  .content { padding: 30px 22px; }
  .page-heading { flex-wrap: wrap; }
  .stats article { display: block; padding: 18px 14px; }
  .stat-icon { margin-bottom: 14px; }
}
@media (max-width: 760px) {
  .sidebar { width: 100%; padding: 20px; }
  .brand { font-size: 20px; margin-bottom: 0; }
  .brand-icon { width: 44px; height: 44px; }
  .brand small { font-size: 9px; }
  main { margin-left: 0; }
  .topbar { height: 61px; padding: 0 20px; font-size: 11px; }
  .version { font-size: 8px; padding: 8px; letter-spacing: 1px; }
  .content { padding: 30px 17px 18px; }
  .page-heading { margin-bottom: 25px; }
  h1 { font-size: 30px; letter-spacing: -1.2px; }
  .page-heading p { font-size: 13px; }
  #new-event { padding: 13px 18px; font-size: 13px; }
  .event-bar { padding: 23px 20px; gap: 23px; }
  .event-select select { font-size: 19px; }
  .operator { flex-basis: 100%; }
  .operator input { font-size: 16px; }
  .event-bar label { font-size: 9px; }
  .stats { gap: 9px; }
  .stats article { padding: 17px 12px; min-height: 160px; }
  .stat-icon { width: 34px; height: 36px; border-radius: 10px; font-size: 23px; margin-bottom: 13px; }
  .stats p { min-height: 34px; font-size: 10px; }
  .stats strong { font-size: 31px; }
  .import-card { padding: 21px 18px; }
  .table-heading { padding: 24px 18px 20px; gap: 12px; }
  .search-bar { padding: 0 18px 20px; gap: 8px; }
  .search-box input { font-size: 11px; }
  .table-footer { padding: 16px 18px; font-size: 10px; }
  .footnote { font-size: 10px; }
}

.stats article:has(.blue) { --stat-accent: #5e8fe3; }
.stats article:has(.green) { --stat-accent: #23a67f; }
.stats article:has(.amber) { --stat-accent: #d49a33; }

@media (hover: hover) and (pointer: fine) {
  .participants-card tbody tr:hover { background: #f5f8f6; color: #142b24; }
  .participants-card tbody tr:hover .person small { color: #55735f; }
}

/* Verde profundo e zoom suave nos estados de hover. */
.event-card :is(h2, p, .event-card-cta),
.stats article > div,
.import-description,
.person strong {
  transform-origin: left center;
  transition: transform .22s ease, color .22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .primary:not(:disabled):hover,
  #new-event:not(:disabled):hover,
  .secondary:not(:disabled):hover,
  .event-links .selected:hover,
  .nav-item:hover,
  .nav-item.active:hover,
  .close:not(:disabled):hover {
    background: var(--hover-background);
    border-color: var(--hover-background);
    color: #f0faf5;
    transform: translateY(-2px) scale(1.04);
  }
  .event-card:hover,
  .stats article:hover,
  .import-card:hover,
  tbody tr:hover {
    background: var(--hover-background);
    border-color: var(--hover-background);
    color: #f0faf5;
  }
  .event-card:hover p,
  .event-card:hover .event-card-links,
  .stats article:hover p,
  .stats article:hover :is(#count-total, #count-present, #count-waiting),
  .import-card:hover :is(p, small, .file-label),
  tbody tr:hover .person small {
    color: #e2f3e9;
  }
  .event-card:hover .event-card-arrow {
    background: #e6f8f1;
    color: #103e30;
  }
  .brand:hover { color: #f0faf5; background: var(--hover-background); transform: scale(1.03); }
  .event-bar:hover,
  .event-select select:hover,
  .participants-card:hover,
  .search-box:hover,
  .search-box:focus-within:hover,
  dialog input:not(:disabled):hover {
    border-color: var(--hover-background);
  }
  .file-label:hover { color: #f0faf5; background: var(--hover-background); border-radius: 5px; }
  .file-label input:not(:disabled):hover::file-selector-button {
    background: var(--hover-background);
    border-color: var(--hover-background);
    color: #f0faf5;
  }
  .event-card:hover { transform: translateY(-4px) scale(1.015); }
  .event-card:hover :is(h2, p, .event-card-cta),
  .stats article:hover > div,
  .import-card:hover .import-description,
  tbody tr:hover .person strong { transform: scale(1.04); }
  .event-card:hover .event-card-links { border-color: #486354; }
  .import-card:hover h2 { color: #f0faf5; }
  .primary:not(:disabled):active,
  .secondary:not(:disabled):active { transform: scale(.98); }
  .stats article:hover {
    background: var(--stat-accent);
    border-color: var(--stat-accent);
  }
  .stats article:hover p,
  .stats article:hover :is(#count-total, #count-present, #count-waiting) {
    color: #102b27;
  }
  .stats article:hover .stat-icon { background: #ffffffed; }
}
@media (prefers-reduced-motion: reduce) {
  .event-card:hover :is(h2, p, .event-card-cta),
  .stats article:hover > div,
  .import-card:hover .import-description,
  tbody tr:hover .person strong { transform: none; }
}
