*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

.container {
    width: min(100% - 32px, 1140px);
    margin-inline: auto;
}

.row {
    --gutter-x: 16px;
    --gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-inline: calc(var(--gutter-x) * -0.5);
    margin-top: calc(var(--gutter-y) * -1);
}

.row > * {
    width: 100%;
    max-width: 100%;
    padding-inline: calc(var(--gutter-x) * 0.5);
    margin-top: var(--gutter-y);
}

.g-2 { --gutter-x: 8px; --gutter-y: 8px; }
.g-3 { --gutter-x: 16px; --gutter-y: 16px; }

.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-12 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-2 { width: 16.6667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.3333%; }
    .col-md-5 { width: 41.6667%; }
    .col-md-6 { width: 50%; }
    .col-md-7 { width: 58.3333%; }
    .col-md-8 { width: 66.6667%; }
    .col-md-12 { width: 100%; }
}

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-fill { flex: 1 1 auto !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-sm-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-sm-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-items-center { justify-items: center !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }

@media (min-width: 768px) {
    .d-md-flex { display: flex !important; }
}

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-flex { display: flex !important; }
    .flex-sm-fill { flex: 1 1 auto !important; }
}

@media (max-width: 575.98px) {
    .d-sm-none { display: flex !important; }
    .d-sm-flex { display: none !important; }
}

.vh-100 { min-height: 100vh !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-decoration-none { text-decoration: none !important; }
.text-white { color: #fff !important; }
.text-dark { color: #20242c !important; }
.text-muted { color: #697386 !important; }
.text-danger { color: #b42318 !important; }
.text-warning { color: #b7791f !important; }
.text-success { color: #0f766e !important; }
.text-primary { color: #7c2d3a !important; }

.fw-bold { font-weight: 800 !important; }
.fw-semibold { font-weight: 700 !important; }

.fs-4 { font-size: 24px !important; }
.small { font-size: 13px !important; }

.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.ms-2 { margin-left: 8px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 24px !important; }
.px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }
.px-4 { padding-left: 24px !important; padding-right: 24px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-4 { padding-top: 24px !important; padding-bottom: 24px !important; }
.py-5 { padding-top: 48px !important; padding-bottom: 48px !important; }

.border { border: 1px solid #dde3ee !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid #dde3ee !important; }
.border-bottom { border-bottom: 1px solid #dde3ee !important; }

.shadow-sm { box-shadow: 0 8px 24px rgba(31, 41, 51, 0.06) !important; }
.shadow-lg { box-shadow: 0 24px 70px rgba(31, 41, 51, 0.22) !important; }

.card {
    background: #fff;
    border: 1px solid #dde3ee;
    border-radius: 8px;
}

.card-body {
    padding: 16px;
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dde3ee;
    background: #f8fafc;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 14px;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    color: #20242c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary { background: #7c2d3a; border-color: #7c2d3a; color: #fff; }
.btn-primary:hover { background: #5d1f2b; border-color: #5d1f2b; }
.btn-success { background: #0f766e; border-color: #0f766e; color: #fff; }
.btn-danger { background: #b42318; border-color: #b42318; color: #fff; }
.btn-warning { background: #f6c768; border-color: #f6c768; color: #31250a; }
.btn-secondary { background: #475467; border-color: #475467; color: #fff; }
.btn-light { background: #f8fafc; border-color: #dde3ee; color: #20242c; }
.btn-outline-secondary { border-color: #b8c2d3; color: #475467; background: #fff; }
.btn-outline-danger { border-color: #d92d20; color: #b42318; background: #fff; }

.form-label {
    display: inline-block;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #cfd7cc;
    border-radius: 6px;
    background: #fff;
    color: #20242c;
    font: inherit;
}

textarea.form-control {
    min-height: auto;
}

.form-control:focus,
.form-select:focus {
    outline: 2px solid rgba(124, 45, 58, 0.18);
    border-color: #7c2d3a;
}

.input-group {
    display: flex;
    width: 100%;
}

.input-group > .form-control {
    flex: 1 1 auto;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #cfd7cc;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #f8fafc;
    color: #697386;
}

.invalid-feedback {
    color: #b42318;
    margin-top: 5px;
    font-size: 13px;
}

.is-invalid {
    border-color: #d92d20 !important;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 16px;
}

.alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert-danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    vertical-align: middle;
}

.table th,
.table td {
    border-bottom: 1px solid #eef2f7;
    text-align: left;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}

.table-light th {
    background: #f1f5fb;
}

.table-danger { background: #fef3f2; }
.table-warning { background: #fffaeb; }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.bg-info { background: #cffafe !important; }
.bg-light { background: #f8fafc !important; }
.bg-danger { background: #d92d20 !important; color: #fff !important; }
.bg-warning { background: #f6c768 !important; }
.bg-secondary { background: #475467 !important; color: #fff !important; }
.bg-primary-subtle { background: #eef4ff !important; }
.bg-warning-subtle { background: #fffaeb !important; }
.bg-danger-subtle { background: #fef3f2 !important; }

.text-bg-success { background: #0f766e !important; color: #fff !important; }
.text-bg-danger { background: #d92d20 !important; color: #fff !important; }
.text-bg-warning { background: #f6c768 !important; color: #31250a !important; }
.text-bg-secondary { background: #475467 !important; color: #fff !important; }
.text-bg-light { background: #f8fafc !important; color: #20242c !important; }

@media (max-width: 767.98px) {
    .container {
        width: min(100% - 24px, 1140px);
    }

    .d-none {
        display: none !important;
    }

    .btn,
    .form-control,
    .form-select {
        width: 100%;
    }

    .table {
        min-width: 720px;
    }
}
