/* ============================================================
   Profile Manufacturing Inventory System — App Styles
   Porto Admin overrides and custom styling
   ============================================================ */

/* ---- Barcode / Scan Input ---- */
.scan-input {
    font-size: 1.5rem !important;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scan-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fffde7;
}

/* ---- Dashboard Summary Cards ---- */
.widget-summary .summary-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.6rem;
    color: #fff;
}

/* ---- Flash message auto-dismiss ---- */
.alert-auto-dismiss {
    transition: opacity 0.5s ease;
}

/* ---- Print / Export adjustments ---- */
@media print {
    #sidebar-left,
    .header,
    .footer,
    .btn,
    .card-actions {
        display: none !important;
    }
    .content-body {
        margin: 0 !important;
        padding: 0 !important;
    }
    table {
        font-size: 11px;
    }
}

/* ---- Form validation states ---- */
.form-control.is-valid {
    border-color: #28a745;
}
.form-control.is-invalid {
    border-color: #dc3545;
}
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
}
.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
}

/* ---- Select2 in Porto ---- */
.select2-container--default .select2-selection--single {
    height: 38px;
    border-color: #ddd;
    border-radius: 4px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* ---- Admin page background contrast ---- */
html.modern,
html.modern body,
html.modern .content-body {
    background-color: #ecedf0;
}

/* ---- DataTables truncated cell helper ---- */
.dt-cell-truncate {
    display: inline-block;
    max-width: var(--dt-truncate-max-width, 320px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
