  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
  }

  body {
    display: flex;
    background: #f6f8fb;
    color: #111827;
  }

  /* SIDEBAR */

  .sidebar {
    width: 260px;
    height: 100vh;
    background: #061b33;
    color: white;
    padding: 28px 20px;
    position: fixed;
  }

  .logo {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 40px;
      text-decoration: none;
  color: inherit;
  }

  .sidebar-logo {
    width: 46px;
    height: 46px;

    background: rgba(255, 255, 255, 0.92);

    border-radius: 50%;

    padding: 6px;

    object-fit: contain;

    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.12),
      0 8px 24px rgba(36, 99, 217, 0.28);

    transition: 0.25s ease;
  }

  .sidebar-logo:hover {
    transform: scale(1.08) rotate(2deg);

    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.18),
      0 10px 30px rgba(36, 99, 217, 0.45);
  }

  .logo h2 {
    font-size: 24px;
  }

  .logo p,
  .user-box p {
    color: #b8c4d6;
    font-size: 14px;
  }

  /* MENU */

  nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  nav a {
    padding: 14px 16px;
    border-radius: 10px;
    color: #dbe7f5;
    cursor: pointer;
    transition: 0.2s;
  }

  nav a.active,
  nav a:hover {
    background: #2463d9;
    color: white;
  }

  nav a.disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }

  /* USUÁRIO */

  .user-box {
    position: absolute;
    bottom: 30px;
    left: 20px;

    display: flex;
    align-items: center;
    gap: 12px;

    cursor: pointer;
  }

  .avatar {
    width: 42px;
    height: 42px;

    background: white;
    color: #061b33;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
  }

  .user-info {
    position: relative;
  }

  .user-menu {
    display: none;

    position: absolute;

    left: 0;
    bottom: 38px;

    width: 170px;

    background: white;

    border-radius: 14px;

    padding: 8px;

    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);

    z-index: 999;
  }

  .user-menu a {
    display: block;

    padding: 12px;

    border-radius: 10px;

    color: #111827;

    font-size: 14px;

    text-decoration: none;

    cursor: pointer;
  }

  .user-menu a:hover {
    background: #f1f5f9;
  }

  .user-box:hover .user-menu {
    display: block;
  }

  /* MAIN */

  .main {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 24px 32px;
  }

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
}

  /* EMPTY */

  .empty-state {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 40px;
    text-align: center;
    color: #64748b;
    margin-bottom: 24px;
  }

  .empty-state h2 {
    color: #111827;
    margin-bottom: 10px;
  }

  /* PATIENT */

  .patient-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;

    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;

    gap: 24px;

    margin-bottom: 24px;
  }

  .patient-info {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .photo {
    width: 100px;
    height: 100px;

    background: #dbeafe;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    font-size: 28px;
  }

  .patient-info h2 {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .summary-box {
    border-left: 1px solid #e5e7eb;
    padding-left: 24px;
  }

  .summary-box h3 {
    font-size: 24px;
    margin: 12px 0;
  }

  /* GRID */

  .grid {
    display: grid;
    grid-template-columns: 2fr 1.3fr;
    gap: 20px;
  }

  /* CARD */

  .card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
  }

  .chart-card {
    min-height: 360px;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  /* SELECT */

  select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
  }



  /* CHART */

  .fake-chart {
    height: 230px;

    border-radius: 14px;

    background: linear-gradient(
      180deg,
      #f8fafc,
      #eef2ff
    );

    border: 1px dashed #cbd5e1;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #64748b;
  }

  /* METRICS */

  .metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
  }

  .metrics div {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
  }

  .metrics h2 {
    font-size: 30px;
    margin: 8px 0;
  }

 
  /* LISTAS */

  .sessions{
    list-style: none;
    margin-top: 18px;
  }

  .sessions li,
  .goals li{
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
  }

 
  .sessions span {
    float: right;

    background: #dcfce7;
    color: #15803d;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 13px;
  }



  .pacientes-card {
    grid-column: 1 / -1;
  }

  /* LOGIN */

  .login-page {
    min-height: 100vh;

    background: #f4f7fb;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    width: 430px;

    background: white;

    border-radius: 24px;

    padding: 42px;

    border: 1px solid #e5e7eb;

    box-shadow:
      0 10px 25px rgba(15, 23, 42, 0.06),
      0 25px 50px rgba(15, 23, 42, 0.08);
  }

  .login-brand {
    text-align: center;
    margin-bottom: 32px;
  }



  .brand-name {
    margin-top: 18px;

    color: #061b33;

    font-size: 30px;
    font-weight: bold;

    letter-spacing: 1px;
  }

  .login-tree-logo {
    width: 150px;
    height: 150px;

    object-fit: contain;

    background: rgba(255, 255, 255, 0.92);

    border-radius: 50%;

    padding: 14px;

    display: block;

    margin: 0 auto 22px;

    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.7),
      0 12px 35px rgba(36, 99, 217, 0.22);

    transition: 0.3s ease;
  }

  .login-tree-logo:hover {
    transform: scale(1.04);

    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.9),
      0 18px 45px rgba(36, 99, 217, 0.32);
  }




  .login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .login-card label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
  }

  .login-card input {
    height: 52px;

    border-radius: 14px;

    border: 1px solid #dbe1ea;

    padding: 0 16px;

    font-size: 15px;

    transition: 0.2s;
  }

  .login-card input:focus {
    outline: none;

    border-color: #2463d9;

    box-shadow: 0 0 0 4px rgba(36, 99, 217, 0.12);
  }

  .login-card button {
    margin-top: 10px;

    height: 54px;

    border: none;

    border-radius: 14px;

    background: #2463d9;

    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
  }

  .login-card button:hover {
    background: #1d4ed8;
  }

  #loginMessage {
    margin-top: 18px;

    text-align: center;

    color: #dc2626;

    font-weight: 600;
  }

  .login-help {
    margin-top: 18px;

    text-align: center;

    font-size: 13px;

    color: #64748b;
  }





  .primary-button {
    background: #2463d9;
    color: white;

    border: none;
    border-radius: 12px;

    padding: 12px 18px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
  }

  .primary-button:hover {
    background: #1d4ed8;
  }

  .hidden {
    display: none !important;
  }



 

  .patient-actions {
    display: flex;
    gap: 8px;
  }

  .edit-button,

  .secondary-button {
    border: none;
    border-radius: 10px;
    padding: 9px 13px;
    cursor: pointer;
    font-weight: bold;
  }





  .secondary-button {
    background: #e5e7eb;
    color: #111827;
  }

  .patient-form-edit {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .patient-form-edit input {
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
  }

  .patient-form-edit input:focus {
    outline: none;
    border-color: #2463d9;
    box-shadow: 0 0 0 3px rgba(36, 99, 217, 0.12);
  }



  .profile-card {
    margin-top: 24px;

    display: flex;
    align-items: center;
    gap: 24px;
  }

  .profile-avatar {
    width: 90px;
    height: 90px;

    background: #061b33;
    color: white;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;
    font-weight: bold;
  }

  .profile-card p {
    margin-bottom: 10px;
    color: #111827;
  }

  .search-input {
    width: 100%;
    height: 48px;

    margin-top: 18px;
    margin-bottom: 10px;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    padding: 0 16px;

    font-size: 15px;
  }

  .search-input:focus {
    outline: none;
    border-color: #2463d9;
    box-shadow: 0 0 0 3px rgba(36, 99, 217, 0.12);
  }

  .modal-overlay {
    position: fixed;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;
  }

  .modal-card {
    width: 420px;

    background: white;

    border-radius: 22px;

    padding: 28px;

    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.30);
  }

  .modal-card h2 {
    color: #111827;
    margin-bottom: 12px;
  }

  .modal-card p {
    color: #64748b;
    line-height: 1.5;
  }

  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 28px;
  }

  .danger-button {
    border: none;
    border-radius: 10px;

    padding: 10px 16px;

    background: #dc2626;
    color: white;

    font-weight: bold;
    cursor: pointer;
  }

  .danger-button:hover {
    background: #b91c1c;
  }

  .toast {
    position: fixed;

    right: 24px;
    bottom: 24px;

    min-width: 280px;

    padding: 16px 20px;

    border-radius: 14px;

    color: white;

    font-weight: 600;

    z-index: 99999;

    opacity: 0;
    transform: translateY(20px);

    transition: 0.3s ease;
  }

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

  .toast.success {
    background: #16a34a;
  }

  .toast.error {
    background: #dc2626;
  }

  .patient-form-edit textarea {
    min-height: 140px;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    padding: 14px;

    font-size: 14px;
    font-family: Arial, sans-serif;

    resize: vertical;
  }

  .patient-form-edit textarea:focus {
    outline: none;
    border-color: #2463d9;
    box-shadow: 0 0 0 3px rgba(36, 99, 217, 0.12);
  }

  .session-item {
    cursor: pointer;
  }

  .session-item p {
    margin-top: 6px;
    color: #64748b;
  }

  .session-details {
    margin-top: 24px;
    display: grid;
    gap: 14px;
  }

  .session-notes {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
  }

  .session-notes p {
    margin-top: 10px;
    color: #475569;
    line-height: 1.5;
  }


  .back-button:hover {
    color: #111827;
  }


 
  
  .patients-toolbar {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
  }

  .patients-toolbar .search-input {
    flex: 1;
    margin: 0;
  }

  .patients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
  }

  .patients-table th {
    text-align: left;
    padding: 14px;
    background: #f8fafc;
    color: #111827;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
  }

  .patients-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
  }

  .patients-table tbody tr {
    cursor: pointer;
    transition: 0.2s;
  }

  .patients-table tbody tr:hover {
    background: #f8fafc;
  }

  .table-avatar {
    width: 38px;
    height: 38px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
  }

  .status-badge {
    background: #dcfce7;
    color: #15803d;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
  }

.table-action {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  font-size: 16px;
}
  .section-header {
    margin-bottom: 24px;
  }

 

 

  .search-wrapper {
    position: relative;
    flex: 1;
  }

  .search-icon {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 14px;
  }

  .search-wrapper .search-input {
    width: 100%;

    padding-left: 38px;

    margin: 0;
  }

  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 24px;
  }

  .page-header h2 {
    font-size: 34px;
    color: #111827;
  }

  .page-actions {
    display: flex;
    gap: 12px;
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;

    margin-bottom: 20px;
  }


.edit-button,
.delete-button {
  background: transparent;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  cursor: pointer;
  color: #475569;

  transition: 0.2s ease;
}

.view-button:hover,
.edit-button:hover,
.delete-button:hover {
  background: #f8fafc;

  border-color: #94a3b8;

  color: #111827;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/*tamanho dos cards */ 
.dashboard-card {
  color: white;
  border-radius: 20px;
  padding: 12px 14px;
  min-height: 88px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.dashboard-card h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.dashboard-card strong {
  font-size: 34px;
  line-height: 1;
}

.dashboard-card p {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.blue-card {
  background: #2563eb;
}

.purple-card {
  background: #7c3aed;
}

.orange-card {
  background: #f97316;
}

.calendar-card {
  min-height: auto;
}


#calendar {
  background: white;
  border-radius: 18px;
  padding: 12px;
}

.four-cards {
  grid-template-columns: repeat(4, 1fr);
}

.green-card {
  background: #16a34a;
}

.consultorio-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
}

.calendar-legend {
  margin-top: 16px;

  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

.legend-dot {
  width: 12px;
  height: 12px;

  display: inline-block;

  border-radius: 50%;
}

.confirmed {
  background: #16a34a;
}

.waiting {
  background: #f59e0b;
}

.canceled {
  background: #dc2626;
}

.unavailable {
  background: #64748b;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reminders-card,
.stats-card {
  min-height: 220px;
}

.reminders-list {
  margin-top: 18px;
  padding-left: 18px;
  color: #475569;
}

.reminders-list li {
  margin-bottom: 12px;
}

.stats-row {
  display: flex;
  justify-content: space-between;

  padding: 14px 0;

  border-bottom: 1px solid #e5e7eb;
}

.stats-row span {
  color: #475569;
}

.stats-row strong {
  color: #111827;
}



.topbar {
  border-bottom: 1px solid #e5e7eb;

  padding-bottom: 18px;

  margin-bottom: 28px;
}

.fc .fc-toolbar-title {
  font-size: 20px;
}

.fc .fc-button {
  padding: 5px 8px;
  font-size: 12px;
}

.fc .fc-daygrid-day-frame {
  min-height: 62px;
}

.fc .fc-daygrid-day-number {
  font-size: 12px;
  padding: 4px;
}

.fc .fc-event {
  font-size: 11px;
  padding: 1px 4px;
}

/* RESPONSIVO tablet ---------------------------------------------------------------*/
@media (min-width: 769px) and (max-width: 1000px) {
  body {
    display: block;
  }

  .sidebar {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
  }

  .logo {
    margin-bottom: 18px;
  }

  nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  nav a {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 14px;
  }

  .user-box {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 16px;
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding: 20px;
    overflow-x: hidden;
  }

  .patient-card,
  .grid {
    grid-template-columns: 1fr;
  }
  .desktop-visao-geral,
.desktop-sessoes {
  display: none;
}

.mobile-visao-geral.hidden,
.mobile-sessoes.hidden {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-actions {
  display: none;
}

.mobile-save-actions {
  display: block !important;
  margin-top: 18px;
}

.mobile-save-actions .primary-button {
  width: 100%;
}

.mobile-status-card,
.sessoes-metricas-mobile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-status-card .summary-box,
.sessoes-metricas-mobile .summary-box {
  border-left: none;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}

.patients-toolbar {
  flex-direction: column;
  align-items: stretch;
}

.patients-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}
}

/*Responsividade para mobile. -------------------------------------------------------------------*/ 
@media (max-width: 768px) {
  .primary-button,
.secondary-button,
.danger-button {
  padding: 10px 12px;
  font-size: 14px;
  min-height: 42px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header {
  display: flex;
  flex-direction: column;
}

.page-actions {
  display: none;
}

.mobile-save-actions {
  display: block !important;
  margin-top: 16px;
}
.mobile-save-actions .primary-button {
  width: 100%;
}

  .card,
.pacientes-card,
.dashboard-card,
.consultorio-layout,
.side-panel {
  max-width: 100%;
}
  .dashboard-card {
  width: 100%;
}
  .dashboard-cards,
  .four-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  }
  body {
    display: block;
  }

  .sidebar {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
  }

  nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  nav a {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 14px;
  }

  .user-box {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 16px;
  }

.main {
  margin-left: 0;
  width: 100%;
  padding: 16px;
  overflow-x: hidden;
}

  .patient-card,
  .grid {
    grid-template-columns: 1fr;
  }
  .side-panel {
  width: 100%;
  min-width: 0;
}

.reminders-card,
.stats-card {
  width: 100%;
  min-width: 0;
}


.stats-row {
  gap: 12px;
  flex-wrap: wrap;
}

.consultorio-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
  overflow-x: hidden;
}

.consultorio-layout > div {
  width: 100%;
}

.calendar-card,
.calendar-legend,
.reminders-card,
.stats-card {
  width: 100%;
}

.side-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.patients-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.search-wrapper {
  width: 100%;
}

.patients-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.patient-actions {
  justify-content: flex-start;
}

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

.sessions li {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sessions span {
  float: none;
  width: fit-content;
}

.session-details {
  width: 100%;
}

.session-notes {
  width: 100%;
  word-break: break-word;
}

.audio-recorder {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

audio {
  width: 100%;
}
.session-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.session-detail-actions button {
  flex: 1;
}

.card-header {
  align-items: stretch;
}

.session-detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.session-detail-actions button {
  flex: 1;
}
.card-header h2 {
  font-size: 22px;
  line-height: 1.2;
}
.desktop-visao-geral {
  display: none;
}

.mobile-visao-geral.hidden {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

.mobile-paciente-info .patient-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.mobile-status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-status-card .summary-box {
  border-left: none;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}
.desktop-sessoes {
  display: none;
}

.mobile-sessoes.hidden {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

.sessoes-metricas-mobile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sessoes-metricas-mobile .summary-box {
  border-left: none;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}
}