:root {
  --do-orange: #d97706;
  --do-orange-light: #fbbf24;
  --do-orange-hover: #b45309;
  --do-dark: #1a1a2e;
  --do-gray: #f7f7f9;
}

body { font-family: Arial, Helvetica, sans-serif; }

/* ===== LOGIN ===== */
.body-login {
  background: #fff;
}
.login-wrapper {
  display: flex;
  min-height: 100vh;
}
.login-panel-left {
  flex: 1;
  background: linear-gradient(135deg, var(--do-dark) 0%, #2a2a42 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.login-panel-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(217,119,6,.08);
  border-radius: 50%;
}
.login-panel-left::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(251,191,36,.06);
  border-radius: 50%;
}
.login-panel-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  color: #fff;
}
.login-icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}
.login-icon-item {
  width: 70px;
  height: 70px;
  background: rgba(217,119,6,.15);
  border: 1px solid rgba(217,119,6,.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--do-orange-light);
  transition: transform .3s, background .3s;
}
.login-icon-item:hover {
  transform: scale(1.1);
  background: rgba(217,119,6,.25);
}
.login-panel-titulo {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}
.login-panel-desc {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 24px;
  line-height: 1.6;
}
.login-panel-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .85rem;
  color: rgba(255,255,255,.75);
}
.login-panel-features i {
  color: var(--do-orange-light);
}

.login-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
}
.login-form-container {
  width: 100%;
  max-width: 380px;
}
.login-logo-img {
  height: 80px;
  width: auto;
}
.card-login {
  border-radius: 14px;
  border-top: 4px solid var(--do-orange);
}

@media (max-width: 767.98px) {
  .login-wrapper { flex-direction: column; }
  .login-panel-left { padding: 30px 20px; min-height: auto; }
  .login-icons-grid { gap: 10px; margin-bottom: 20px; }
  .login-icon-item { width: 55px; height: 55px; font-size: 1.3rem; }
  .login-panel-titulo { font-size: 1.2rem; }
  .login-panel-right { padding: 30px 20px; }
}

/* ===== APP LAYOUT ===== */
.body-app { background: var(--do-gray); }
.app-layout { min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--do-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1050;
}
.sidebar-brand {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo-img {
  height: 45px;
  width: auto;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .82rem;
  margin-bottom: 8px;
  padding: 0 8px;
}

.btn-menu {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  color: rgba(255,255,255,.8);
  background: transparent;
  border: none;
  border-radius: 8px;
  text-align: left;
  font-size: .9rem;
  transition: all .2s;
}
.btn-menu:hover, .btn-menu:focus {
  background: var(--do-orange);
  color: #fff;
}
.btn-salir { color: rgba(255,255,255,.5); }
.btn-salir:hover { background: #333; color: #fff; }
.sidebar-divider { border-color: rgba(255,255,255,.1); margin: 6px 0; }
.sidebar-section-label {
  display: block;
  color: rgba(255,255,255,.4);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 14px 2px;
}
.btn-besimplit {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
}
.btn-besimplit:hover {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
}
.besimplit-icon {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ===== MAIN ===== */
.main-content { padding: 0 30px; overflow-x: hidden; }

.welcome-banner {
  background: linear-gradient(90deg, var(--do-orange), var(--do-orange-light));
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.welcome-text { font-size: 1.05rem; }
.welcome-date { font-size: .85rem; opacity: .85; }

/* ===== SIDEBAR TOGGLE ===== */
.sidebar-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1060;
  background: var(--do-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.sidebar-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.3rem;
  padding: 0;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    transition: left .3s;
  }
  .sidebar-open .sidebar { left: 0; }
  .sidebar-open .sidebar-overlay { display: block; }
  .main-content { padding: 60px 16px 16px; }
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn-danger {
  background-color: var(--do-orange) !important;
  border-color: var(--do-orange) !important;
}
.btn-danger:hover, .btn-danger:focus {
  background-color: var(--do-orange-hover) !important;
  border-color: var(--do-orange-hover) !important;
}
.btn-outline-danger {
  color: var(--do-orange) !important;
  border-color: var(--do-orange) !important;
}
.btn-outline-danger:hover, .btn-outline-danger:focus {
  background-color: var(--do-orange) !important;
  border-color: var(--do-orange) !important;
  color: #fff !important;
}
.bg-danger {
  background-color: var(--do-orange) !important;
}
.text-danger {
  color: var(--do-orange) !important;
}
.badge.bg-danger {
  background-color: var(--do-orange) !important;
}
.table-danger > td, .table-danger > th, .table-danger {
  background-color: #fef3c7 !important;
}

/* ===== OC PRINT ===== */
.oc-print-page {
  max-width: 800px;
  margin: 24px auto;
  background: #fff;
  padding: 30px 40px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #ddd;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.oc-empresa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--do-orange);
  padding-bottom: 12px;
}
.oc-empresa-left { display: flex; gap: 16px; align-items: center; }
.oc-logo {
  padding: 4px;
}
.oc-logo img {
  height: 50px;
  width: auto;
}
.oc-empresa-info {
  font-size: 11px;
  color: #333;
  line-height: 1.6;
}
.oc-titulo-bloque { text-align: right; }
.oc-subtitulo-oc {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: var(--do-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 4px;
}
.oc-numero-grande {
  font-size: 22px;
  font-weight: 900;
  color: var(--do-dark);
}
.oc-fecha-titulo {
  font-size: 11px;
  color: #555;
}

.oc-tabla-datos td { font-size: 11px; padding: 4px 8px; }
.td-label {
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  width: 15%;
  white-space: nowrap;
}

.oc-tabla-items { font-size: 11px; }
.oc-items-header th {
  background: var(--do-dark) !important;
  color: #fff !important;
  font-size: 10px;
  text-align: center;
  padding: 6px;
  white-space: nowrap;
}
.oc-tabla-items td { padding: 5px 8px; }
.oc-total-row td {
  background: #fef3c7;
  font-size: 13px;
}

.oc-footer-section {
  margin-top: 12px;
  display: flex;
  gap: 20px;
}
.oc-observaciones-footer { flex: 1; }
.oc-firma-linea {
  border-bottom: 1px solid #333;
  width: 200px;
  margin: 30px 0 6px;
}
.oc-firma-datos { font-size: 10px; line-height: 1.6; }

.oc-nota {
  text-align: center;
  background: #fef3c7;
  padding: 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: #92400e;
  border: 1px solid #fbbf24;
}
.oc-disclaimer {
  font-size: 10px;
  color: #555;
  line-height: 1.6;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
}
.oc-confirmacion {
  font-size: 10px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
}

/* ===== COTIZACION PRINT ===== */
.cot-print-page {
  max-width: 800px;
  margin: 24px auto;
  background: #fff;
  padding: 30px 40px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #ddd;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.cot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--do-orange);
}
.cot-header-left { display: flex; gap: 14px; align-items: center; }
.cot-logo-img { height: 55px; width: auto; }
.cot-empresa-datos { font-size: 11px; color: #333; line-height: 1.5; }
.cot-header-right { text-align: right; }
.cot-titulo-badge {
  display: inline-block;
  background: var(--do-orange);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 18px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.cot-info-table { font-size: 11px; }
.cot-info-table td { padding: 1px 0; }
.cot-info-label { font-weight: 700; color: #92400e; padding-right: 12px; }
.cot-info-value { font-weight: 600; }

.cot-seccion { margin-bottom: 10px; }
.cot-seccion-titulo {
  background: var(--do-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 1px;
}
.cot-tabla-cliente td { font-size: 11px; padding: 3px 8px; }
.cot-td-label { font-weight: 700; width: 12%; background: #fef3c7; color: #92400e; white-space: nowrap; }

.cot-tabla-items { font-size: 11px; margin-bottom: 0 !important; }
.cot-items-header th {
  background: var(--do-dark) !important;
  color: #fff !important;
  font-size: 10px;
  text-align: center;
  padding: 5px 6px;
  white-space: nowrap;
}
.cot-tabla-items td { padding: 5px 8px; }
.cot-detalle-texto {
  font-size: 10px;
  color: #555;
  margin-top: 3px;
  padding-left: 8px;
  border-left: 2px solid var(--do-orange);
  line-height: 1.4;
}

.cot-adicionales {
  font-size: 10px;
  border: 1px solid #ddd;
  padding: 6px 10px;
  margin-top: 6px;
  border-radius: 4px;
}

.cot-totales {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.cot-totales-tabla {
  font-size: 12px;
  min-width: 280px;
}
.cot-totales-tabla td { padding: 3px 10px; }
.cot-total-final {
  background: #fef3c7;
  font-weight: 900;
  font-size: 14px;
}

.cot-contacto {
  margin-top: 12px;
  font-size: 11px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.cot-condiciones {
  margin-top: 8px;
  font-size: 10px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.cot-pago {
  margin-top: 8px;
  font-size: 10px;
  padding: 6px 10px;
  background: #fef3c7;
  border-radius: 4px;
  color: #92400e;
}
.cot-condiciones-titulo {
  text-align: center;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
}

.no-print {}

/* ===== PRINT ===== */
@media print {
  @page {
    size: letter;
    margin: 0;
  }
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .no-print, .sidebar, .sidebar-toggle, .sidebar-overlay, footer, .alert { display: none !important; }
  .oc-print-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 5mm 8mm !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
  }
  .oc-empresa-header {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    border-bottom-color: #d97706 !important;
  }
  .oc-empresa-header {
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    border-bottom-color: #d97706 !important;
  }
  .oc-empresa-info { font-size: 11px !important; line-height: 1.5 !important; }
  .oc-logo img { height: 55px !important; }
  .oc-subtitulo-oc {
    font-size: 13px !important;
    padding: 3px 12px !important;
    margin-top: 4px !important;
    background: #d97706 !important;
    color: #fff !important;
  }
  .oc-numero-grande { font-size: 22px !important; }
  .oc-fecha-titulo { font-size: 11px !important; }
  .oc-tabla-datos td { font-size: 11px !important; padding: 4px 6px !important; }
  .td-label { background: #fef3c7 !important; color: #92400e !important; }
  .oc-tabla-items { font-size: 11px !important; }
  .oc-items-header th {
    background: #1a1a2e !important;
    color: #fff !important;
    font-size: 10px !important;
    padding: 5px 6px !important;
  }
  .oc-tabla-items td { padding: 4px 6px !important; }
  .oc-total-row td { background: #fef3c7 !important; font-size: 13px !important; }
  .table { margin-bottom: 4px !important; }
  .oc-footer-section { margin-top: 8px !important; }
  .oc-firma-linea { margin: 18px 0 4px !important; }
  .oc-firma-datos { font-size: 10px !important; }
  .oc-nota {
    padding: 6px !important;
    font-size: 10px !important;
    margin-top: 6px !important;
    background: #fef3c7 !important;
  }
  .oc-disclaimer {
    font-size: 10px !important;
    padding: 8px !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
  }
  .oc-confirmacion {
    font-size: 10px !important;
    padding: 8px !important;
    margin-top: 8px !important;
  }
  .oc-confirmacion .table td { padding: 3px 6px !important; }

  /* Cotizacion print */
  .cot-print-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 5mm 8mm !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
  }
  .cot-header { border-bottom-color: #d97706 !important; margin-bottom: 10px !important; padding-bottom: 8px !important; }
  .cot-logo-img { height: 50px !important; }
  .cot-titulo-badge { background: #d97706 !important; color: #fff !important; }
  .cot-seccion-titulo { background: #1a1a2e !important; color: #fff !important; }
  .cot-td-label { background: #fef3c7 !important; color: #92400e !important; }
  .cot-items-header th { background: #1a1a2e !important; color: #fff !important; }
  .cot-total-final { background: #fef3c7 !important; }
  .cot-pago { background: #fef3c7 !important; }
  .cot-detalle-texto { border-left-color: #d97706 !important; }
}
