:root {
    --sn-primary: #1f33c9;
    --sn-primary-dark: #17279a;
    --sn-primary-soft: #e8ebff;
    --sn-lavender: #f4f1ff;
    --sn-mint: #dff6ec;
    --sn-warning-soft: #fff1d8;
    --sn-text: #1b2550;
    --sn-muted: #586286;
    --sn-border: #dce2f3;
    --sn-card-radius: 20px;
    --sn-shadow: 0 10px 28px rgba(20, 33, 84, 0.08);
}

body {
    background: linear-gradient(180deg, #fbfcff 0%, #f7f8ff 100%);
    color: var(--sn-text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

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

.navbar {
    background: #fff;
    border-color: var(--sn-border) !important;
}

.navbar-brand {
    color: var(--sn-primary) !important;
    line-height: 1;
    padding: 0;
}

.slangnesia-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
}

.brand-mark {
    height: 46px;
    width: auto;
    display: block;
}

.brand-text {
    color: var(--sn-primary);
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.footer-brand-mark {
    height: 40px;
    width: auto;
    display: block;
}

.footer-brand-text {
    color: var(--sn-primary);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
}

.nav-link {
    color: var(--sn-text);
    font-weight: 600;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
    color: var(--sn-primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0;
    height: 2px;
    background: var(--sn-primary);
    border-radius: 12px;
}

.hero-section {
    border: 1px solid var(--sn-border);
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(101, 112, 255, 0.15), transparent 40%),
        linear-gradient(145deg, #fbfbff 0%, var(--sn-lavender) 100%);
    box-shadow: var(--sn-shadow);
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0f1c5c;
}

.card,
.form-control,
.form-select,
.btn,
.alert,
.pagination .page-link {
    border-radius: var(--sn-card-radius);
}

.surface-card,
.slang-card,
.search-rows-card {
    border: 1px solid var(--sn-border);
    background: #fff;
    box-shadow: var(--sn-shadow);
}

.slang-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slang-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(20, 33, 84, 0.12);
}

.slang-card .card-body {
    padding: 1.3rem;
}

.btn {
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(31, 51, 201, 0.16);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    background: var(--sn-primary);
    border-color: var(--sn-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--sn-primary-dark);
    border-color: var(--sn-primary-dark);
}

.btn-outline-primary {
    color: var(--sn-primary);
    border-color: var(--sn-primary);
}

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

.form-control,
.form-select {
    border-color: var(--sn-border);
    color: var(--sn-text);
    padding: 0.72rem 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sn-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 51, 201, 0.12);
}

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

.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.44rem 0.78rem;
}

.badge-soft-primary {
    color: #2740c8;
    background: #ebeefe;
}

.badge-soft-success {
    color: #0e7a4a;
    background: var(--sn-mint);
}

.badge-soft-warning {
    color: #96620b;
    background: var(--sn-warning-soft);
}

.badge-soft-danger {
    color: #c03d50;
    background: #fde3e8;
}

.badge-soft-secondary {
    color: #425175;
    background: #edf1fb;
}

.badge-soft-info {
    color: #22738b;
    background: #def3ff;
}

.tag-pill {
    background: #f3f5ff;
    border: 1px solid var(--sn-border);
    color: #3b4880;
}

.live-suggest-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 1050;
    border: 1px solid var(--sn-border);
    border-radius: 14px;
    max-height: 18rem;
    overflow-y: auto;
    background: #fff;
    box-shadow: var(--sn-shadow);
}

.category-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid var(--sn-border);
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--sn-shadow);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: var(--sn-text);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(20, 33, 84, 0.12);
    border-color: #c9d4f4;
}

.category-tile .icon-wrap {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sn-primary-soft);
    color: var(--sn-primary);
    font-size: 1.2rem;
}

.value-band {
    border: 1px solid var(--sn-border);
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f2f4ff 100%);
    box-shadow: var(--sn-shadow);
}

.value-visual {
    min-height: 180px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(31, 51, 201, 0.18), transparent 50%),
        linear-gradient(145deg, var(--sn-primary-soft) 0%, #fff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sn-primary);
    font-size: 4rem;
}

.value-visual-image {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 14px;
}

.value-item {
    border-left: 1px solid var(--sn-border);
    padding-left: 1rem;
}

.search-hero {
    border: 1px solid var(--sn-border);
    border-radius: 24px;
    background: radial-gradient(circle at right, rgba(101, 112, 255, 0.15), transparent 35%),
        linear-gradient(145deg, #fbfbff 0%, var(--sn-lavender) 100%);
}

.result-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sn-border);
    transition: background-color 0.2s ease;
}

.result-row:hover {
    background: #fafbff;
}

.result-row:last-child {
    border-bottom: none;
}

.result-initial {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: var(--sn-primary-soft);
    color: var(--sn-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.result-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sidebar-card {
    border: 1px solid var(--sn-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--sn-shadow);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.2rem;
}

.detail-main-card,
.detail-side-card {
    border: 1px solid var(--sn-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--sn-shadow);
}

.detail-main-card .card-body,
.detail-side-card .card-body {
    padding: 1.5rem;
}

.detail-section-title {
    font-size: 1.06rem;
    font-weight: 700;
}

.standard-box {
    border: 1px solid #9dd9b8;
    background: #eefaf3;
    border-radius: 14px;
}

.note-box {
    border: 1px solid #b8ccff;
    background: #f3f7ff;
    border-radius: 14px;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--sn-muted);
}

.footer-link:hover {
    color: var(--sn-primary);
}

.auth-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.profile-avatar-lg {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--sn-border);
    box-shadow: var(--sn-shadow);
}

.profile-avatar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--sn-border);
}

.profile-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sn-primary-soft);
    color: var(--sn-primary);
    font-weight: 800;
    border: 1px solid var(--sn-border);
}

.review-import-table table {
    min-width: 2800px;
}

.review-import-table th,
.review-import-table td {
    vertical-align: top;
    white-space: normal;
    background: #fff;
}

.review-import-table td {
    min-width: 88px;
}

.review-import-table th:nth-child(1),
.review-import-table td:nth-child(1) {
    position: sticky;
    left: 0;
    min-width: 64px;
    width: 64px;
    z-index: 4;
}

.review-import-table th:nth-child(2),
.review-import-table td:nth-child(2) {
    position: sticky;
    left: 64px;
    min-width: 72px;
    width: 72px;
    z-index: 4;
}

.review-import-table th:nth-child(3),
.review-import-table td:nth-child(3) {
    position: sticky;
    left: 136px;
    min-width: 96px;
    width: 96px;
    z-index: 4;
    box-shadow: 10px 0 12px -10px rgba(26, 43, 89, 0.14);
}

.review-import-table thead th:nth-child(1),
.review-import-table thead th:nth-child(2),
.review-import-table thead th:nth-child(3) {
    z-index: 5;
}

.review-import-table .form-check-input {
    margin-top: 0.45rem;
}

.review-import-table .import-field {
    width: 100%;
}

.review-import-table textarea.import-field {
    resize: vertical;
    line-height: 1.45;
}

.review-import-table .import-field-compact {
    min-height: 72px;
    max-height: 120px;
}

.review-import-table .import-field-sm {
    min-width: 140px;
}

.review-import-table .import-field-md {
    min-width: 200px;
}

.review-import-table .import-field-lg {
    min-width: 260px;
}

.review-import-table .import-field-xl {
    min-width: 320px;
}

.review-import-table .import-field-select {
    min-width: 170px;
}

.review-import-table .review-validation-box {
    min-width: 260px;
    max-width: 320px;
    max-height: 120px;
    overflow: auto;
    line-height: 1.45;
}

.review-import-table .review-validation-box ul {
    padding-right: 0.5rem;
}

/* Subtle load animation for core sections and cards */
main > section,
.detail-main-card,
.detail-side-card,
.search-rows-card,
.sidebar-card,
.surface-card,
.value-band,
.slang-card {
    animation: sn-fade-up 0.45s ease both;
}

.row > div:nth-child(1) .slang-card,
.row > div:nth-child(1) .category-tile {
    animation-delay: 0.03s;
}

.row > div:nth-child(2) .slang-card,
.row > div:nth-child(2) .category-tile {
    animation-delay: 0.06s;
}

.row > div:nth-child(3) .slang-card,
.row > div:nth-child(3) .category-tile {
    animation-delay: 0.09s;
}

.row > div:nth-child(4) .slang-card,
.row > div:nth-child(4) .category-tile {
    animation-delay: 0.12s;
}

@keyframes sn-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 991.98px) {
    .brand-mark {
        height: 36px;
    }

    .brand-text {
        font-size: 1.45rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .value-item {
        border-left: 0;
        border-top: 1px solid var(--sn-border);
        padding-top: 1rem;
        padding-left: 0;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.95rem;
    }

    .result-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .result-initial {
        width: 2.5rem;
        height: 2.5rem;
    }

    .result-action {
        width: 100%;
    }

    .result-action .btn {
        width: 100%;
    }

    .btn {
        min-height: 44px;
    }
}
