:root {
  --ink: #1e1e1e;
  --muted: #6c6c6c;
  --line: #e1e1e1;
  --paper: #f5f5f5;
  --surface: #ffffff;
  --green: #646464;
  --green-deep: #4b4b4b;
  --blue: #606060;
  --amber: #808080;
  --shadow: 0 24px 70px rgba(30, 30, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #191919;
  color: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #909090;
  color: #101010;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: #b8b8b8;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a,
.nav-button {
  color: #e7e7e7;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav-list a.active,
.nav-list a:hover,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e1e1e1;
  line-height: 1.45;
}

.sidebar-note p {
  margin: 10px 0 0;
}

.status-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ababab;
}

.main-content {
  padding: 24px;
}

.top-band {
  min-height: clamp(410px, 54vh, 620px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 28px;
  padding: 34px;
  overflow: hidden;
  background: linear-gradient(100deg, #f9f9f9 0%, #f4f4f4 48%, #e5e5e5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-copy {
  max-width: 680px;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.4rem, 5vw, 5.35rem);
}

h2 {
  font-size: 1.45rem;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions,
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primary-button {
  background: var(--green);
  color: #ffffff;
}

.secondary-button {
  background: #ebebeb;
  color: var(--ink);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.full {
  width: 100%;
}

.hero-visual {
  width: min(100%, 760px);
  justify-self: end;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 18px;
}

.metric span,
label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 1.15rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.compact-form,
.compact-form label {
  display: grid;
  gap: 10px;
}

.compact-form {
  gap: 15px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfc;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.12);
}

textarea {
  resize: vertical;
}

.parsed-preview {
  min-height: 126px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: #f7f7f7;
  color: var(--muted);
  line-height: 1.55;
}

.schedule-panel {
  margin-top: 18px;
}

.event-count {
  background: #f4f4f4;
  color: var(--green-deep);
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 800;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfc;
}

.event-item h3 {
  margin: 0 0 5px;
  font-size: 1.02rem;
}

.event-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 10px;
  background: #f2f2f2;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.82rem;
}

.empty-state {
  padding: 28px;
  border-radius: 8px;
  background: #f7f7f7;
  color: var(--muted);
  text-align: center;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  background: #f6f6f6;
}

.auth-visual {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 34px;
  background: #191919;
  color: #f9f9f9;
  overflow: hidden;
}

.auth-visual img {
  width: min(100%, 860px);
  align-self: center;
  border-radius: 8px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.36);
}

.auth-brand small {
  color: #b8b8b8;
}

.auth-panel {
  width: min(100%, 520px);
  align-self: center;
  justify-self: center;
  padding: 28px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ededed;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(30, 30, 30, 0.08);
}

.auth-form {
  display: none;
  gap: 15px;
}

.auth-form.active {
  display: grid;
}

.auth-form h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.auth-form label {
  display: grid;
  gap: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.google-button {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.auth-message {
  min-height: 24px;
  color: var(--amber);
  line-height: 1.45;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .top-band,
  .workspace-grid,
  .metrics-row {
    grid-template-columns: 1fr;
  }

  .top-band {
    padding: 24px;
  }

  .hero-visual {
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .main-content,
  .sidebar,
  .auth-visual,
  .auth-panel {
    padding: 16px;
  }

  .top-band,
  .panel {
    padding: 18px;
  }

  .event-item {
    grid-template-columns: 1fr;
  }
}

.calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:18px;}
.calendar-grid > strong {text-align:center;padding:8px;font-size:12px;}
.calendar-day {min-height:95px;border:1px solid #e1e1e1;border-radius:8px;padding:5px;overflow:hidden;}
.calendar-day.muted {opacity:.45;} .calendar-day.today {border:2px solid #676767;}
.calendar-date {border:0;background:transparent;padding:5px;cursor:pointer;}
.calendar-event {display:block;width:100%;border:0;border-radius:4px;background:#efefef;color:#3a3a3a;margin:3px 0;padding:5px;font-size:11px;text-align:left;overflow-wrap:anywhere;cursor:pointer;}
@media(max-width:600px){.calendar-day{min-height:75px;padding:2px;}.calendar-event{font-size:9px;padding:2px;}.calendar-grid{gap:2px;}}

.agenda-toolbar {display:flex;gap:16px;flex-wrap:wrap;margin:16px 0;}.agenda-toolbar label{flex:1;min-width:180px;}.agenda-toolbar input,.agenda-toolbar select{width:100%;padding:12px;border:1px solid #d8d8d8;border-radius:8px;background:white;}#agendaSummary{color:#656565;}#actionFeedback{color:#616161;}.event-item button{margin-top:5px;}

[hidden] {display:none !important;}

/* Dashboard */
.dashboard{--paper:#f7f7f7;--ink:#2d2d2d;--muted:#7c7c7c;--green:#656565;--green-deep:#505050;--line:#eaeaea;font-size:14px;}
.dashboard .app-shell{grid-template-columns:224px minmax(0,1fr);}
.dashboard .sidebar{background:#282828;padding:32px 20px;gap:38px;}
.dashboard .brand{gap:11px;}.dashboard .brand-mark{background:#e0e0e0;color:#353535;border-radius:13px;width:42px;height:42px;flex-shrink:0;font-size:13px;}
.dashboard .brand strong{font-size:20px;font-weight:650;letter-spacing:-.6px;line-height:1.1;}.brand-sub{display:block;font-size:11px;font-weight:450;letter-spacing:.6px;margin-top:5px;color:#bfbfbf;}.dashboard .brand small{font-size:11px;margin-top:9px;}
.nav-caption{font-size:9px;letter-spacing:1.8px;color:#a5a5a5;padding:10px 12px 4px;}.dashboard .nav-list{gap:5px;}.dashboard .nav-list a{display:flex;gap:12px;align-items:center;font-size:12px;padding:13px 12px;color:#cecece;}.dashboard .nav-list a span{font-size:19px;width:22px;text-align:center;color:#aeaeae;}.dashboard .nav-list a.active{background:#414141;color:white;box-shadow:inset 3px 0 #cecece;}.dashboard .sidebar-note{font-size:11px;line-height:1.7;border-color:#4b4b4b;background:#313131;color:#c4c4c4;padding:15px;}.dashboard .status-dot{background:#bdbdbd;width:6px;height:6px;}
.dashboard .main-content{padding:38px 40px;max-width:1600px;width:100%;margin:auto;display:flex;flex-direction:column;gap:24px;}
.dashboard .top-band{display:flex;justify-content:space-between;min-height:0;padding:0 0 6px;gap:24px;border:0;background:none;overflow:visible;}.dashboard h1{font-size:34px;letter-spacing:-1.3px;font-weight:650;line-height:1.2;}.dashboard .hero-copy>p:not(.eyebrow){font-size:13px;margin:10px 0 0;line-height:1.6;}.dashboard .eyebrow{font-size:9px;letter-spacing:1.6px;font-weight:700;margin-bottom:9px;color:#8d8d8d;}.dashboard .hero-actions{flex-wrap:nowrap;margin:0;flex-shrink:0;}.dashboard h2{font-size:19px;line-height:1.3;font-weight:650;letter-spacing:-.4px;}
.dashboard button,.dashboard a{transition:background .15s,box-shadow .15s;}.dashboard .primary-button,.dashboard .secondary-button{font-size:12px;font-weight:600;border-radius:9px;min-height:40px;padding:0 15px;}.dashboard .primary-button{box-shadow:0 3px 8px #64646417;}.dashboard .primary-button:hover{background:#515151;}.dashboard .secondary-button{background:white;border:1px solid #e5e5e5;color:#686868;}.dashboard .secondary-button:hover{background:#f4f4f4;}.dashboard button:disabled{opacity:.4;cursor:not-allowed;}.dashboard :focus-visible{outline:3px solid #adadad;outline-offset:3px;}
.dashboard .panel{border-radius:16px;padding:24px;box-shadow:0 3px 12px #37373703;}.dashboard .panel-header{align-items:center;}.calendar-controls{display:flex;align-items:center;gap:7px;}.calendar-hint{font-size:11px;color:#8c8c8c;margin-right:12px;}.calendar-controls button:not(#calendarToday){min-width:36px;font-size:22px;padding:0 10px;}#calendarTitle{text-transform:capitalize;}
.dashboard .calendar-grid{gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-top:22px;}.dashboard .calendar-grid>strong{background:#fafafa;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#929292;font-weight:550;padding:13px 0;border-bottom:1px solid var(--line);}.dashboard .calendar-day{min-height:108px;border:0;border-right:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;border-radius:0;padding:7px;background:white;}.dashboard .calendar-day:nth-child(7n){border-right:0;}.dashboard .calendar-day.muted{opacity:1;background:#fbfbfb;}.dashboard .muted .calendar-date{color:#c1c1c1;}.dashboard .calendar-day.today{background:#f6f6f6;border:0;border-right:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;}.dashboard .calendar-date{width:28px;height:28px;padding:0;font-size:11px;color:#6f6f6f;border-radius:50%;}.dashboard .today .calendar-date{background:#646464;color:white;font-weight:700;}.dashboard .calendar-event{font-size:10px;line-height:1.5;background:#efefef;border-left:2px solid #959595;padding:5px 6px;color:#5a5a5a;border-radius:4px;margin-top:5px;}
.dashboard .workspace-grid{gap:24px;grid-template-columns:1fr 1fr;}.dashboard .compact-form{grid-template-columns:1fr 1fr;gap:16px;}.compact-form .panel-header,.compact-form label:first-of-type,.compact-form label:last-of-type,.compact-form>.full,.compact-form>#cancelEdit{grid-column:1/-1;}.dashboard label{font-size:11px;color:#757575;line-height:1.6;}.dashboard input,.dashboard textarea,.dashboard select{font-size:13px;background:#fcfcfc;border:1px solid #e6e6e6;border-radius:9px;padding:12px;color:#404040;}.dashboard input::placeholder,.dashboard textarea::placeholder{color:#aaaaaa;}.dashboard .parsed-preview{background:#f6f6f6;border:1px dashed #dfdfdf;border-radius:10px;font-size:12px;min-height:100px;}.dashboard #ia{background:linear-gradient(145deg,#ffffff 60%,#f6f6f6);}.dashboard #ia textarea{min-height:144px;line-height:1.8;}.dashboard .schedule-panel{margin:0;}.dashboard .agenda-toolbar{margin:0;gap:12px;}.dashboard .agenda-toolbar label:first-child{flex:3;}.dashboard .agenda-toolbar label{display:grid;gap:5px;}.dashboard #agendaSummary{font-size:11px;margin:14px 0;}.dashboard #actionFeedback:empty{display:none;}.dashboard .event-count{font-size:11px;background:#f4f4f4;border-radius:20px;padding:7px 12px;}.dashboard .event-item{background:#ffffff;border:1px solid #ebebeb;padding:18px;border-radius:12px;gap:12px;}.dashboard .event-item>div:last-child:not(:first-child){grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;padding-top:9px;border-top:1px solid #f2f2f2;}.dashboard .event-item button{font-size:10px;min-height:31px;margin:0;padding:0 11px;}.dashboard .event-item h3{font-size:14px;font-weight:600;}.dashboard .event-meta{font-size:11px;line-height:1.8;overflow-wrap:anywhere;}.dashboard .tag{font-size:9px;background:#f4f4f4;color:#7a7a7a;font-weight:600;border-radius:6px;}.dashboard [data-delete]{color:#717171;}.dashboard .empty-state{font-size:12px;background:#f9f9f9;}
.dashboard .metrics-row{margin:0;gap:16px;}.dashboard .metric{border-radius:12px;padding:18px 20px;}.dashboard .metric span{font-size:11px;}.dashboard .metric strong{font-size:14px;margin-top:7px;font-weight:600;}.integration-link{display:block;margin-top:12px;font-size:11px;color:var(--green);text-decoration:none;}#whatsappPanel p:not(.eyebrow){font-size:12px;line-height:1.8;color:#7e7e7e;}#whatsappPanel #connectionMessage{padding:10px 14px;background:#f5f5f5;border-radius:9px;}#whatsappQR{max-width:100%;height:auto;border:1px solid var(--line);border-radius:12px;} .dashboard section,.dashboard form{scroll-margin-top:24px;}
@media(min-width:1600px){.dashboard .calendar-day{min-height:125px;}}
@media(max-width:1150px){.dashboard .main-content{padding:28px 24px;}.dashboard .app-shell{grid-template-columns:194px minmax(0,1fr);}.dashboard .sidebar{padding:28px 14px;}.calendar-hint{display:none;}.dashboard h1{font-size:29px;}.dashboard .hero-actions{flex-wrap:wrap;justify-content:flex-end;}}
@media(max-width:850px){.dashboard .app-shell{display:block;}.dashboard .sidebar{position:relative;height:auto;padding:16px 20px;gap:16px;}.dashboard .brand-sub{display:inline;margin-left:6px;}.dashboard .brand small{margin-top:3px;}.dashboard .nav-list{display:flex;overflow:auto;gap:5px;}.dashboard .nav-list a{white-space:nowrap;padding:9px 12px;}.nav-caption,.dashboard .sidebar-note{display:none;}.dashboard .brand strong{font-size:18px;}.dashboard .top-band{align-items:flex-start;}.dashboard .hero-actions{max-width:180px;}.dashboard .workspace-grid{grid-template-columns:1fr 1fr;}.dashboard .calendar-day{min-height:95px;}}
@media(max-width:600px){.dashboard .main-content{padding:24px 14px;gap:18px;}.dashboard .top-band{display:block;}.dashboard h1{font-size:30px;}.dashboard .hero-actions{max-width:none;justify-content:flex-start;margin-top:18px;}.dashboard .panel{padding:18px 14px;border-radius:13px;}.dashboard .workspace-grid{grid-template-columns:1fr;gap:18px;}.dashboard .calendar-day{min-height:78px;padding:3px;}.dashboard .calendar-date{width:24px;height:24px;font-size:10px;}.dashboard .calendar-event{font-size:9px;padding:3px;line-height:1.3;}.dashboard .calendar-controls{gap:4px;}.dashboard .calendar-controls button{padding:0 9px;min-height:34px;}.dashboard h2{font-size:17px;}.dashboard .calendar-header{gap:8px;}.dashboard .calendar-header .eyebrow{font-size:8px;}.dashboard .metrics-row{grid-template-columns:1fr;gap:10px;}.dashboard .metric{padding:14px 18px;}.dashboard .agenda-toolbar label{min-width:120px;}.dashboard .event-item{grid-template-columns:1fr auto;padding:14px;}.dashboard .event-item>div:first-child{min-width:0;}}
@media(prefers-reduced-motion:reduce){.dashboard *{scroll-behavior:auto!important;transition:none!important;}}

/* O formulário manual ocupa a largura liberada pelo editor de mensagens. */
.dashboard .workspace-grid{grid-template-columns:minmax(0,1fr);}

/* Identidade atual da página de acesso. */
.auth-visual{background:linear-gradient(145deg,#101713,#163c27);justify-content:flex-start;gap:24px;}
.auth-brand{color:#fff;text-decoration:none;flex-shrink:0;}
.auth-brand .brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#fff;color:#171717;font-size:15px;font-weight:800;}
.auth-brand strong{font-size:22px;line-height:1.05;letter-spacing:-.5px;}
.auth-brand strong small{display:block;color:#fff;font-size:12px;letter-spacing:0;font-weight:500;margin-top:5px;}
.auth-photo{position:relative;flex:1;min-height:360px;max-height:720px;border-radius:24px;overflow:hidden;}
.auth-photo img{display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:cover;border-radius:0;filter:none;box-shadow:none;}
.auth-photo::after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 35%,#06140be6);}
.auth-photo-caption{position:absolute;z-index:1;bottom:32px;left:28px;right:24px;color:#fff;}
.auth-photo-caption p{font-size:11px;letter-spacing:2px;}
.auth-photo-caption h2{font-size:clamp(24px,3vw,40px);line-height:1.2;color:#fff;}
.auth-photo-credit,.auth-photo-credit a{font-size:10px;color:#c4d4c9;}
@media(max-width:900px){.auth-visual{min-height:auto;}.auth-photo{min-height:280px;}.auth-photo-caption{bottom:20px;left:20px;}}
