.hover-scale {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.hover-scale:hover {
  transform: scale(1.05);
  z-index: 10;
}

.zoom-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-in;
}

.zoom-image {
  transition: transform 0.1s ease-out;
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
}

.zoom-container:hover .zoom-image {
  transform: scale(2.5);
  cursor: crosshair;
}

/* ===================================================
   PROFESSIONAL SIDEBAR STYLES
   =================================================== */

/* --- Drawer Container --- */
.mud-drawer {
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  font-family: 'Inter', 'Roboto', sans-serif !important;
}

.mud-drawer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --- Brand Header Area --- */
.sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FCA311 0%, #e8920a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(252, 163, 17, 0.3);
}

.sidebar-brand .brand-text {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.sidebar-brand .brand-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- Navigation Menu Container --- */
.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px 16px;
}

/* --- Custom Scrollbar --- */
.sidebar-nav-container::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Nav Links Base --- */
.mud-drawer .mud-nav-link {
  border-radius: 8px !important;
  margin: 2px 0;
  padding: 10px 12px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.15px;
}

.mud-drawer .mud-nav-link .mud-nav-link-icon {
  color: rgba(255, 255, 255, 0.45) !important;
  transition: color 0.2s ease !important;
  font-size: 20px !important;
}

/* --- Active State with Golden Accent --- */
.mud-drawer .mud-nav-link.active {
  background: linear-gradient(90deg, rgba(252, 163, 17, 0.15) 0%, rgba(252, 163, 17, 0.05) 100%) !important;
  color: #FCA311 !important;
  font-weight: 600 !important;
}

.mud-drawer .mud-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #FCA311;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(252, 163, 17, 0.4);
}

.mud-drawer .mud-nav-link.active .mud-nav-link-icon {
  color: #FCA311 !important;
}

/* --- Hover State --- */
.mud-drawer .mud-nav-link:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.mud-drawer .mud-nav-link:hover:not(.active) .mud-nav-link-icon {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* --- Nav Group Titles (Section Labels) --- */
.mud-drawer .mud-nav-group .mud-nav-link {
  font-size: 13.5px !important;
}

.mud-drawer .mud-nav-group .mud-collapse-wrapper .mud-nav-link {
  padding-left: 20px !important;
  font-size: 13px !important;
}

/* --- Group Expand/Collapse Icon --- */
.mud-drawer .mud-nav-group .mud-nav-link .mud-nav-link-icon {
  font-size: 20px !important;
}

/* --- Section Dividers --- */
.sidebar-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 8px 12px;
}

/* --- Section Labels --- */
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.3);
  padding: 12px 12px 4px;
  user-select: none;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  letter-spacing: 0.3px;
}

/* --- MudBlazor Drawer Border Override --- */
.mud-drawer .mud-navmenu.mud-navmenu-bordered .mud-nav-link.active:not(.mud-nav-link-disabled) {
  border-color: #FCA311 !important;
}

/* --- Extracted from Cards.razor --- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.transition-quick {
  transition: all 0.2s ease-in-out;
}
.hover-elevation:hover {
  transform: translateY(-4px);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15) !important;
}

/* --- Extracted from ReceiptDialog.razor --- */
.receipt-box {
  width: 80mm;
  margin: 0 auto;
  padding: 4mm;
  background-color: white;
  font-family: "Courier New", Courier, monospace;
  color: black;
  border: 1px solid #ccc;
}

.receipt-title {
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.receipt-info {
  font-size: 11px;
  text-align: center;
  line-height: 1.1;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.total-row {
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 5px;
}

.dashed-divider {
  border-style: dashed !important;
  border-color: black !important;
}

/* --- Extracted from Labels.razor --- */
@media print {
  @page {
    size: auto;
    margin: 0mm;
  }
  body {
    background-color: white;
  }
  .d-print-none {
    display: none !important;
  }
  .d-print-block {
    display: block !important;
  }
  .print-area {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
  }
  .label-container {
    width: 50mm;
    height: 30mm;
    border: 1px dashed #ccc; /* Border helps for cutting, usually printers have continuous paper */
    margin: 2mm;
    padding: 2mm;
    display: flex; /* Flexbox for layout inside label */
    align-items: center;
    page-break-inside: avoid;
    box-sizing: border-box;
  }
  .qr-code {
    width: 40%;
    text-align: center;
  }
  .info {
    width: 60%;
    padding-left: 5px;
    font-family: monospace;
    font-size: 10px;
    overflow: hidden;
  }
  .sku {
    font-weight: bold;
    font-size: 12px;
  }
  .name {
    font-size: 9px;
    max-height: 2.4em;
    overflow: hidden;
  }
}

/* ============================================================
   UC030 - Rich Text Editor (Quill) - Estilos customizados
   ============================================================ */

.rich-text-editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.rich-text-editor-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(0,0,0,0.6);
    padding: 0 2px;
    margin-bottom: 2px;
}

.rich-text-editor-label--error {
    color: var(--mud-palette-error);
}

.rich-text-editor-container {
    min-height: 320px;
    border-radius: 4px;
    font-size: 14px;
}

.rich-text-editor--error .ql-toolbar,
.rich-text-editor--error .ql-container {
    border-color: var(--mud-palette-error) !important;
}

.ql-toolbar.ql-snow {
    border-radius: 4px 4px 0 0;
    background-color: #f5f5f5;
    border-color: rgba(0,0,0,0.23) !important;
}

.ql-container.ql-snow {
    border-radius: 0 0 4px 4px;
    border-color: rgba(0,0,0,0.23) !important;
    min-height: 280px;
}

.ql-editor {
    min-height: 280px;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Inter', 'Roboto', sans-serif;
}

.ql-editor p {
    margin-bottom: 6px;
}

.rich-text-editor-helper-text {
    font-size: 0.75rem;
    padding: 0 12px;
    color: rgba(0,0,0,0.6);
}

.rich-text-editor-helper-text--error {
    color: var(--mud-palette-error);
}

/* Preview do termo no contrato e modal */
.rich-text-editor-preview {
    padding: 8px;
}

.rich-text-editor-preview p,
.termo-legal p {
    margin-bottom: 8px;
}

/* Preview A4 no modal */
.termo-preview-a4 {
    background: white;
    padding: 2cm;
    min-height: 297mm;
    max-width: 210mm;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
}

.termo-preview-a4 h1 { font-size: 16pt; margin-bottom: 12px; }
.termo-preview-a4 h2 { font-size: 14pt; margin-bottom: 10px; }
.termo-preview-a4 h3 { font-size: 12pt; margin-bottom: 8px; }
.termo-preview-a4 p  { margin-bottom: 8px; }
.termo-preview-a4 ul, .termo-preview-a4 ol { padding-left: 24px; margin-bottom: 8px; }
