:root {
    --brand-primary: #800020;
    --brand-primary-dark: #5e0017;
    --brand-secondary: #b03a5b;
    --brand-soft: #f8e9ee;
    --brand-soft-2: #fdf7f9;
    --text-main: #2b1b22;
    --text-soft: #6d5a63;
    --border-soft: #ead6dd;
    --success-soft: #e7f7ee;
    --warning-soft: #fff4da;
    --danger-soft: #fde7e9;
    --card-bg: #ffffff;
    --shadow-soft: 0 14px 40px rgba(34, 18, 24, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html, body {
    min-height: 100%;
}

body.public-body {
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(176, 58, 91, 0.08), transparent 28%),
        linear-gradient(180deg, #fffafb 0%, #f6eff3 100%);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 18px 0 0;
}

.topbar {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    box-shadow: var(--shadow-soft);
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.95rem;
    opacity: 0.92;
}

.public-navbar {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 0, 32, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 24px rgba(0,0,0,0.04);
    padding: 8px 14px;
}

.public-navbar .nav-link {
    color: var(--text-main);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 500;
    transition: all 0.18s ease;
}

.public-navbar .nav-link:hover {
    background: var(--brand-soft);
    color: var(--brand-primary);
}

.public-navbar .nav-link.active {
    background: rgba(128, 0, 32, 0.09);
    color: var(--brand-primary);
    font-weight: 700;
}

.public-menu-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.10);
}

.site-main {
    flex: 1;
}

.site-footer {
    padding: 0 0 20px;
}

.footer-content {
    margin-top: 12px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(128,0,32,0.06);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.footer-small {
    font-size: 0.92rem;
    color: var(--text-soft);
}

.content-card,
.public-card,
.form-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(128,0,32,0.05);
    padding: 24px;
}

.hero-card {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.section-subtitle {
    color: var(--text-soft);
    margin-bottom: 0;
}

.btn-brand {
    background: var(--brand-primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--brand-primary-dark);
    color: #fff;
}

.btn-brand-outline {
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    background: #fff;
    border-radius: 12px;
}

.btn-brand-outline:hover,
.btn-brand-outline:focus {
    background: var(--brand-primary);
    color: #fff;
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: var(--border-soft);
    min-height: 46px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(128, 0, 32, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(128, 0, 32, 0.10);
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    background: var(--brand-soft);
    color: var(--text-main);
    border-bottom: 0;
    white-space: nowrap;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.9rem;
    vertical-align: middle;
}

.alert {
    border-radius: 14px;
    border: 0;
}

.alert-success {
    background: var(--success-soft);
    color: #185a33;
}

.alert-danger {
    background: var(--danger-soft);
    color: #7d1d28;
}

.alert-warning {
    background: var(--warning-soft);
    color: #7c5600;
}

.badge-soft-brand {
    background: rgba(128, 0, 32, 0.10);
    color: var(--brand-primary);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
}

.big-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.big-action-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(128,0,32,0.06);
    padding: 28px 24px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.big-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(34, 18, 24, 0.12);
    color: inherit;
}

.big-action-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.big-action-text {
    color: var(--text-soft);
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .topbar,
    .footer-content,
    .content-card,
    .public-card,
    .form-card,
    .hero-card {
        border-radius: 18px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-area {
        align-items: flex-start;
    }

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