:root {
    --bg: #f4f7fb;
    --bg-soft: #eef4ff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e6edf5;
    --border-strong: #d7e0ea;

    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;

    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: rgba(37, 99, 235, 0.12);
    --brand-soft-2: rgba(14, 165, 233, 0.18);

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0ea5e9;

    --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

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

body {
    background:
        radial-gradient(circle at top right, #e9f1ff 0%, transparent 30%),
        radial-gradient(circle at bottom left, #eefaf6 0%, transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
}

.app-shell {
    min-height: 100vh;
}

/* Navbar */
.app-navbar {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 28px rgba(2, 6, 23, 0.08);
}

.app-navbar .navbar-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.app-navbar .navbar-brand:hover {
    color: #fff;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 500;
}

.app-navbar .navbar-toggler {
    padding: 0.35rem 0.55rem;
}

.app-navbar .navbar-nav {
    gap: 0.25rem;
}

.app-navbar .nav-link {
    color: rgba(226, 232, 240, 0.88);
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: #fff;
    background: rgba(37, 99, 235, 0.26);
}

.admin-badge {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Layout */
.page-container {
    max-width: 1280px;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1,
.page-header h2,
.page-header h3 {
    margin-bottom: 0.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--muted);
    margin-bottom: 0;
}

/* Alerts */
.app-alert,
.alert {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.alert-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

/* Cards */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-soft);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: #fcfdff;
    border-top: 1px solid var(--border);
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--border-strong);
    background: rgba(248, 250, 252, 0.75);
}

.table tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.025);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 0.45rem;
}

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    padding-inline: 0.9rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.12);
}

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

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

.form-check-label {
    color: var(--text-soft);
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sm {
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: 0;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn-outline-light:hover {
    color: #0f172a;
}

/* Badges */
.badge {
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    font-weight: 600;
}

/* Utilities */
.text-muted {
    color: var(--muted) !important;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Dashboard Hero */
.dashboard-hero {
    background: linear-gradient(120deg, #1d4ed8 0%, #2563eb 42%, #0ea5e9 100%);
    color: #fff;
    border: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.dashboard-hero .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* Login Page */
body.login-page {
    background:
        radial-gradient(circle at top left, #e8f0ff 0%, transparent 35%),
        radial-gradient(circle at bottom right, #dff7f0 0%, transparent 30%),
        linear-gradient(135deg, #f6f9fc 0%, #eef3f8 100%);
}

.login-container {
    max-width: 430px;
}

.login-card {
    border: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.brand-wrap {
    text-align: center;
    margin-bottom: 1.4rem;
}

.brand-logo {
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #0d6efd, #20c997);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.25);
}

.brand-wrap .brand-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 1.35rem;
}

.brand-wrap .brand-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.login-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-navbar .nav-link {
        padding: 0.7rem 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .card-header,
    .card-body {
        padding: 1rem;
    }

    .page-container {
        padding-left: 0.95rem;
        padding-right: 0.95rem;
    }

    .brand-subtitle {
        display: none;
    }
}
.xml-block {
    max-height: 520px;
    overflow: auto;
    margin: 0;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border-radius: 0 0 18px 18px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}