/* Shared Mihub portal theme.
   Every portal stays on data-bs-theme="dark".
   Login layout is shared by every portal. */
html {
    color-scheme: dark;
}

.section-authentication-cover {
    min-height: 100vh;
    background: #07080c;
}

.section-authentication-cover .row {
    min-height: 100vh;
    margin: 0;
}

.auth-cover-left {
    position: relative;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 3.5rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(179, 236, 36, 0.22), transparent 42%),
        linear-gradient(165deg, #141820 0%, #07080c 70%) !important;
    border-right: 1px solid rgba(179, 236, 36, 0.16) !important;
}

.auth-cover-copy {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-cover-copy img {
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
}

.auth-cover-copy h2 {
    color: #f5f6fc;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.auth-cover-copy p {
    color: rgba(245, 246, 252, 0.68);
    font-size: 1rem;
    margin: 0;
}

.auth-cover-art {
    position: relative;
    z-index: 1;
    width: min(520px, 88%);
    height: auto;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.auth-cover-right {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: #0c0f14 !important;
}

.mihub-login-stage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.mihub-login-card {
    width: min(420px, 100%);
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem 1.75rem 1.6rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.mihub-login-logo {
    display: block;
    width: min(250px, 86%);
    height: auto;
    margin: 0 auto 1.35rem;
}

.mihub-login-card h1 {
    color: #f5f6fc;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
}

.mihub-login-sub {
    color: rgba(245, 246, 252, 0.62);
    margin-bottom: 1.25rem;
}

.mihub-login-card .form-label {
    color: #e6e8ef;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.mihub-login-card .form-control {
    background: #0d1016;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 10px;
    min-height: 46px;
}

.mihub-login-card .form-control:focus {
    background: #0d1016;
    color: #fff;
    border-color: #b3ec24;
    box-shadow: 0 0 0 3px rgba(179, 236, 36, 0.16);
}

.mihub-login-card .input-group-text {
    background: #0d1016;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    color: #c9ced8;
    border-radius: 0 10px 10px 0;
}

.mihub-login-card .input-group .form-control {
    border-radius: 10px 0 0 10px;
}

.mihub-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.85rem 0 1.1rem;
    font-size: 0.86rem;
}

.mihub-login-row a,
.mihub-login-foot a {
    color: #b3ec24;
    text-decoration: none;
    font-weight: 600;
}

.mihub-login-card .form-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: auto;
    padding: 0;
    margin: 0;
}

.mihub-login-card .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    flex: 0 0 auto;
    background-color: #0d1016;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.25rem;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.mihub-login-card .form-check-input:checked {
    background-color: #b3ec24;
    border-color: #b3ec24;
}

.mihub-login-card .form-check-label {
    color: rgba(245, 246, 252, 0.78);
}

.mihub-login-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: #b3ec24;
    color: #14141a;
    font-weight: 700;
}

.mihub-login-btn:hover {
    background: #c6f34a;
    color: #14141a;
}

.mihub-login-error {
    background: rgba(220, 53, 69, 0.12);
    color: #ffb4bc;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.9rem;
    font-size: 0.86rem;
}

.mihub-login-ok {
    background: rgba(179, 236, 36, 0.12);
    color: #d6f7a1;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.9rem;
    font-size: 0.86rem;
}

.mihub-login-foot {
    margin-top: 1rem;
    color: rgba(245, 246, 252, 0.7);
    font-size: 0.86rem;
}

body.login-body {
    background: #07080c;
}

body.login-body .login-bg-video {
    z-index: 0;
    opacity: 0.35;
}

body.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 12, 0.45);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 1199.98px) {
    .auth-cover-right {
        min-height: 100vh;
    }
}

/* Shared list / DataTable UI for every portal */
html[data-bs-theme="dark"] .card-header h1,
html[data-bs-theme="dark"] .card-header h2,
html[data-bs-theme="dark"] .card-header .card-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #b3ec24 !important;
    margin: 0;
    letter-spacing: 0.01em;
}

html[data-bs-theme="dark"] .card:has(table),
html[data-bs-theme="dark"] .card:has(.dataTables_wrapper) {
    background: #101218;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

html[data-bs-theme="dark"] .card:has(table) > .card-header,
html[data-bs-theme="dark"] .card:has(.dataTables_wrapper) > .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.9rem 1.1rem;
}

html[data-bs-theme="dark"] .card:has(table) > .card-body,
html[data-bs-theme="dark"] .card:has(.dataTables_wrapper) > .card-body {
    padding: 0.85rem 1rem 1rem;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
    color: rgba(245, 246, 252, 0.72) !important;
    font-size: 0.82rem;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
html[data-bs-theme="dark"] .dataTables_wrapper .dt-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
html[data-bs-theme="dark"] div.dataTables_wrapper div.dataTables_filter input {
    background: #181b22 !important;
    color: #f5f6fc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    min-height: 34px;
    padding: 0.3rem 0.65rem !important;
    margin-bottom: 0 !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:active,
html[data-bs-theme="dark"] div.dataTables_wrapper div.dataTables_filter input:focus {
    background: #181b22 !important;
    color: #f5f6fc !important;
    border-color: #b3ec24 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(179, 236, 36, 0.16) !important;
}

html[data-bs-theme="dark"] .card table,
html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] table.dataTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin-top: 0.65rem !important;
    margin-bottom: 0.4rem !important;
    --bs-table-bg: #101218;
    --bs-table-color: #f5f6fc;
    --bs-table-striped-bg: #161a22;
    --bs-table-striped-color: #f5f6fc;
    --bs-table-hover-bg: #242a36;
    --bs-table-hover-color: #f5f6fc;
    --bs-table-border-color: rgba(255, 255, 255, 0.06);
    color: #f5f6fc !important;
    background: transparent !important;
}

html[data-bs-theme="dark"] .card table thead tr th,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTable thead tr th,
html[data-bs-theme="dark"] table.dataTable thead th,
html[data-bs-theme="dark"] table.dataTable thead td {
    background: #1a1e28 !important;
    color: rgba(245, 246, 252, 0.78) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(179, 236, 36, 0.28) !important;
    border-top: none !important;
    padding: 0.75rem 0.7rem !important;
    text-align: left !important;
    white-space: nowrap !important;
    background-image: none !important;
}

html[data-bs-theme="dark"] table.dataTable thead .sorting,
html[data-bs-theme="dark"] table.dataTable thead .sorting_asc,
html[data-bs-theme="dark"] table.dataTable thead .sorting_desc,
html[data-bs-theme="dark"] table.dataTable thead .sorting_asc_disabled,
html[data-bs-theme="dark"] table.dataTable thead .sorting_desc_disabled {
    background-image: none !important;
    position: relative;
    padding-right: 1.35rem !important;
}

html[data-bs-theme="dark"] table.dataTable thead .sorting:after,
html[data-bs-theme="dark"] table.dataTable thead .sorting_asc:after,
html[data-bs-theme="dark"] table.dataTable thead .sorting_desc:after {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.68rem;
    color: rgba(245, 246, 252, 0.4);
}

html[data-bs-theme="dark"] table.dataTable thead .sorting:after { content: "↕"; }
html[data-bs-theme="dark"] table.dataTable thead .sorting_asc:after { content: "↑"; color: #b3ec24; }
html[data-bs-theme="dark"] table.dataTable thead .sorting_desc:after { content: "↓"; color: #b3ec24; }

html[data-bs-theme="dark"] .dataTables_wrapper table.dataTable tbody tr,
html[data-bs-theme="dark"] .card table tbody tr,
html[data-bs-theme="dark"] table.dataTable.display tbody tr,
html[data-bs-theme="dark"] table.dataTable.stripe tbody tr,
html[data-bs-theme="dark"] table.dataTable.hover tbody tr {
    background: #101218 !important;
    color: #f5f6fc !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTable tbody tr td,
html[data-bs-theme="dark"] .card table tbody tr td,
html[data-bs-theme="dark"] table.dataTable tbody td,
html[data-bs-theme="dark"] table.dataTable.display tbody tr > .sorting_1,
html[data-bs-theme="dark"] table.dataTable.display tbody tr.odd > .sorting_1,
html[data-bs-theme="dark"] table.dataTable.display tbody tr.even > .sorting_1,
html[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd,
html[data-bs-theme="dark"] table.dataTable.stripe tbody tr.even,
html[data-bs-theme="dark"] table.dataTable.display tbody tr.odd,
html[data-bs-theme="dark"] table.dataTable.display tbody tr.even {
    background: #101218 !important;
    background-color: #101218 !important;
    color: #f5f6fc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-top: none !important;
    padding: 0.62rem 0.7rem !important;
    text-align: left !important;
    vertical-align: middle !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] table.dataTable.stripe > tbody > tr.odd > *,
html[data-bs-theme="dark"] table.dataTable.display > tbody > tr.odd > *,
html[data-bs-theme="dark"] table.dataTable.stripe > tbody > tr.even > *,
html[data-bs-theme="dark"] table.dataTable.display > tbody > tr.even > *,
html[data-bs-theme="dark"] table.dataTable.hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] table.dataTable.display > tbody > tr:hover > * {
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper table.dataTable tbody tr:nth-child(even),
html[data-bs-theme="dark"] .dataTables_wrapper table.dataTable tbody tr:nth-child(even) td,
html[data-bs-theme="dark"] .card table.table-striped tbody tr:nth-child(even),
html[data-bs-theme="dark"] .card table.table-striped tbody tr:nth-child(even) td {
    background: #161a22 !important;
    background-color: #161a22 !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper table.dataTable tbody tr:hover td,
html[data-bs-theme="dark"] .card table tbody tr:hover td {
    background: #242a36 !important;
    background-color: #242a36 !important;
    color: #f5f6fc !important;
    box-shadow: inset 2px 0 0 #b3ec24 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody td.dataTables_empty,
html[data-bs-theme="dark"] table.dataTable tbody tr:hover td.dataTables_empty {
    background: transparent !important;
    background-color: transparent !important;
    color: rgba(245, 246, 252, 0.55) !important;
    text-align: center !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTable tbody tr td a,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTable tbody tr td button,
html[data-bs-theme="dark"] .card table tbody tr td a,
html[data-bs-theme="dark"] .card table tbody tr td button {
    background: transparent !important;
    color: #f5f6fc !important;
    border: none !important;
    outline: none !important;
}

html[data-bs-theme="dark"] table tbody td .btn,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td .btn,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td a.btn,
html[data-bs-theme="dark"] .card table tbody td .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: auto !important;
    height: auto !important;
    min-height: 30px;
    padding: 0.28rem 0.62rem !important;
    border-radius: 8px !important;
    background: #22262f !important;
    color: #f5f6fc !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] table tbody td .btn:has(> i:only-child),
html[data-bs-theme="dark"] table tbody td a.btn:has(i),
html[data-bs-theme="dark"] table tbody td button.btn {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
}

html[data-bs-theme="dark"] table tbody td .btn-custom,
html[data-bs-theme="dark"] table tbody td .btn-success,
html[data-bs-theme="dark"] table tbody td .accept-btn,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td .btn-custom {
    background: transparent !important;
    color: #c6f34a !important;
    border-color: rgba(179, 236, 36, 0.45) !important;
}

html[data-bs-theme="dark"] table tbody td .btn-warning,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td .btn-warning {
    background: transparent !important;
    color: #f5d76e !important;
    border-color: rgba(245, 196, 70, 0.4) !important;
}

html[data-bs-theme="dark"] table tbody td .btn-danger,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td .btn-danger {
    background: transparent !important;
    color: #ff8b98 !important;
    border-color: rgba(255, 139, 152, 0.4) !important;
}

html[data-bs-theme="dark"] table tbody td .btn-info,
html[data-bs-theme="dark"] .dataTables_wrapper table tbody td .btn-info,
html[data-bs-theme="dark"] table tbody td .btn-primary {
    background: transparent !important;
    color: #9ecbff !important;
    border-color: rgba(158, 203, 255, 0.4) !important;
}

html[data-bs-theme="dark"] table tbody td a.btn:not(:has(i)) {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #f5f6fc !important;
    border: none !important;
    border-radius: 0 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-bs-theme="dark"] table .badge,
html[data-bs-theme="dark"] table tbody td .btn-sm {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 999px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.28rem 0.6rem !important;
    background: #2a3140 !important;
    color: #d7dce8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] table .badge.bg-secondary,
html[data-bs-theme="dark"] table .badge.text-dark {
    background: rgba(245, 196, 70, 0.14) !important;
    color: #f6d98a !important;
    border-color: rgba(245, 196, 70, 0.35) !important;
}

html[data-bs-theme="dark"] table .badge.bg-warning {
    background: rgba(245, 196, 70, 0.14) !important;
    color: #f6d98a !important;
    border-color: rgba(245, 196, 70, 0.35) !important;
}

html[data-bs-theme="dark"] table .badge.bg-success,
html[data-bs-theme="dark"] table tbody td .btn-sm.btn-success {
    background: rgba(179, 236, 36, 0.12) !important;
    color: #d6f7a1 !important;
    border-color: rgba(179, 236, 36, 0.35) !important;
}

html[data-bs-theme="dark"] table .badge.bg-info,
html[data-bs-theme="dark"] table tbody td .btn-sm.btn-info {
    background: rgba(90, 169, 250, 0.14) !important;
    color: #b9dcff !important;
    border-color: rgba(90, 169, 250, 0.35) !important;
}

html[data-bs-theme="dark"] table .badge.bg-danger,
html[data-bs-theme="dark"] table tbody td .btn-sm.btn-danger {
    background: rgba(220, 53, 69, 0.16) !important;
    color: #ffb4bc !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.active {
    background: #181b22 !important;
    color: #f5f6fc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
    padding: 0.35rem 0.7rem !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button a {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.active,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current a,
html[data-bs-theme="dark"] .page-item.active .page-link {
    background: #b3ec24 !important;
    color: #14141a !important;
    border-color: #b3ec24 !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:active {
    background: rgba(179, 236, 36, 0.18) !important;
    color: #f5f6fc !important;
    border-color: rgba(179, 236, 36, 0.35) !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #14171d !important;
    color: rgba(245, 246, 252, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    cursor: not-allowed !important;
}

html[data-bs-theme="dark"] .dt-buttons .btn,
html[data-bs-theme="dark"] .dt-buttons .btn-custom,
html[data-bs-theme="dark"] .dt-button {
    width: auto !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    background: #b3ec24 !important;
    color: #14141a !important;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 0.4rem 0.9rem !important;
}

html[data-bs-theme="dark"] .card-header #firstMileBtn,
html[data-bs-theme="dark"] .card-header #midMileBtn,
html[data-bs-theme="dark"] .card-header #lastMileBtn {
    border-radius: 999px !important;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.38rem 0.85rem !important;
    background: #1a1e28 !important;
    color: #d5d8e2 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .card-header #firstMileBtn.bg-primary,
html[data-bs-theme="dark"] .card-header #midMileBtn.bg-primary,
html[data-bs-theme="dark"] .card-header #lastMileBtn.bg-primary {
    background: #b3ec24 !important;
    color: #14141a !important;
    border-color: #b3ec24 !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
    background: rgba(16, 18, 24, 0.92) !important;
    color: #b3ec24 !important;
    border: 1px solid rgba(179, 236, 36, 0.25) !important;
    border-radius: 10px;
}
