:root {
    --ds-font: 'Be Vietnam Pro', sans-serif;
    --ds-ink: #102233;
    --ds-muted: #5f7282;
    --ds-surface: rgba(255, 255, 255, 0.92);
    --ds-surface-strong: #ffffff;
    --ds-border: rgba(16, 34, 51, 0.12);
    --ds-shadow: 0 24px 80px rgba(10, 33, 53, 0.18);
    --ds-radius-xl: 32px;
    --ds-radius-lg: 24px;
    --ds-radius-md: 18px;
}

* {
    box-sizing: border-box;
}

body.ds-page {
    font-family: var(--ds-font);
    color: var(--ds-ink);
    margin: 0;
    min-height: 100vh;
}

body.theme-life {
    background:
        radial-gradient(circle at top left, rgba(9, 117, 140, 0.34), transparent 34%),
        radial-gradient(circle at top right, rgba(255, 193, 94, 0.34), transparent 32%),
        linear-gradient(140deg, #eef9fb 0%, #e7f2ee 46%, #eef5d9 100%);
}

body.theme-agri {
    background:
        radial-gradient(circle at top left, rgba(255, 183, 77, 0.3), transparent 34%),
        radial-gradient(circle at right center, rgba(66, 153, 70, 0.26), transparent 30%),
        linear-gradient(140deg, #fff4df 0%, #eff8e8 45%, #e8f4f9 100%);
}

.ds-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 36px;
}

.ds-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ds-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ds-ink);
}

.ds-brand-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 16px 30px rgba(14, 38, 52, 0.18);
}

.theme-life .ds-brand-badge {
    background: linear-gradient(135deg, #0f766e, #0891b2);
}

.theme-agri .ds-brand-badge {
    background: linear-gradient(135deg, #b45309, #3f8c4b);
}

.ds-brand-copy strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.ds-brand-copy span {
    display: block;
    font-size: 0.9rem;
    color: var(--ds-muted);
}

.ds-top-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.ds-btn,
.ds-btn-outline {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

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

.theme-life .ds-btn {
    background: linear-gradient(135deg, #0f766e, #0ea5a4);
    color: #fff;
    box-shadow: 0 14px 30px rgba(14, 116, 110, 0.24);
}

.theme-agri .ds-btn {
    background: linear-gradient(135deg, #b45309, #4d9d50);
    color: #fff;
    box-shadow: 0 14px 30px rgba(77, 157, 80, 0.24);
}

.ds-btn-outline {
    background: rgba(255, 255, 255, 0.78);
    color: var(--ds-ink);
    border: 1px solid rgba(16, 34, 51, 0.1);
}

.ds-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 16px;
    margin-bottom: 18px;
}

.ds-panel {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(10, 33, 53, 0.12);
    backdrop-filter: blur(18px);
}

.ds-hero-main {
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.ds-hero-main::after {
    content: '';
    position: absolute;
    inset: auto -80px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    opacity: 0.24;
}

.theme-life .ds-hero-main::after {
    background: radial-gradient(circle, #14b8a6, transparent 62%);
}

.theme-agri .ds-hero-main::after {
    background: radial-gradient(circle, #f59e0b, transparent 62%);
}

.ds-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(16, 34, 51, 0.08);
    font-weight: 700;
    color: #234358;
    margin-bottom: 18px;
}

.ds-hero-main h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.ds-hero-main p {
    margin: 0 0 22px;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #3f5566;
    max-width: 760px;
}

.ds-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ds-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(16, 34, 51, 0.08);
    color: #274154;
    font-weight: 700;
}

.ds-stats {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.ds-stat-card {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 20px;
    border: 1px solid rgba(16, 34, 51, 0.08);
    padding: 16px;
}

.ds-stat-card span {
    display: block;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6a7d8b;
    margin-bottom: 8px;
    font-weight: 700;
}

.ds-stat-card strong {
    font-size: 1.72rem;
    line-height: 1;
    display: block;
    margin-bottom: 0;
}

.ds-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 16px;
}

.ds-stack {
    display: grid;
    gap: 16px;
}

.ds-section {
    padding: 20px;
}

.ds-map-section {
    display: grid;
    align-content: start;
    gap: 18px;
}

.ds-map-section > .ds-section-head {
    margin-bottom: 0;
}

.ds-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.ds-section-head h2,
.ds-section-head h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 850;
}

.ds-section-head p {
    margin: 6px 0 0;
    color: var(--ds-muted);
}

.ds-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ds-map-toolbar {
    display: grid;
    gap: 12px;
}

.ds-inline-note {
    margin: 0;
}

.ds-chip {
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid rgba(16, 34, 51, 0.1);
    background: rgba(255, 255, 255, 0.82);
    color: #244153;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.ds-chip.is-active {
    color: #fff;
}

.theme-life .ds-chip.is-active {
    background: linear-gradient(135deg, #0f766e, #0891b2);
}

.theme-agri .ds-chip.is-active {
    background: linear-gradient(135deg, #b45309, #4d9d50);
}

.ds-map-wrap {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(16, 34, 51, 0.1);
    background: #d9ecf5;
}

#lifeMap {
    width: 100%;
    height: 560px;
}

.ds-note {
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(17, 24, 39, 0.04);
    color: #355062;
    font-size: 0.9rem;
}

.ds-note-warning {
    margin-top: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #704b00;
}

.ds-list {
    display: grid;
    gap: 14px;
}

.ds-card-list {
    display: grid;
    gap: 14px;
}

.ds-collapsible-section .ds-section-head {
    align-items: center;
    margin-bottom: 0;
}

.ds-collapsible-section {
    display: grid;
    align-content: start;
    gap: 14px;
}

.ds-section-toggle {
    flex-shrink: 0;
}

.ds-section-toggle i {
    transition: transform 0.22s ease;
}

.ds-collapsible-section.is-collapsed .ds-section-toggle i {
    transform: rotate(-90deg);
}

.ds-collapsible-section.is-collapsed {
    gap: 0;
    padding-bottom: 16px;
}

.ds-collapsible-section.is-collapsed .ds-section-head,
.ds-collapsible-section.is-empty .ds-section-head {
    margin-bottom: 0;
}

.ds-section-content {
    display: block;
}

.ds-collapsible-section.is-collapsed .ds-section-content {
    display: none;
}

.ds-collapsible-section.is-empty {
    gap: 0;
    padding-bottom: 16px;
}

.ds-collapsible-section.is-empty .ds-section-head p {
    margin-bottom: 0;
}

.ds-collapsible-section.is-empty .ds-section-toggle {
    display: none;
}

.ds-mini-card {
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(16, 34, 51, 0.08);
}

.ds-mini-card h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
}

.ds-mini-card p {
    margin: 0 0 10px;
    color: #4f6575;
    line-height: 1.55;
}

.ds-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6a7d8b;
    font-size: 0.9rem;
}

.ds-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.14);
}

.ds-card-action:hover {
    color: #0b5f59;
    background: rgba(15, 118, 110, 0.12);
}

.ds-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ds-card-actions .ds-card-action {
    margin-top: 0;
}

.ds-textarea-lg {
    min-height: 280px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
}

.ds-network-card {
    position: relative;
    overflow: hidden;
}

.ds-network-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #0f766e, #0ea5e9);
}

.ds-network-card h4 {
    padding-left: 10px;
}

.ds-network-card p,
.ds-network-card .ds-meta {
    padding-left: 10px;
}

.ds-sovereignty-label {
    background: transparent;
    border: 0;
}

.ds-sovereignty-chip {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(16, 34, 51, 0.12);
    box-shadow: 0 14px 22px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.ds-sovereignty-chip strong {
    font-size: 0.9rem;
    color: #b91c1c;
}

.ds-sovereignty-chip span {
    font-size: 0.73rem;
    line-height: 1.3;
    color: #314a5a;
}

.ds-alert-card {
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(16, 34, 51, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.96));
}

.ds-alert-expandable {
    padding: 0;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ds-alert-expandable[open] {
    border-color: rgba(16, 34, 51, 0.16);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.08);
}

.ds-alert-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
}

.ds-alert-summary::-webkit-details-marker {
    display: none;
}

.ds-alert-summary-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ds-alert-area {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(16, 34, 51, 0.06);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ds-alert-summary h4 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.35;
}

.ds-alert-summary p {
    margin: 0;
    color: #5f7588;
    line-height: 1.45;
    font-size: 0.92rem;
}

.ds-alert-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(16, 34, 51, 0.06);
    color: #30485a;
    flex: 0 0 auto;
    transition: transform 0.18s ease, background 0.18s ease;
}

.ds-alert-expandable[open] .ds-alert-toggle {
    transform: rotate(180deg);
    background: rgba(16, 34, 51, 0.1);
}

.ds-alert-body {
    border-top: 1px solid rgba(16, 34, 51, 0.08);
    padding: 0 18px 16px;
}

.ds-alert-content {
    margin: 14px 0 0;
    line-height: 1.65;
    color: #4d6273;
}

.ds-alert-card[data-severity='high'] {
    border-color: rgba(220, 38, 38, 0.18);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.06);
}

.ds-alert-card[data-severity='medium'] {
    border-color: rgba(217, 119, 6, 0.18);
}

.ds-alert-card small {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(16, 34, 51, 0.06);
    font-weight: 700;
    margin-bottom: 10px;
}

.ds-alert-card h4 {
    margin: 0 0 10px;
    font-size: 1.02rem;
    font-weight: 850;
}

.ds-alert-card p {
    margin: 0;
    line-height: 1.58;
    color: #4d6273;
}

.ds-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ds-field {
    display: grid;
    gap: 8px;
}

.ds-field-full {
    grid-column: 1 / -1;
}

.ds-field label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #314d61;
}

.ds-input,
.ds-select,
.ds-textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(16, 34, 51, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 13px 14px;
    font: inherit;
    color: var(--ds-ink);
}

.ds-textarea {
    min-height: 126px;
    resize: vertical;
}

.ds-feedback {
    min-height: 24px;
    font-size: 0.92rem;
    font-weight: 700;
}

.ds-feedback.is-success {
    color: #0f766e;
}

.ds-feedback.is-error {
    color: #b91c1c;
}

.ds-table-wrap {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(16, 34, 51, 0.08);
}

.ds-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.ds-table th,
.ds-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(16, 34, 51, 0.08);
}

.ds-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #647688;
    background: rgba(16, 34, 51, 0.04);
}

.ds-table td strong {
    font-size: 1rem;
}

.ds-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
}

.ds-trend.up {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.ds-trend.down {
    background: rgba(220, 38, 38, 0.11);
    color: #b91c1c;
}

.ds-trend.stable {
    background: rgba(59, 130, 246, 0.11);
    color: #1d4ed8;
}

.ds-guide-grid,
.ds-listing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ds-guide-card,
.ds-listing-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(16, 34, 51, 0.08);
}

.ds-guide-card h4,
.ds-listing-card h4 {
    margin: 0 0 10px;
    font-size: 1.06rem;
    font-weight: 850;
}

.ds-listing-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ds-guide-card p,
.ds-listing-card p {
    margin: 0 0 12px;
    color: #4d6273;
    line-height: 1.6;
}

.ds-listing-card p {
    margin: 0;
}

.ds-listing-card-head {
    min-width: 0;
}

.ds-listing-card-head h4 {
    margin-bottom: 0;
}

.ds-icon-btn {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e;
    font-size: 1rem;
}

.ds-icon-btn:hover {
    background: rgba(15, 118, 110, 0.12);
    color: #0b5f59;
}

.ds-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ds-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 10px;
    background: rgba(16, 34, 51, 0.06);
    color: #284152;
    font-size: 0.86rem;
    font-weight: 700;
}

.ds-empty {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(16, 34, 51, 0.14);
    color: #5a6d7d;
}

.ds-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ds-modal-shell {
    border: 1px solid rgba(16, 34, 51, 0.08);
    border-radius: 24px;
    overflow: hidden;
}

.ds-modal-shell .modal-header {
    border-bottom-color: rgba(16, 34, 51, 0.08);
    background: rgba(16, 34, 51, 0.03);
}

.ds-modal-shell .modal-body {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.ds-modal-grid {
    display: grid;
    gap: 10px;
}

.ds-modal-grid strong {
    color: #1e3446;
}

.ds-footer {
    padding: 22px 6px 0;
    color: #526676;
    font-size: 0.94rem;
}

@media (max-width: 1080px) {
    .ds-hero,
    .ds-grid {
        grid-template-columns: 1fr;
    }

    .ds-guide-grid,
    .ds-listing-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ds-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 14px;
    }

    .ds-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ds-top-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        align-items: stretch;
    }

    .ds-top-actions > * {
        width: 100%;
        justify-content: center;
    }

    .ds-top-actions > .lang-switcher {
        grid-column: 1 / -1;
    }

    .ds-hero-main,
    .ds-section,
    .ds-stats {
        padding: 20px;
    }

    .ds-form-grid {
        grid-template-columns: 1fr;
    }

    #lifeMap {
        height: 420px;
    }

    .ds-alert-summary {
        padding: 15px 16px;
        gap: 12px;
    }

    .ds-alert-body {
        padding: 0 16px 15px;
    }

    .ds-alert-toggle {
        width: 34px;
        height: 34px;
    }
}
