/* Odonto365 - Custom Styles */

:root {
  --primary: #1a6fc4;
  --primary-dark: #1558a0;
  --secondary: #17b4a0;
  --accent: #f0f7ff;
  --sidebar-width: 250px;
  --sidebar-bg: #0f2a4a;
  --sidebar-text: #c8d8ea;
  --sidebar-active: #1a6fc4;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f4f6fb;
  color: #2d3748;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .brand-name {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-brand .brand-tagline {
  color: var(--sidebar-text);
  font-size: 0.72rem;
  opacity: 0.7;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  padding: 0.5rem 1.25rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(200,216,234,0.45);
  font-weight: 600;
  margin-top: 0.5rem;
}

.sidebar-nav .nav-link {
  color: var(--sidebar-text);
  padding: 0.65rem 1.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  position: relative;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: #fff;
  background: rgba(26,111,196,0.35);
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--secondary);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: rgba(200,216,234,0.5);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a202c;
}

.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ===== CARDS ===== */
.stat-card {
  border: none;
  border-radius: 12px;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1a202c;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: #718096;
  font-weight: 500;
}

/* ===== TABLES ===== */
.table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
}

.table-card .table {
  margin-bottom: 0;
}

.table-card .table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
}

.table-card .table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
  font-size: 0.875rem;
}

.table-card .table tbody tr:last-child td {
  border-bottom: none;
}

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

/* ===== BADGES ===== */
.badge-status {
  padding: 0.3em 0.7em;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ===== FORMS ===== */
.form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 1.5rem;
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #718096;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,196,0.12);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ===== AVATAR ===== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 1.75rem;
}

/* ===== LANDING PAGE ===== */
.landing-hero {
  background: linear-gradient(135deg, #0f2a4a 0%, #1a6fc4 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(26,111,196,0.1);
  color: var(--primary);
  margin-bottom: 1rem;
}

.pricing-card {
  border: 2px solid var(--primary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26,111,196,0.2);
}

.pricing-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 2.5rem 2rem;
  text-align: center;
}

.pricing-price {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.pricing-period {
  font-size: 1rem;
  opacity: 0.85;
}

/* ===== SUBSCRIPTION BANNER ===== */
.trial-banner {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== PRINT ===== */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ===== AGENDA CALENDAR ===== */
.time-slot {
  border-left: 3px solid transparent;
  padding: 0.4rem 0.75rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.appointment-item {
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.4rem;
  border-left: 4px solid;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.15s;
}

.appointment-item:hover {
  transform: translateX(3px);
}

/* ===== TOAST / ALERTS ===== */
.alert {
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* ===== TOM SELECT – ajuste visual ===== */
.ts-wrapper.form-control {
  padding: 0;
  height: auto;
}
.ts-wrapper .ts-control {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  box-shadow: none;
  min-height: 38px;
}
.ts-wrapper.focus .ts-control {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,196,0.12);
}
.ts-dropdown {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  font-size: 0.875rem;
  z-index: 9999;
}
.ts-dropdown .option {
  padding: 0.55rem 0.85rem;
  color: #2d3748;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: #eff6ff;
  color: var(--primary);
}
.ts-dropdown .no-results {
  padding: 0.65rem 0.85rem;
  color: #718096;
  font-size: 0.82rem;
}
.ts-control input::placeholder {
  color: #adb5bd;
  font-size: 0.85rem;
}
