/* ============================================================
   NTL Cargo — Custom Styles
   Bootstrap 5 overrides and additions
   ============================================================ */

/* ── Root / Variables ──────────────────────────────────────── */
:root {
    --ntl-primary: #0d6efd;
    --ntl-sidebar-width: 240px;
    --ntl-border-radius: 0.5rem;
}

/* ── Body & Layout ──────────────────────────────────────────── */
body {
    background-color: #f5f6fa;
    font-size: 0.9rem;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-brand {
    font-size: 1.2rem;
    letter-spacing: 0.03em;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.15s ease-in-out;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    border-radius: var(--ntl-border-radius);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Tables ─────────────────────────────────────────────────── */
.table th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.03);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    font-size: 0.75em;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    font-size: 0.8rem;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-control,
.form-select {
    border-color: #dee2e6;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ntl-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.3rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    font-size: 0.82rem;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
    font-size: 0.85rem;
    border-radius: 0.375rem;
    margin: 0 2px;
}

/* ── Alert messages (Bootstrap uses "success" but also "error" → danger) */
.alert-error {
    color: var(--bs-danger-text-emphasis);
    background-color: var(--bs-danger-bg-subtle);
    border-color: var(--bs-danger-border-subtle);
}

/* ── Stat cards on dashboards ───────────────────────────────── */
.stat-card .display-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.85rem;
    background: transparent;
    padding: 0;
}

/* ── Login / Auth card ──────────────────────────────────────── */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

/* ── Miscellaneous ──────────────────────────────────────────── */
.text-truncate-custom {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Smooth transitions on interactive elements */
a, .btn, .nav-link {
    transition: all 0.15s ease-in-out;
}

/* Make file input a bit nicer */
input[type="file"].form-control {
    padding: 0.45rem 0.75rem;
}
