:root {
    --bg-main: #eef3fb;
    --bg-surface: #ffffff;
    --bg-soft: #f5f8ff;
    --text-main: #17233a;
    --text-muted: #516079;
    --border-main: #cdd8eb;
    --brand: #1f4ed8;
    --brand-strong: #173eb0;
    --ok: #198754;
    --shadow-soft: 0 10px 30px rgba(24, 42, 76, 0.1);
}

body.admin-theme {
    background: radial-gradient(circle at top right, #dce8ff 0, #eef3fb 35%, #edf2fa 100%);
    color: var(--text-main);
    min-height: 100vh;
}

.navbar.bg-dark {
    background: linear-gradient(90deg, #0f172a 0%, #1f2a44 100%) !important;
    box-shadow: 0 8px 24px rgba(11, 19, 36, 0.35);
}

.navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 620px;
    white-space: normal;
    line-height: 1.15;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.4rem 0.65rem !important;
    margin-left: 0.2rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

.card {
    border: 1px solid var(--border-main);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(180deg, #fafdff 0%, #edf3ff 100%);
    border-bottom: 1px solid var(--border-main);
}

.card-header h3,
.card-header h4,
.card-header h5 {
    margin: 0;
    color: #12213d;
    font-weight: 700;
}

.card-body {
    background: var(--bg-surface);
}

.form-label {
    color: #1d2c4a;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.form-control,
.form-select {
    border: 1px solid #b9c7e2;
    background: #fbfdff;
    color: #14203a;
    border-radius: 10px;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(31, 78, 216, 0.2);
}

textarea.form-control {
    min-height: 110px;
}

.form-check-input {
    border-color: #7f90b2;
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

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

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(180deg, #2a67ff 0%, #1f4ed8 100%);
    border-color: #1f4ed8;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(180deg, #255de8 0%, #173eb0 100%);
    border-color: #173eb0;
}

.btn-secondary {
    background: #5b6a82;
    border-color: #54627a;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #4f5d74;
    border-color: #455168;
}

.alert {
    border-radius: 12px;
    border-width: 1px;
}

#single-answer-block,
#options-block {
    padding: 14px;
    border: 1px solid #d3def2;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

#options-block .row {
    margin-left: 0;
    margin-right: 0;
}

#options-block .row .col-auto {
    width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.point-item {
    cursor: grab;
    background: #f3f7ff;
    margin-bottom: 8px;
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(25, 45, 84, 0.08);
}

.point-item:active {
    cursor: grabbing;
}

.sortable-drag {
    opacity: 0.75;
    background: #d9e6ff !important;
}

@media (max-width: 768px) {
    .navbar .nav-link {
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .brand-with-logo {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .card {
        border-radius: 12px;
    }
}
