:root {
  --blue-dark: #123b7a;
  --blue-main: #1f5fae;
  --blue-soft: #eaf2ff;
  --blue-border: #cddcf3;

  --yellow: #f4b400;
  --green: #2e9d57;
  --red: #d64545;
  --orange: #f39c12;

  --bg: #f4f7fb;
  --white: #ffffff;
  --text: #233044;
  --muted: #6e7b8f;
  --border: #dde5f0;

  --shadow: 0 8px 24px rgba(18, 59, 122, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box; 
}

body {
  margin:0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* TOPO */
.topbar {
  display: grid;
  position: static;
  grid-template-columns: 180px 1fr 320px;
  align-items: center;
  gap: 20px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-main));
  color: var(--white);
  padding: 20px 20px;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.logo-box {
  width: 40px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

.topbar-center {
  text-align: center;
}

.topbar-center h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.topbar-center p {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.95;
}

.topbar-right {
  display: flex;
  justify-content: flex-end;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-info strong {
  font-size: 14px;
}

.user-info span {
  font-size: 12px;
  opacity: 0.9;
}

.logout-btn {
  border: 0;
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  font-size: 15px;
}

/* LAYOUT */
.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  gap: 22px;
  padding: 24px 28px;
  align-items: start;
}

.card,
.calendar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
}

.card h2,
.calendar-header h2 {
  margin: 0 0 16px;
  font-size: 22px;
  color: var(--blue-dark);
}

/* SIDEBAR LEFT */
.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meeting-item {
  background: #f8fbff;
  border: 1px solid var(--blue-border);
  border-radius: 14px;
  padding: 12px;
}

.meeting-item strong {
  display: block;
  font-size: 14px;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.meeting-item span {
  font-size: 13px;
  color: var(--muted);
}

.my-meeting p {
  margin: 8px 0;
}

.cancel-btn {
  margin-top: 12px;
  width: 100%;
  border: 2px solid var(--red);
  background: transparent;
  color: var(--red);
  font-weight: 700;
  border-radius: 999px;
  padding: 12px;
  cursor: pointer;
}

/* CALENDÁRIO */
.calendar-card {
  padding: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-controls button {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

#weekLabel {
  font-weight: 700;
  color: var(--blue-dark);
  min-width: 210px;
  text-align: center;
}

.calendar-grid-wrapper {
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-width: 760px;
}

.grid-header,
.time-cell,
.day-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid-header {
  background: #f7faff;
  padding: 14px 10px;
  text-align: center;
  font-weight: 700;
  color: var(--blue-dark);
}

.time-cell {
  background: #fbfcfe;
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

.day-cell {
  min-height: 86px;
  padding: 8px;
  background: var(--white);
  position: relative;
}

.day-cell:hover {
  background: #f9fbff;
}

.event {
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.event strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.event-blue {
  background: rgba(31, 95, 174, 0.12);
  border-left: 4px solid var(--blue-main);
  color: var(--blue-dark);
}

.event-orange {
  background: rgba(243, 156, 18, 0.16);
  border-left: 4px solid var(--orange);
  color: #8a5600;
}

.event-green {
  background: rgba(46, 157, 87, 0.14);
  border-left: 4px solid var(--green);
  color: #1b6a3a;
}

.event-red {
  background: rgba(214, 69, 69, 0.14);
  border-left: 4px solid var(--red);
  color: #9d2f2f;
}

#openScheduleModal{
background: #56b08c;
color: #ffff;
}

/* SIDEBAR RIGHT */
.available-times {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.time-badge {
  background: #f8fbff;
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  color: var(--blue-dark);
}

.time-badge.free {
  border-left: 5px solid var(--green);
}

.time-badge.busy {
  border-left: 5px solid var(--red);
}

.time-badge.running {
  border-left: 5px solid var(--orange);
}

/* MODAL */

.modal-box--large {
   max-width: 1000px; /* antes provavelmente 700 ou 800 */
  width: 90%;
}

.schedule-layout {
  display:grid;
  grid-template-columns: 1fr 1.2fr; 
  gap:32px;
  align-items:start;
}

.schedule-left,
.schedule-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-left h3,
.schedule-right h3 {
  margin: 0;
  color: #123b7a;
  font-size: 22px;
}

.schedule-input {
  width: 100%;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  color: #233044;
}

.day-info {
  background: #f8fbff;
  border: 1px solid #d9e3f2;
  border-radius: 14px;
  padding: 14px;
}

.day-meetings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.day-meeting-item {
  background: #fff;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  padding: 10px 12px;
}

.day-meeting-item strong {
  display: block;
  color: #123b7a;
  margin-bottom: 4px;
}

.day-meeting-item span {
  color: #5b6b84;
  font-size: 13px;
}

.schedule-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-form label {
  font-size: 13px;
  font-weight: 700;
  color: #123b7a;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

  .time-row {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVO */
@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .topbar-left,
  .topbar-right {
    justify-content: center;
  }
}

/*MODAL CANCELAR */
.schedule-btn {
  border: 0;
  background: #1f5fae;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
}

.schedule-btn:hover {
  filter: brightness(1.05);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  border: 1px solid #dde5f0;
}

.modal-box h3 {
  margin: 0 0 10px;
  color: #123b7a;
  font-size: 22px;
}

.modal-box p {
  margin: 0 0 16px;
  color: #6e7b8f;
  font-size: 14px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.modal-item {
  border: 1px solid #d9e3f2;
  background: #f8fbff;
  border-radius: 12px;
  padding: 12px;
}

.modal-item strong {
  display: block;
  color: #123b7a;
  margin-bottom: 4px;
}

.modal-item span {
  display: block;
  font-size: 13px;
  color: #55657d;
  margin-bottom: 10px;
}

.modal-item button {
  border: 0;
  background: #d64545;
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.modal-item button.schedule-option {
  background: #1f5fae;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.modal-btn.secondary {
  background: #eef3fb;
  color: #123b7a;
}
