html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
body {
    background-color: #F0F2F5;
}

.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table {
    background-color: #FFFFFF;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

footer {
    background-color: #F0F2F5;
}
/* TORX Brand Colors */
.btn-primary {
    background-color: #FF6B2B;
    border-color: #FF6B2B;
    color: #FFFFFF;
}

    .btn-primary:hover {
        background-color: #E55A1F;
        border-color: #E55A1F;
        color: #FFFFFF;
    }

    .btn-primary:focus,
    .btn-primary:active {
        background-color: #E55A1F;
        border-color: #E55A1F;
        color: #FFFFFF;
    }

.table-dark {
    background-color: #0A0C0F;
}

.navbar.bg-dark {
    background-color: #0A0C0F !important;
}
.navbar-dark .navbar-nav .nav-link {
    color: #FFFFFF;
}

    .navbar-dark .navbar-nav .nav-link:hover {
        color: #FF6B2B;
    }

    .navbar-dark .navbar-nav .nav-link:focus {
        color: #FF6B2B;
    }
.dropdown-menu-dark .dropdown-item {
    color: #FFFFFF;
}

    .dropdown-menu-dark .dropdown-item:hover {
        color: #FF6B2B;
        background-color: rgba(255, 107, 43, 0.15);
    }

/* Form label styling */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 4px;
}

textarea {
    white-space: pre-wrap;
}

.preserve-lines {
    white-space: pre-wrap;
}

/* Input text slightly smaller */
.form-control, .form-select {
    font-size: 0.9rem;
}

/* ── DARK MODE ── */
html.dark-mode body {
    background-color: #1A1D23;
}

body.dark-mode {
    background-color: #1A1D23;
    color: #E0E0E0;
}

    body.dark-mode .card {
        background-color: #22262F !important;
        border-color: rgba(255,255,255,0.08) !important;
        color: #E0E0E0;
    }

    body.dark-mode .card-body {
        background-color: #22262F !important;
    }

    body.dark-mode .card-header.bg-dark {
        background-color: #13151A !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    body.dark-mode .table {
        background-color: #22262F !important;
        color: #E0E0E0;
        border-color: rgba(255,255,255,0.08);
    }

        body.dark-mode .table td,
        body.dark-mode .table th {
            border-color: rgba(255,255,255,0.08);
            color: #E0E0E0;
            background-color: #22262F;
        }

    body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
        background-color: #272B34 !important;
        color: #E0E0E0;
    }

    body.dark-mode .table-striped > tbody > tr:nth-of-type(even) > * {
        background-color: #22262F !important;
        color: #E0E0E0;
    }

    body.dark-mode .table-hover > tbody > tr:hover > * {
        background-color: rgba(255,107,43,0.1) !important;
        color: #E0E0E0;
    }

    body.dark-mode .table-dark {
        background-color: #13151A !important;
    }

        body.dark-mode .table-dark th {
            background-color: #13151A !important;
            color: #E0E0E0;
        }

    body.dark-mode .form-control,
    body.dark-mode .form-select {
        background-color: #2C3140 !important;
        border-color: rgba(255,255,255,0.15);
        color: #E0E0E0 !important;
    }

        body.dark-mode .form-control:focus,
        body.dark-mode .form-select:focus {
            background-color: #2C3140 !important;
            border-color: #FF6B2B;
            color: #E0E0E0 !important;
            box-shadow: 0 0 0 0.2rem rgba(255,107,43,0.25);
        }

        body.dark-mode .form-control::placeholder {
            color: rgba(224,224,224,0.3);
        }

    body.dark-mode .breadcrumb {
        background-color: transparent;
    }

    body.dark-mode .breadcrumb-item a {
        color: #FF6B2B;
    }

    body.dark-mode .breadcrumb-item.active {
        color: #8A96A3;
    }

    body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
        color: #8A96A3;
    }

    body.dark-mode .text-muted {
        color: #8A96A3 !important;
    }

    body.dark-mode .alert-info {
        background-color: rgba(0,194,168,0.12);
        border-color: rgba(0,194,168,0.25);
        color: #00C2A8;
    }

    body.dark-mode .alert-warning {
        background-color: rgba(255,107,43,0.12);
        border-color: rgba(255,107,43,0.25);
        color: #FF6B2B;
    }

    body.dark-mode .alert-danger {
        background-color: rgba(230,57,70,0.12);
        border-color: rgba(230,57,70,0.25);
        color: #E63946;
    }

    body.dark-mode .alert-success {
        background-color: rgba(0,194,168,0.12);
        border-color: rgba(0,194,168,0.25);
        color: #00C2A8;
    }

    body.dark-mode .modal-content {
        background-color: #22262F !important;
        border-color: rgba(255,255,255,0.08);
        color: #E0E0E0;
    }

    body.dark-mode .modal-header {
        border-bottom-color: rgba(255,255,255,0.08);
    }

    body.dark-mode .modal-footer {
        border-top-color: rgba(255,255,255,0.08);
    }

    body.dark-mode .modal-body {
        background-color: #22262F !important;
    }

    body.dark-mode .dropdown-menu {
        background-color: #22262F;
        border-color: rgba(255,255,255,0.08);
    }

    body.dark-mode .dropdown-item {
        color: #E0E0E0;
    }

        body.dark-mode .dropdown-item:hover {
            background-color: rgba(255,107,43,0.15);
            color: #FF6B2B;
        }

    body.dark-mode .table-secondary {
        --bs-table-bg: #2C3140 !important;
        color: #E0E0E0 !important;
    }

        body.dark-mode .table-secondary td,
        body.dark-mode .table-secondary th {
            background-color: #2C3140 !important;
            color: #E0E0E0 !important;
        }

    body.dark-mode .btn-outline-secondary {
        color: #8A96A3;
        border-color: #8A96A3;
    }

        body.dark-mode .btn-outline-secondary:hover {
            background-color: #8A96A3;
            color: #1A1D23;
        }

    body.dark-mode h1,
    body.dark-mode h2,
    body.dark-mode h3,
    body.dark-mode h4,
    body.dark-mode h5 {
        color: #E0E0E0;
    }

    body.dark-mode .fw-semibold {
        color: #E0E0E0;
    }

    body.dark-mode .table-warning,
    body.dark-mode .table-warning > td,
    body.dark-mode .table-warning > th {
        background-color: rgba(255,107,43,0.15) !important;
        color: #E0E0E0 !important;
    }

    body.dark-mode .table-success,
    body.dark-mode .table-success > td,
    body.dark-mode .table-success > th {
        background-color: rgba(0,194,168,0.15) !important;
        color: #E0E0E0 !important;
    }

    body.dark-mode .table-danger,
    body.dark-mode .table-danger > td,
    body.dark-mode .table-danger > th {
        background-color: rgba(230,57,70,0.15) !important;
        color: #E0E0E0 !important;
    }

    body.dark-mode .border-bottom {
        border-color: rgba(255,255,255,0.08) !important;
    }

    body.dark-mode .border-end {
        border-color: rgba(255,255,255,0.08) !important;
    }

    body.dark-mode strong {
        color: #E0E0E0;
    }

    body.dark-mode .pfmeaInfo,
    body.dark-mode #pfmeaInfo {
        background-color: #2C3140 !important;
        color: #E0E0E0;
    }

    body.dark-mode footer {
        background-color: #1A1D23 !important;
        color: #8A96A3;
    }

        body.dark-mode footer a {
            color: #FF6B2B;
        }

    body.dark-mode .table-dark,
    body.dark-mode .table-dark th,
    body.dark-mode .table thead.table-dark th {
        background-color: #2C3140 !important;
        color: #E0E0E0 !important;
        border-color: rgba(255,255,255,0.08) !important;
    }
    body.dark-mode .table-success,
    body.dark-mode .table-success > td,
    body.dark-mode .table-success > th,
    body.dark-mode tr.table-success > td,
    body.dark-mode tr.table-success > th {
        background-color: rgba(0,194,168,0.12) !important;
        color: #E0E0E0 !important;
        --bs-table-bg: rgba(0,194,168,0.12) !important;
        --bs-table-striped-bg: rgba(0,194,168,0.12) !important;
    }

    body.dark-mode .table-warning,
    body.dark-mode .table-warning > td,
    body.dark-mode .table-warning > th,
    body.dark-mode tr.table-warning > td,
    body.dark-mode tr.table-warning > th {
        background-color: rgba(255,107,43,0.12) !important;
        color: #E0E0E0 !important;
        --bs-table-bg: rgba(255,107,43,0.12) !important;
        --bs-table-striped-bg: rgba(255,107,43,0.12) !important;
    }



    .pfmea-step4-header {
        background-color: #fff3cd !important;
        color: #555 !important;
    }

    .pfmea-step5-header {
        background-color: #d1ecf1 !important;
        color: #555 !important;
    }

    body.dark-mode .pfmea-step4-header {
        background-color: rgba(255,193,7,0.2) !important;
        color: #E0E0E0 !important;
    }

    body.dark-mode .pfmea-step5-header {
        background-color: rgba(13,202,240,0.2) !important;
        color: #E0E0E0 !important;
    }