/* =========================================================
   AZCORE C3 — UX CONSISTENCY LAYER
   No sustituye app.css; complementa estándares globales.
   ========================================================= */

:root{
  --az-c3-radius:14px;
  --az-c3-border:#dfe7f0;
  --az-c3-soft:#f8fbff;
  --az-c3-text:#17314f;
  --az-c3-muted:#6b7b8f;
  --az-c3-focus:rgba(13,110,253,.22);
}

html{scroll-behavior:smooth}

body.app-body{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible{
  outline:3px solid var(--az-c3-focus)!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}

.btn{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.28rem;
}

.btn.btn-sm{min-height:34px}

.btn:disabled,
.btn.disabled{
  cursor:not-allowed;
  pointer-events:none;
}

.form-label,
.label-text{
  font-weight:700;
  color:#40546d;
}

.form-control,
.form-select{
  min-height:40px;
}

.form-control-sm,
.form-select-sm{
  min-height:34px;
}

.form-control::placeholder{
  color:#9aa8b8;
  opacity:1;
}

.table-responsive.az-c3-table-wrap{
  border:1px solid var(--az-c3-border);
  border-radius:var(--az-c3-radius);
  background:#fff;
  scrollbar-width:thin;
}

.table-responsive.az-c3-table-wrap > table{
  margin-bottom:0!important;
}

.table-responsive.az-c3-table-wrap thead th{
  background:#f8fbff;
  color:#52657c;
  font-size:.72rem;
  font-weight:850;
  letter-spacing:.015em;
  border-bottom-color:#dfe7f0;
}

.table-responsive.az-c3-table-wrap tbody tr{
  transition:background-color .12s ease;
}

@media (hover:hover){
  .table-responsive.az-c3-table-wrap tbody tr:hover{
    background:#fbfdff;
  }
}

td.az-c3-actions,
th.az-c3-actions{
  white-space:nowrap;
  text-align:right;
}

.az-c3-icon-only{
  min-width:36px;
  width:36px;
  padding-left:0!important;
  padding-right:0!important;
}

.az-c3-empty-row td{
  padding:2rem 1rem!important;
  text-align:center!important;
  color:var(--az-c3-muted)!important;
  background:#fbfdff!important;
}

.az-c3-filter-shell{
  border:1px solid var(--az-c3-border);
  border-radius:var(--az-c3-radius);
  background:#fff;
  padding:.8rem;
}

.az-c3-filter-shell .form-control,
.az-c3-filter-shell .form-select{
  background-color:#fff;
}

.az-c3-sticky-actions{
  position:sticky;
  bottom:0;
  z-index:15;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--az-c3-border);
  padding:.75rem;
}

.az-c3-required::after{
  content:" *";
  color:#b42318;
}

.alert[role="alert"]{
  border-radius:12px;
}

.az-pagination{
  gap:.7rem!important;
}

.az-pagination-summary{
  color:#65758a!important;
}

.az-page-context{
  border-bottom:1px solid #e9eef4;
  padding-bottom:.8rem;
}

.az-page-context-actions .btn{
  white-space:nowrap;
}

.az-c3-global-back{
  flex:0 0 auto;
}

@media(max-width:991.98px){
  .az-c3-global-back{
    display:none!important;
  }

  .table-responsive.az-c3-table-wrap{
    border-radius:12px;
  }
}

@media(max-width:767.98px){
  .card-panel,
  .card{
    border-radius:13px;
  }

  .az-page-context{
    padding-bottom:.65rem;
  }

  .az-page-context-actions{
    width:100%;
  }

  .az-page-context-actions .btn:not(.az-page-context-back){
    flex:1 1 auto;
  }

  .erp-mobile-table tbody tr{
    border:1px solid var(--az-c3-border)!important;
    border-radius:12px!important;
    background:#fff!important;
    margin-bottom:.65rem!important;
    overflow:hidden;
  }

  .erp-mobile-table tbody td{
    min-height:38px;
  }

  .erp-mobile-table tbody td[data-label]::before{
    color:#607188;
    font-weight:800;
  }
}

@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
