:root {
    --ui-primary: #3887c2;
    --ui-primary-2: #4fc3f7;
    --ui-info: #0ea5e9;
    --ui-success: #16a34a;
    --ui-warning: #f59e0b;
    --ui-danger: #dc3545;
    --ui-secondary: #6b7280;
    --ui-text: #1f2937;
    --ui-muted: #6b7280;
    --ui-border: #d7e3ef;
    --ui-bg-soft: #f8fafc;
    --ui-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

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

body {
    margin: 0;
    color: var(--ui-text);
}

a {
    color: var(--ui-primary);
}

a:hover {
    color: #256fa5;
}

a.btn,
a.btn:visited {
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.row > .col,
.row > .col-auto,
.row > .col-12,
.row > .col-md-4,
.row > .col-md-6 {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.col {
    flex: 1 1 0;
}

.col-auto {
    flex: 0 0 auto;
    width: auto !important;
}

.col-12 {
    flex: 0 0 100%;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        width: 33.333333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        width: 50%;
    }
}

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

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.w-100 {
    width: 100% !important;
}

.min-vh-100 {
    min-height: 100vh !important;
}

.p-0 {
    padding: 0 !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

.text-center {
    text-align: center !important;
}

.text-start {
    text-align: left !important;
}

.text-muted {
    color: var(--ui-muted) !important;
}

.text-white {
    color: #fff !important;
}

.text-success {
    color: var(--ui-success) !important;
}

.text-danger {
    color: var(--ui-danger) !important;
}

.text-info {
    color: var(--ui-info) !important;
}

.text-primary {
    color: var(--ui-primary) !important;
}

.text-warning {
    color: #a16207 !important;
}

.small,
small {
    font-size: 0.875rem;
}

.fs-4 {
    font-size: 1.5rem !important;
}

.fs-5 {
    font-size: 1.25rem !important;
}

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

.lead {
    font-size: 1.125rem;
    line-height: 1.6;
}

.bg-white {
    background: #fff !important;
}

.bg-primary {
    background: var(--ui-primary) !important;
}

.bg-secondary {
    background: var(--ui-secondary) !important;
}

.bg-success {
    background: var(--ui-success) !important;
}

.bg-info {
    background: var(--ui-info) !important;
}

.rounded {
    border-radius: 0.5rem !important;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button.btn {
    appearance: none;
    -webkit-appearance: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--ui-primary-2) 0%, var(--ui-primary) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(56, 135, 194, 0.2);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
a.btn-primary:visited {
    color: #fff;
    text-decoration: none;
}

.btn-warning {
    background: linear-gradient(90deg, #fcd34d 0%, #f59e0b 100%);
    color: #5b3300;
}

.btn-info {
    background: linear-gradient(90deg, #67e8f9 0%, #0ea5e9 100%);
    color: #083344;
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
    background: rgba(255, 255, 255, 0.9);
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: #475569;
}

.btn-outline-danger {
    border-color: #f3b3bc;
    color: #b42318;
}

.btn-outline-warning {
    border-color: #f6d58b;
    color: #8a5a00;
}

.btn-outline-info {
    border-color: #96d8f7;
    color: #0369a1;
}

.btn-outline-secondary:visited,
.btn-outline-danger:visited,
.btn-outline-warning:visited,
.btn-outline-info:visited {
    text-decoration: none;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font: inherit;
    color: var(--ui-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 4px rgba(56, 135, 194, 0.12);
}

.form-text {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: var(--ui-muted);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.form-check-inline {
    display: inline-flex;
    margin-right: 1rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--ui-primary);
}

.form-check-label {
    cursor: pointer;
}

.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.4rem;
}

.alert {
    position: relative;
    padding: 1rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #b7ebc6;
}

.alert-danger {
    background: #fff1f2;
    color: #b42318;
    border-color: #f2b8bf;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #f6d58b;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.alert-dismissible {
    padding-right: 3.25rem;
}

.btn-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    cursor: pointer;
}

.btn-close::before {
    content: "x";
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}

.progress {
    overflow: hidden;
    background: #e5edf5;
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ui-primary-2) 0%, var(--ui-primary) 100%);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.fade.show {
    opacity: 1;
}

.fas,
.far,
.fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    font-style: normal;
}

.fa-sign-out-alt::before { content: "↪"; }
.fa-check-circle::before { content: "✓"; }
.fa-exclamation-triangle::before { content: "!"; }
.fa-exclamation-circle::before { content: "!"; }
.fa-info-circle::before { content: "i"; }
.fa-clock::before { content: "⏱"; }
.fa-cogs::before { content: "⚙"; }
.fa-images::before { content: "🖼"; }
.fa-file-code::before { content: "{}"; }
.fa-home::before { content: "⌂"; }
.fa-play::before { content: "▶"; }
.fa-chart-bar::before { content: "▤"; }
.fa-key::before { content: "🔑"; }
.fa-lightbulb::before { content: "💡"; }
.fa-save::before { content: "💾"; }
.fa-user-shield::before { content: "🛡"; }
.fa-toggle-on::before { content: "◉"; }
.fa-sync::before { content: "↻"; }
.fa-search::before { content: "⌕"; }
.fa-edit::before { content: "✎"; }
.fa-list-ol::before { content: "≣"; }
.fa-angle-double-left::before { content: "«"; }
.fa-angle-left::before { content: "‹"; }
.fa-angle-right::before { content: "›"; }
.fa-angle-double-right::before { content: "»"; }
.fa-users-slash::before { content: "⊘"; }
.fa-broom::before { content: "🧹"; }
.fa-server::before { content: "🖧"; }
.fa-eye::before { content: "👁"; }
.fa-eye-slash::before { content: "◌"; }

.ad-bar {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(92vw, 560px);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(26, 39, 56, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    text-align: center;
    z-index: 999;
}

.ad-bar a {
    color: #f8dd74;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ad-bar a:hover {
    color: #ffe89c;
    text-decoration: none;
}

@media (max-width: 767px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .row > .col,
    .row > .col-auto,
    .row > .col-12,
    .row > .col-md-4,
    .row > .col-md-6 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .ad-bar {
        width: min(94vw, 420px);
        bottom: 10px;
        padding: 9px 14px;
    }

    .ad-bar a {
        font-size: 0.84rem;
    }
}
