/* --- PROJECT SPECIFIC UI --- */

.btn > span { color:#FFFFFF; }
.truncate { display: block; max-width: 30ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-xs-custom {
  /* Reduce padding from .btn-sm defaults (e.g., .25rem .5rem) */
  padding: 0.1rem 0.4rem;
  /* Set a smaller font size */
  font-size: 0.75rem;
  /* Ensure borders and rounded corners scale */
  border-radius: 0.2rem;
}
/* Table Hacks */
.table-condensed > thead > tr:nth-child(2) > .prev {
    font-size: 0;
    background: url("data:image/svg+xml,...") 50% 50% / contain no-repeat;
}
.table-condensed > thead > tr:nth-child(2) > .next {
    font-size: 0;
    background: url("data:image/svg+xml, ...") 50% 50% / contain no-repeat;
}
.table-scrollable tbody { display: block; max-height: 300px; overflow-y: auto; }
.table-scrollable thead, .table-scrollable tbody tr { display: table; width: 100%; table-layout: fixed; }

/* Zebra Striping & Grids */
.list-group-item { background-color: #ffffff; transition: background-color 0.2s ease-in-out; }
.bg-light-odd { background-color: #f8f9fa; }
.bg-light-even { background-color: #ffffff; }
.list-group-item-action:hover { background-color: #e9ecef; }

/* Huchi GridTable Status Colors */
.grid-table tbody tr.text-danger td  { color: #d9534f !important; font-weight: 600; }
.grid-table tbody tr.text-success td { color: #28a745 !important; font-weight: 600; }
.grid-table tbody tr.text-warning td { color: #f0ad4e !important; }
.grid-table tbody tr.text-primary td { color: #007bff !important; }

/* Stepper Component */
.stepper-item { position: relative; }
.stepper-item::after { content: ""; position: absolute; height: 2px; width: 100%; background-color: #dee2e6; top: 20px; left: 50%; z-index: 1; }
.stepper-item:last-child::after { display: none; }
.stepper-item .step-counter { background-color: #fff; color: #6c757d; border: 2px solid #dee2e6; transition: all 0.3s ease; }
.stepper-item.active .step-counter { background-color: #0d6efd !important; color: #fff !important; border-color: #0d6efd !important; }
.stepper-item.completed .step-counter { background-color: #198754 !important; color: #fff !important; }

/* View Transitions (O2M Container) */
.view-container { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#o2m-container .tab-content { position: relative; overflow: hidden; min-height: 300px; }
#o2m-container .tab-content > div { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; }
#o2m-container .tab-content > div[style*="display: none"] { display: block !important; opacity: 0; transform: translateY(10px); pointer-events: none; position: absolute; top: 0; left: 0; }
#o2m-container .tab-content > div:not([style*="display: none"]) { opacity: 1; transform: translateY(0); position: relative; z-index: 1; }

#custom-context-menu {
    background-color: white !important; /* or your theme color */
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Force Sidebar Alignment */
.nav-sidebar .nav-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; /* Vertical Center */
    justify-content: flex-start !important;
    line-height: 1 !important; /* Reset line height */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-sidebar .nav-link p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
}

.nav-sidebar .nav-link i {
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
}

/* Specifically for the arrow */
.nav-arrow {
    font-size: 0.8rem; /* Chevrons often look 'low' if they are too big */
    margin-top: 1px;   /* Micro-adjustment if font-face is off-center */
}