html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* =========================================
   Shared component sizing
   ========================================= */

.small-box .inner h3 {
    font-size: 2rem;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 1.1rem;
}

/* =========================================
   Shared form / card polish
   ========================================= */

.content-header h1,
.content-header .h1 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card-title {
    font-weight: 600;
}

.form-group label {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    color: #24323d;
}

.form-control,
.custom-select,
.ts-control {
    border-radius: 0.375rem;
}

    .form-control:focus,
    .custom-select:focus {
        box-shadow: 0 0 0 0.15rem rgba(19, 95, 56, 0.12);
        border-color: #27a95f;
    }

.card-footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.text-muted {
    color: #6c757d !important;
}

/* =========================================
   Tom Select
   ========================================= */

.ts-control {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    box-shadow: none;
}

    .ts-control:focus,
    .ts-control.focus {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    }

    .ts-control.disabled {
        background-color: #e9ecef !important;
        opacity: 1;
    }

.ts-dropdown {
    border-radius: 0.375rem;
}

/* =========================================
   DataTables
   ========================================= */

.dataTables_wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.dataTables_wrapper .col-sm-12,
.dataTables_wrapper .col-md-5,
.dataTables_wrapper .col-md-6,
.dataTables_wrapper .col-md-7 {
    padding-left: 0;
    padding-right: 0;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    margin-bottom: 0.75rem;
}

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_length label {
        font-weight: 400;
        margin-bottom: 0;
    }

    .dataTables_wrapper .dataTables_filter input {
        margin-left: 0.5rem;
        display: inline-block;
        width: auto;
        min-width: 180px;
    }

    .dataTables_wrapper .dataTables_length select {
        display: inline-block;
        width: auto;
        margin: 0 0.35rem;
    }

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.75rem;
}

.dataTables_wrapper .paginate_button {
    padding: 0 !important;
}

table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

    table.dataTable thead th {
        white-space: nowrap;
    }

/* =========================================
   Signature pads
   ========================================= */

.signature-pad-canvas {
    display: block;
    width: 100%;
    height: 180px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

/* =========================================
   Abi Oils - Auth Pages
   ========================================= */

.abi-auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 30%), radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(180deg, #f3f6f8 0%, #dfe7ec 40%, #cfd8df 100%);
    background-attachment: fixed;
}

.abi-auth-shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 50px 20px 32px;
}

.abi-auth-card {
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
    box-shadow: 0 25px 60px rgba(21, 42, 58, 0.18);
}

.abi-auth-logo-wrap {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abi-auth-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.abi-auth-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.abi-auth-logo-mark {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f7a3b 0%, #22a652 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 18px rgba(15, 122, 59, 0.25);
    margin-right: 14px;
}

.abi-auth-brand {
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    color: #135f38;
    letter-spacing: -0.02em;
}

.abi-auth-subbrand {
    font-size: 0.9rem;
    color: #5b6770;
    letter-spacing: 0.34em;
    margin-top: 0.35rem;
}

.abi-auth-title {
    font-size: 2.1rem;
    font-weight: 600;
    color: #123c2b;
    letter-spacing: -0.02em;
}

.abi-auth-label {
    font-weight: 600;
    color: #264653;
}

.abi-auth-input-icon {
    background: #f4f7f8;
    border-color: #d8e0e5;
    color: #6c7a86;
}

.abi-auth-input {
    border-color: #d8e0e5;
    box-shadow: none;
}

    .abi-auth-input:focus {
        border-color: #27a95f;
        box-shadow: 0 0 0 0.15rem rgba(39, 169, 95, 0.12);
    }

.abi-auth-btn {
    border-radius: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    box-shadow: 0 12px 24px rgba(40, 167, 69, 0.22);
}

.abi-auth-link {
    color: #3b4954;
    font-weight: 500;
}

    .abi-auth-link:hover {
        color: #135f38;
        text-decoration: none;
    }

.abi-auth-footer {
    color: #4f5b65;
    font-size: 0.95rem;
}

.abi-auth-card .card.bg-light {
    border-radius: 0.9rem;
    background: #f6f8fa !important;
}

@media (max-width: 575.98px) {
    .abi-auth-shell {
        padding-top: 28px;
    }

    .abi-auth-title {
        font-size: 1.75rem;
    }

    .abi-auth-brand {
        font-size: 1.65rem;
    }

    .abi-auth-logo-mark {
        width: 56px;
        height: 56px;
        font-size: 1.45rem;
    }
}

/* =========================================
   Abi Oils - App Shell / Sidebar Branding
   ========================================= */

.abi-app-shell {
    background: #e9eef2;
}

.abi-topbar.navbar-dark {
    background: linear-gradient(90deg, #135f38 0%, #1b7a49 100%) !important;
    border-bottom: 0;
    box-shadow: 0 4px 18px rgba(18, 60, 43, 0.12);
}

.abi-sidebar {
    background: linear-gradient(180deg, #f4f7f8 0%, #edf2f5 100%) !important;
    color: #2b3945;
    box-shadow: 8px 0 28px rgba(30, 48, 63, 0.08);
}

    .abi-sidebar .sidebar {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

.abi-brand-link {
    height: auto;
    min-height: 82px;
    border-bottom: 1px solid rgba(19, 60, 43, 0.08) !important;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.abi-brand-wrap {
    width: 100%;
    display: flex;
    align-items: center;
}

.abi-sidebar-logo {
    max-width: 210px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.abi-sidebar-logo-fallback {
    display: flex;
    align-items: center;
}

.abi-sidebar-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f7a3b 0%, #22a652 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 18px rgba(15, 122, 59, 0.18);
    margin-right: 12px;
}

.abi-sidebar-brand-main {
    font-size: 1.25rem;
    line-height: 1.05;
    font-weight: 700;
    color: #135f38;
    letter-spacing: -0.02em;
}

.abi-sidebar-brand-sub {
    font-size: 0.7rem;
    color: #687682;
    letter-spacing: 0.28em;
    margin-top: 0.2rem;
}

.abi-sidebar .nav-header {
    color: #7b8792 !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    margin-top: 0.9rem;
    margin-bottom: 0.3rem;
}

.abi-sidebar-nav > .nav-item > .nav-link {
    color: #33424f !important;
    border-radius: 0.85rem;
    margin-bottom: 0.25rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    transition: all 0.18s ease;
}

    .abi-sidebar-nav > .nav-item > .nav-link .nav-icon {
        color: #6d7a86 !important;
        transition: color 0.18s ease;
    }

    .abi-sidebar-nav > .nav-item > .nav-link:hover {
        background: rgba(19, 95, 56, 0.08) !important;
        color: #123c2b !important;
    }

        .abi-sidebar-nav > .nav-item > .nav-link:hover .nav-icon {
            color: #135f38 !important;
        }

    .abi-sidebar-nav > .nav-item > .nav-link.active {
        background: linear-gradient(135deg, #135f38 0%, #1d8a53 100%) !important;
        color: #fff !important;
        box-shadow: 0 10px 22px rgba(19, 95, 56, 0.22);
    }

        .abi-sidebar-nav > .nav-item > .nav-link.active .nav-icon {
            color: #fff !important;
        }

.abi-content-wrapper {
    background: #eef3f6;
}

.abi-footer {
    background: #f7fafb;
    border-top: 1px solid rgba(43, 57, 69, 0.08);
}

/* =========================================
   Dashboard usability
   ========================================= */

.dashboard-table-row {
    cursor: pointer;
}

    .dashboard-table-row:hover {
        background-color: #f1f5f9;
    }

/* =========================================
   Container type drag/reorder
   ========================================= */

.drag-handle {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    display: inline-block;
}

    .drag-handle:active {
        cursor: grabbing;
    }

#container-types-tbody tr.dragging {
    opacity: 0.55;
    background-color: #f8fbfd;
}

#container-types-tbody tr.over {
    outline: 2px dashed #007bff;
    outline-offset: -2px;
}

#container-types-tbody tr td {
    vertical-align: middle;
}

#unsaved-indicator {
    font-size: 0.8rem;
}

/* =========================================
   Responsive polish
   ========================================= */

@media (max-width: 991.98px) {
    .abi-sidebar .sidebar {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .abi-brand-link {
        min-height: 74px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .abi-sidebar-logo {
        max-width: 180px;
    }
}
