/**
 * TricoClinic - Core CSS
 * Estilos base para todo o sistema
 */

/* Reset e Variáveis Globais */
:root {
  /* Cores padrão do sistema */
  --white: #ffffff;
  --light-bg: #f8f8f8;
  --dark: #464952;
  --gray-light: #e0e0e0;
  --gray: #cccccc;
  --gray-dark: #999999;
  --error: #ff5555;
  --success: #55cc77;
  --warning: #ffbb44;
  --info: #44aaff;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* Arredondamentos */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;
  
  /* Espaçamentos */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 15px;
  --space-lg: 20px;
  --space-xl: 30px;
}

/* Tipografia */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark);
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 24px;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 18px;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout Principal */
.wrapper {
  display: flex;
  min-height: 100vh;
}

.plus-btn{
  background: none;
  color: var(--primary);
  padding: 0px;
  border: none;
  cursor: pointer;
}
/* Sidebar com opção de colapso e animação melhorada */
.sidebar {
  width: 240px;
  background-color: var(--dark);
  color: var(--white);
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-logo {
  padding: var(--space-md);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.sidebar-logo img {
  max-height: 60px;
  max-width: 100%;
  transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
  padding: var(--space-sm);
  height: 60px;
}

.sidebar-logo img.logo-grande {
  opacity: 1;
  display: block;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-logo img.logo-grande {
  opacity: 0;
  display: none;
}

.sidebar-logo img.logo-pequena {
  position: absolute;
  opacity: 0;
  display: block;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed .sidebar-logo img.logo-pequena {
  opacity: 1;
  transform: scale(1);
  padding: 15px;
}

.sidebar-menu {
  padding: var(--space-md) 0;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 2px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  color: var(--primary);
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background-color: rgba(255,255,255,0.1);
  text-decoration: none;
}

.sidebar-menu i {
  margin-right: var(--space-md);
  width: 24px;
  font-size: 20px;
  text-align: center;
  transition: margin 0.3s ease;
}

.sidebar-menu span {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-menu span {
  opacity: 0;
  width: 0;
  display: none;
}

.sidebar.collapsed .sidebar-menu i {
  margin-right: 0;
}

.sidebar.collapsed .sidebar-menu a {
  padding: var(--space-md) var(--space-sm);
  justify-content: center;
}

.sidebar-footer {
  position: absolute;
  bottom: 60px;
  width: 100%;
  padding: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-footer {
  opacity: 0;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--white);
  position: absolute;
  bottom: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
  opacity: 0.7;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
}

.sidebar.collapsed .sidebar-toggle {
  right: 20px;
  transform: rotate(180deg);
}

.sidebar-toggle:hover {
  opacity: 1;
  background-color: rgba(255,255,255,0.2);
}

.main-content {
  flex-grow: 1;
  margin-left: 240px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content.expanded {
  margin-left: 70px;
}

header {
  height: 60px;
  background-color: var(--white);
  /* border-bottom: 1px solid var(--gray-light); */
  display: flex
;
  align-items: center;
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 99;
  /* box-shadow: var(--shadow-sm); */
  justify-content: flex-end;
}

/* PADRÃO DA ÁREA DE CONTEÚDO */

.header-title {
  flex-grow: 1;
  margin-top: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
}

.header-actions > * {
  margin-left: var(--space-md);
}

.header-acoes{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.header-filters{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.container {
  flex-grow: 1;
  margin: 0 auto;
  padding: var(--space-xl);
  background-color: var(--light-bg);
  margin: 15px;
  border-radius: 15px;
}

.container-fluid {
  width: 100%;
  padding: var(--space-xl);
}

footer {
  background-color: var(--light-bg);
  padding: var(--space-md);
  text-align: center;
  font-size: 12px;
  color: var(--gray-dark);
  /* border-top: 1px solid var(--gray-light); */
  margin: 15px 15px 0px 15px;
  border-radius: 15px 15px 0px 0px;
}

/* Componentes UI */
.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.card-header {
  padding: var(--space-md);
  /* border-bottom: 1px solid var(--gray-light); */
  /* background-color: var(--light-bg); */
  font-weight: 500;
  display: flex;
  flex-direction: row;
  align-content: center;
}
.subhead{
  background-color: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}
.subhead h3{
  margin: 0;
}
.content{
  background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}
.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--gray-light);
  background-color: var(--light-bg);
}

/* Formulários */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: var(--radius-sm);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: var(--dark);
}

.form-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--gray-dark);
}

/* Botões */
.btn {
  display: inline-block;
  padding: 8px 15px;
  border: none;
  border-radius: var(--radius-sm);
  background-color: var(--dark);
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-with-icon i {
  margin-right: 5px;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn:focus {
  outline: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 16px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Botões de ícone para o cabeçalho */
.btn-icon {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--dark);
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  background-color: rgba(0,0,0,0.05);
}

.btn-icon i {
  margin-right: 5px;
}

/* Tabelas */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.table th {
  background-color: var(--light-bg);
  font-weight: 500;
}

.table tr:hover {
  background-color: rgba(0,0,0,0.01);
}

/* Alertas */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

.alert-success {
  background-color: rgba(85, 204, 119, 0.1);
  border-left: 4px solid var(--success);
  color: var(--success);
}

.alert-danger {
  background-color: rgba(255, 85, 85, 0.1);
  border-left: 4px solid var(--error);
  color: var(--error);
}

.alert-warning {
  background-color: rgba(255, 187, 68, 0.1);
  border-left: 4px solid var(--warning);
  color: var(--warning);
}

.alert-info {
  background-color: rgba(68, 170, 255, 0.1);
  border-left: 4px solid var(--info);
  color: var(--info);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
}

.badge-success {
  background-color: var(--success);
  color: white;
}

.badge-danger {
  background-color: var(--error);
  color: white;
}

.badge-warning {
  background-color: var(--warning);
  color: white;
}

.badge-info {
  background-color: var(--info);
  color: white;
}

.notification-count {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 50%;
  background-color: var(--error);
  color: white;
  transform: translate(-10px, 10px);
}

/* Layout helpers */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-bold {
  font-weight: 500;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.align-center {
  align-items: center;
}

.w-100 {
  width: 100%;
}

/* Modais */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: all 0.3s;
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-dark);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--gray-light);
  display: flex;
  justify-content: flex-end;
}

.modal-footer button {
  margin-left: var(--space-sm);
}

/* Loader */
.loader {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--dark);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
}

/* Sistema de notificações */
.notification-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notification {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  width: 100%;
  display: flex;
  align-items: center;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

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

.notification-icon {
  margin-right: var(--space-md);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-content {
  flex-grow: 1;
}

.notification-title {
  font-weight: 500;
  margin-bottom: 3px;
}

.notification-message {
  color: var(--gray-dark);
  font-size: 13px;
}

.notification-close {
  background: none;
  border: none;
  color: var(--gray-dark);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-left: var(--space-sm);
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-success .notification-icon {
  color: var(--success);
}

.notification-error {
  border-left: 4px solid var(--error);
}

.notification-error .notification-icon {
  color: var(--error);
}

.notification-warning {
  border-left: 4px solid var(--warning);
}

.notification-warning .notification-icon {
  color: var(--warning);
}

.notification-info {
  border-left: 4px solid var(--info);
}

.notification-info .notification-icon {
  color: var(--info);
}

/* Login específico */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--light-bg);
}

.login-box {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  padding: var(--space-xl);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-form .form-group {
  margin-bottom: var(--space-lg);
}

.login-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 13px;
  color: var(--gray-dark);
}

/* Sistema de grid simples */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}
.col-md-3 {
  flex: 0 0 calc(33.333% - 30px);
  max-width: calc(33.333% - 30px);
  padding: 0 15px;
}

.col-md-4 {
  flex: 0 0 calc(33.333% - 30px);
  max-width: calc(33.333% - 30px);
  padding: 0 15px;
}

.col-md-6 {
  flex: 0 0 calc(50% - 30px);
  max-width: calc(50% - 30px);
  padding: 0 15px;
}

.col-md-8 {
  flex: 0 0 calc(66.667% - 30px);
  max-width: calc(66.667% - 30px);
  padding: 0 15px;
}

.col-md-12 {
  flex: 0 0 calc(50% - 30px);
  max-width: calc(50% - 30px);
  padding: 0 15px;
}

/* Menu toggle para mobile */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark);
  font-size: 24px;
  cursor: pointer;
  margin-right: var(--space-md);
}
.pagination-info,
.pagination-controls {
  text-align: center;
  margin: 5px;
}
span#pagination-current {
  margin: 15px;

}
/* Overlay para quando o menu mobile está aberto */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* Arquivo: assets/css/core.css (adição) */

/* Dropdown Menu Styles */
.user-dropdown {
  position: relative;
}

.user-dropdown button {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 1000;
  margin-top: 5px;
  display: none;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.3s ease;
  z-index: 9999 !important;
}
.dropdown-menu.show + .dropdown-backdrop,
.dropdown-menu.show ~ .dropdown-backdrop {
  display: none !important;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  color: var(--dark);
  transition: background-color 0.2s;
}

.dropdown-menu a:hover {
  background-color: var(--light-bg);
  text-decoration: none;
}

.dropdown-menu i {
  margin-right: var(--space-sm);
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--gray-light);
  margin: 5px 0;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Click outside area to close dropdown */
.dropdown-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 990;
  display: none;
}

.dropdown-backdrop.show {
  display: block;
}

.logout-link {
  color: var(--error) !important;
  font-weight: 500;
}

.logout-link:hover {
  background-color: rgba(255, 85, 85, 0.1) !important;
}

/* Garantir que os links do dropdown sejam clicáveis */
.dropdown-item {
  display: flex !important;
  align-items: center !important;
  padding: 10px 15px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  user-select: none !important;
}

.dropdown-item:active {
  background-color: rgba(0,0,0,0.05) !important;
}
/* Responsividade */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: 240px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .sidebar.collapsed {
    transform: translateX(-100%);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .main-content.expanded {
    margin-left: 0;
  }
  
  .container {
    padding: var(--space-md);
  }
  
  .col-md-4, .col-md-6 {
    flex: 0 0 calc(100% - 30px);
    max-width: calc(100% - 30px);
  }
  
  /* Ajustes para o header em mobile */
  header {
    padding: 0 var(--space-sm);
  }
  
  .header-title h1 {
    font-size: 20px;
  }
  
  .header-actions .btn-icon span {
    display: none;
  }
}




/* Estilos para Submenu Sanfonado (Acordeão) */
.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: rgba(0,0,0,0.1); /* Fundo ligeiramente diferente para destaque */
}

.has-submenu.active > .sidebar-submenu {
  max-height: 500px; /* Altura máxima estimada, ajuste se necessário */
  transition: max-height 0.3s ease-in;
}

.sidebar-submenu ul {
  padding: 10px 0; /* Espaçamento interno do submenu */
  list-style: none; /* Remover marcadores se houver */
  margin: 0; /* Remover margens padrão */
}

.sidebar-submenu li {
  margin-bottom: 0; /* Remover margem inferior dos itens do submenu */
}

.sidebar-submenu a {
  padding: 8px 15px 8px 40px; /* Ajustar padding para indentação */
  font-size: 13px; /* Fonte ligeiramente menor */
  display: flex; /* Garantir alinhamento */
  align-items: center; /* Alinhar ícone e texto */
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
  background-color: rgba(255,255,255,0.15); /* Cor de hover/ativo ligeiramente diferente */
  text-decoration: none;
}

.sidebar-submenu i {
  margin-right: 10px; /* Espaço entre ícone e texto no submenu */
  font-size: 18px; /* Tamanho do ícone no submenu */
}

/* Ajuste para quando o sidebar está colapsado */
.sidebar.collapsed .has-submenu.active > .sidebar-submenu {
  max-height: 0; /* Garantir que o submenu feche quando o sidebar colapsar */
}

