/*! bootstrap-custom.css — Minimal Bootstrap 5.2 replacement for Aitronix */

/* ==========================================================================
   1. MINIMAL RESET / REBOOT
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.25;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 2rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: #0d6efd;
  text-decoration: underline;
}

a:hover {
  color: #0a58ca;
}

img, svg {
  vertical-align: middle;
}

button {
  border-radius: 0;
}

button, input, optgroup, select, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
}

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

/* ==========================================================================
   2. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  --bs-blue: #0d6efd;
  --bs-red: #dc3545;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-cyan: #0dcaf0;
  --bs-white: #fff;
  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-primary: #0d6efd;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
  --bs-border-width: 1px;
  --bs-border-color: #dee2e6;
  --bs-border-radius: 0.375rem;
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
}

/* ==========================================================================
   3. GRID SYSTEM
   ========================================================================== */

.container,
.container-fluid,
.container-xl {
  width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: auto;
  margin-left: auto;
}

/* Container max-widths */
@media (min-width: 576px) {
  .container, .container-xl { max-width: 540px; }
}
@media (min-width: 768px) {
  .container, .container-xl { max-width: 720px; }
}
@media (min-width: 992px) {
  .container, .container-xl { max-width: 960px; }
}
@media (min-width: 1200px) {
  .container, .container-xl { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
  .container-xl { max-width: 1320px; }
}

/* Row */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--bs-gutter-y));
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
}

/* Gutters */
.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}
.g-4 {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}
.gy-4 {
  --bs-gutter-y: 1.5rem;
}
.gy-5 {
  --bs-gutter-y: 3rem;
}

/* Base column (default: full width) */
.col-12 { flex: 0 0 auto; width: 100%; }

/* md breakpoint columns */
@media (min-width: 768px) {
  .col-md-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6  { flex: 0 0 auto; width: 50%; }
  .col-md-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* lg breakpoint columns */
@media (min-width: 992px) {
  .col-lg-2  { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5  { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6  { flex: 0 0 auto; width: 50%; }
  .col-lg-7  { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }

  .offset-lg-0 { margin-left: 0; }
  .order-lg-1  { order: 1; }
}

/* xl breakpoint columns */
@media (min-width: 1200px) {
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }

  .offset-xl-1 { margin-left: 8.333333%; }
}

/* ==========================================================================
   4. DISPLAY UTILITIES
   ========================================================================== */

.d-flex        { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-none        { display: none !important; }

/* ==========================================================================
   5. FLEXBOX UTILITIES
   ========================================================================== */

.flex-column             { flex-direction: column !important; }
.flex-wrap               { flex-wrap: wrap !important; }
.align-items-center      { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-start   { justify-content: flex-start !important; }

/* ==========================================================================
   6. SPACING UTILITIES
   Bootstrap 5 scale: 0=0, 1=0.25rem, 2=0.5rem, 3=1rem, 4=1.5rem, 5=3rem
   ========================================================================== */

/* --- Margin-bottom --- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

/* --- Margin-top --- */
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* --- Margin-x (horizontal) --- */
.mx-auto { margin-right: auto !important; margin-left: auto !important; }
.me-3    { margin-right: 1rem !important; }

/* --- Margin-y (vertical) --- */
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

/* --- Padding --- */
.p-4  { padding: 1.5rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-5 { padding-bottom: 3rem !important; }
.pe-5 { padding-right: 3rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 1.5rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-5 { padding-top: 3rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* --- Gap (for flex/grid containers) --- */
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* --- Responsive spacing --- */
@media (min-width: 768px) {
  .mb-md-0 { margin-bottom: 0 !important; }
  .mb-md-4 { margin-bottom: 1.5rem !important; }
  .mb-md-5 { margin-bottom: 3rem !important; }
  .mt-md-0 { margin-top: 0 !important; }
  .ps-md-4 { padding-left: 1.5rem !important; }
}

@media (min-width: 992px) {
  .mb-lg-0 { margin-bottom: 0 !important; }
}

/* ==========================================================================
   7. TYPOGRAPHY UTILITIES
   ========================================================================== */

.text-center          { text-align: center !important; }
.text-start           { text-align: left !important; }
.text-left            { text-align: left !important; }
.text-end             { text-align: right !important; }
.text-white           { color: #fff !important; }
.text-muted           { color: var(--bs-secondary) !important; }
.text-danger          { color: var(--bs-danger) !important; }
.text-dark            { color: var(--bs-dark) !important; }
.text-decoration-none { text-decoration: none !important; }

.fw-bold     { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fs-5        { font-size: 1.25rem !important; }
.fst-italic  { font-style: italic !important; }
.lead        { font-size: 1.25rem; font-weight: 300; }
.small, small { font-size: 0.875em; }

@media (min-width: 768px) {
  .text-md-start { text-align: left !important; }
}

/* ==========================================================================
   8. BORDER UTILITIES
   ========================================================================== */

.border-0     { border: 0 !important; }
.border-1     { border-width: 1px !important; }
.border-3     { border-width: 3px !important; }
.border-start { border-left: var(--bs-border-width) solid var(--bs-border-color) !important; }

.border-primary   { border-color: var(--bs-primary) !important; }
.border-secondary { border-color: var(--bs-secondary) !important; }

/* ==========================================================================
   9. SHADOW UTILITIES
   ========================================================================== */

.shadow    { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }

/* ==========================================================================
   10. OTHER UTILITIES
   ========================================================================== */

.rounded-4         { border-radius: 0.75rem !important; }
.position-relative { position: relative !important; }
.img-fluid         { max-width: 100%; height: auto; }
.h-100             { height: 100% !important; }

/* ==========================================================================
   11. BUTTON COMPONENT
   ========================================================================== */

.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: var(--bs-border-radius);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
  color: #212529;
}

.btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn:disabled, .btn.disabled {
  pointer-events: none;
  opacity: 0.65;
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: #000;
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e")
    center / 1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
  cursor: pointer;
}

.btn-close:hover {
  opacity: 0.75;
}

.btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  opacity: 1;
}

/* ==========================================================================
   12. FORM CONTROL
   ========================================================================== */

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: var(--bs-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  appearance: none;
}

.form-control:focus {
  color: #212529;
  background-color: #fff;
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
  color: #6c757d;
  opacity: 1;
}

.form-control:disabled {
  background-color: #e9ecef;
  opacity: 1;
}

/* ==========================================================================
   13. ALERT COMPONENT
   ========================================================================== */

.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
}

.alert-heading {
  color: inherit;
}

.alert-primary {
  color: #084298;
  background-color: #cfe2ff;
  border-color: #b6d4fe;
}

.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
}

.alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-dismissable,
.alert-dismissible {
  padding-right: 3rem;
}

.alert-dismissable .btn-close,
.alert-dismissible .btn-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 1.25rem 1rem;
}

/* ==========================================================================
   14. CARD COMPONENT
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: var(--bs-border-radius);
}

.card-header {
  padding: 0.5rem 1rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header:first-child {
  border-radius: calc(var(--bs-border-radius) - 1px) calc(var(--bs-border-radius) - 1px) 0 0;
}

.card-body {
  flex: 1 1 auto;
  padding: 1rem;
}

.card-title {
  margin-bottom: 0.5rem;
}

.card-text:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   15. ACCORDION COMPONENT
   ========================================================================== */

.accordion {
  --bs-accordion-color: #212529;
  --bs-accordion-bg: #fff;
  --bs-accordion-transition: color 0.15s ease-in-out,
    background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
  --bs-accordion-border-color: var(--bs-border-color);
  --bs-accordion-border-width: var(--bs-border-width);
  --bs-accordion-border-radius: var(--bs-border-radius);
  --bs-accordion-btn-padding-x: 1.25rem;
  --bs-accordion-btn-padding-y: 1rem;
  --bs-accordion-btn-color: #212529;
  --bs-accordion-btn-bg: var(--bs-accordion-bg);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  --bs-accordion-body-padding-x: 1.25rem;
  --bs-accordion-body-padding-y: 1rem;
  --bs-accordion-active-color: #0c63e4;
  --bs-accordion-active-bg: #e7f1ff;
}

.accordion-item {
  color: var(--bs-accordion-color);
  background-color: var(--bs-accordion-bg);
  border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
}

.accordion-item:first-of-type {
  border-top-left-radius: var(--bs-accordion-border-radius);
  border-top-right-radius: var(--bs-accordion-border-radius);
}

.accordion-item:last-of-type {
  border-bottom-left-radius: var(--bs-accordion-border-radius);
  border-bottom-right-radius: var(--bs-accordion-border-radius);
}

.accordion-item:not(:first-of-type) {
  border-top: 0;
}

.accordion-header {
  margin-bottom: 0;
}

.accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);
  font-size: 1rem;
  color: var(--bs-accordion-btn-color);
  text-align: left;
  background-color: var(--bs-accordion-btn-bg);
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  transition: var(--bs-accordion-transition);
  cursor: pointer;
}

.accordion-button:not(.collapsed) {
  color: var(--bs-accordion-active-color);
  background-color: var(--bs-accordion-active-bg);
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0
    var(--bs-accordion-border-color);
}

.accordion-button::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  content: "";
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: 1.25rem;
  transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

.accordion-button:focus {
  z-index: 3;
  outline: 0;
  box-shadow: var(--bs-accordion-btn-focus-box-shadow);
}

.accordion-item:first-of-type .accordion-button {
  border-top-left-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
  border-top-right-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
}

.accordion-item:last-of-type .accordion-button.collapsed {
  border-bottom-left-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
  border-bottom-right-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
}

.accordion-collapse {
  border: 0;
}

.accordion-body {
  padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x);
}

/* ==========================================================================
   16. COLLAPSE COMPONENT
   ========================================================================== */

.collapse:not(.show) {
  display: none;
}

.collapse.show {
  display: block;
}

.collapsing {
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}
