:root {
    --kiu-green: #07A241;
    --kiu-green-dark: #058a37;
    --kiu-green-soft: #eaf6ef;
    --kiu-green-border: #d7eadc;
    --kiu-gold: #d8b24a;
    --kiu-text: #163125;
    --kiu-muted: #667a70;
    --kiu-bg: #f5faf7;
    --kiu-shadow: 0 18px 45px rgba(7, 162, 65, 0.10);
    --kiu-radius-xl: 1.75rem;
    --kiu-radius-lg: 1.25rem;
    --kiu-radius-md: 1rem;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--kiu-text);
    background:
            radial-gradient(circle at top right, rgba(7, 162, 65, 0.07), transparent 20%),
            linear-gradient(180deg, #fbfefc 0%, var(--kiu-bg) 100%);
}

a {
    text-decoration: none;
}

.text-kiu { color: var(--kiu-green) !important; }
.bg-kiu { background-color: var(--kiu-green) !important; }
.bg-kiu-soft { background-color: var(--kiu-green-soft) !important; }
.border-kiu { border-color: var(--kiu-green-border) !important; }

.btn-kiu {
    background: linear-gradient(135deg, var(--kiu-green), #0bb14a);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.9rem 1.35rem;
    box-shadow: var(--kiu-shadow);
}

.btn-kiu:hover,
.btn-kiu:focus {
    background: linear-gradient(135deg, var(--kiu-green-dark), var(--kiu-green));
    color: #fff;
}

.btn-kiu-outline {
    border: 1px solid var(--kiu-green-border);
    color: var(--kiu-green-dark);
    background: #fff;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.9rem 1.35rem;
}

.btn-kiu-outline:hover {
    background: var(--kiu-green-soft);
    color: var(--kiu-green-dark);
}

.topbar {
    background: var(--kiu-green-dark);
    color: rgba(255,255,255,0.88);
    font-size: 0.92rem;
}

.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(7, 162, 65, 0.08);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--kiu-green), var(--kiu-green-dark));
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    box-shadow: var(--kiu-shadow);
    flex-shrink: 0;
}

.brand-stack {
    min-width: 0;
    line-height: 1.1;
}

.brand-stack strong {
    display: block;
    color: var(--kiu-green-dark);
    font-size: 1rem;
}

.brand-stack span {
    display: block;
    color: var(--kiu-muted);
    font-size: 0.88rem;
}

.navbar .nav-link {
    color: #294739;
    font-weight: 600;
    padding-left: 0.95rem !important;
    padding-right: 0.95rem !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--kiu-green);
}

.hero-section {
    padding: 3rem 0 1.5rem;
}

.hero-card,
.portal-card,
.job-card,
.category-card,
.step-card,
.cta-card,
.news-card,
.stat-card {
    border: 1px solid rgba(7, 162, 65, 0.08);
    border-radius: var(--kiu-radius-xl);
    box-shadow: var(--kiu-shadow);
    background: rgba(255,255,255,0.96);
}

.hero-card {
    background:
            radial-gradient(circle at top right, rgba(216,178,74,0.16), transparent 24%),
            linear-gradient(135deg, rgba(12,107,61,0.98), rgba(8,75,43,0.97));
    color: #fff;
    padding: 2.5rem;
    min-height: 100%;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -95px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1.02;
    font-weight: 800;
    margin-bottom: 1rem;
    max-width: 760px;
}

.hero-text {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.88);
    max-width: 700px;
    margin-bottom: 1.4rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.92);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0.5rem 0.5rem 0;
}

.search-panel {
    margin-top: 1.8rem;
    background: rgba(255,255,255,0.98);
    border-radius: 1.5rem;
    padding: 1rem;
}

.search-panel .form-label {
    font-size: 0.8rem;
    color: #4e675b;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.search-panel .form-control,
.search-panel .form-select {
    min-height: 52px;
    border-radius: 0.95rem;
    border-color: var(--kiu-green-border);
    box-shadow: none;
}

.search-panel .form-control:focus,
.search-panel .form-select:focus {
    border-color: rgba(7, 162, 65, 0.35);
    box-shadow: 0 0 0 0.2rem rgba(7, 162, 65, 0.10);
}

.portal-card {
    padding: 1.5rem;
    height: auto;
    min-height: 0;
}

.card-title-lg {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--kiu-green-dark);
    margin-bottom: 0.5rem;
}

.muted-text {
    color: var(--kiu-muted);
    line-height: 1.7;
}

.mini-stat {
    background: var(--kiu-green-soft);
    border-radius: 1rem;
    padding: 1rem;
    height: 100%;
}

.mini-stat strong,
.stat-card strong {
    display: block;
    color: var(--kiu-green-dark);
    font-weight: 800;
}

.mini-stat strong {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border: 1px solid var(--kiu-green-border);
    background: #fbfefc;
    border-radius: 1rem;
    padding: 0.9rem;
    margin-top: 0.9rem;
    min-width: 0;
}

.feature-icon,
.job-logo,
.category-icon,
.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.95rem;
    display: grid;
    place-items: center;
    background: var(--kiu-green-soft);
    color: var(--kiu-green-dark);
    font-weight: 800;
    flex-shrink: 0;
}

.section-block {
    padding: 1.8rem 0 4rem;
    position: relative;
    z-index: 1;
}

.section-kicker {
    display: inline-block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--kiu-green);
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.section-title {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--kiu-green-dark);
    margin-bottom: 0.75rem;
}

.section-text {
    color: var(--kiu-muted);
    line-height: 1.7;
    max-width: 780px;
}

.stat-card,
.job-card,
.category-card,
.step-card,
.cta-card,
.news-card {
    padding: 1.5rem;
    height: 100%;
}

.stat-card strong {
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    margin-bottom: 0.35rem;
}

.job-card h3,
.category-card h3,
.news-card h3 {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--kiu-green-dark);
    margin-bottom: 0.45rem;
}

.job-card .company,
.news-meta {
    color: var(--kiu-muted);
    font-size: 0.95rem;
}

.job-meta .badge,
.category-tags .badge {
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-weight: 700;
    font-size: 0.78rem;
}

.badge-soft-kiu {
    background: var(--kiu-green-soft);
    color: var(--kiu-green-dark);
}

.badge-soft-gold {
    background: #fff5d8;
    color: #8a6a13;
}

.job-card p,
.category-card p,
.step-card p,
.news-card p,
.cta-card p {
    color: var(--kiu-muted);
    line-height: 1.7;
}

.step-card {
    text-align: left;
}

.step-number {
    color: rgba(7, 162, 65, 0.18);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.65rem;
}

.cta-card {
    background:
            radial-gradient(circle at top right, rgba(216,178,74,0.16), transparent 20%),
            linear-gradient(135deg, #ffffff, #f4fbf6);
}

.footer-portal {
    position: relative;
    clear: both;
    margin-top: 2rem;
    background: var(--kiu-green-dark);
    color: rgba(255,255,255,0.84);
    padding: 3rem 0 1.5rem;
    z-index: 0;
}

.footer-portal h5 {
    color: #fff;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-portal a {
    color: rgba(255,255,255,0.84);
}

.footer-portal a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.10);
    margin-top: 1.5rem;
    padding-top: 1rem;
    font-size: 0.92rem;
}

@media (max-width: 991.98px) {
    .hero-card,
    .portal-card {
        border-radius: 1.5rem;
    }

    .navbar-collapse {
        padding-top: 1rem;
    }

    .nav-cta-mobile {
        padding-top: 0.75rem;
    }
}

.kiu-navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(7, 162, 65, 0.08);
    backdrop-filter: blur(10px);
}

.kiu-navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.kiu-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-right: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 68px);
    text-decoration: none;
}

.kiu-navbar-logo {
    height: 52px;
    width: auto;
    flex: 0 0 auto;
    display: block;
}

.brand-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.1;
}

.brand-stack strong {
    margin: 0;
    color: var(--kiu-green-dark);
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-stack span {
    color: var(--kiu-muted);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kiu-navbar-toggler {
    flex: 0 0 auto;
    margin-left: 0.75rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--kiu-green-border);
    border-radius: 0.85rem;
    box-shadow: none !important;
}

.kiu-navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(7, 162, 65, 0.12) !important;
    border-color: rgba(7, 162, 65, 0.28);
}

.kiu-navbar-collapse {
    flex-basis: 100%;
}

.kiu-navbar .nav-link {
    color: #294739;
    font-weight: 600;
    padding-left: 0.95rem !important;
    padding-right: 0.95rem !important;
}

.kiu-navbar .nav-link:hover,
.kiu-navbar .nav-link.active {
    color: var(--kiu-green);
}

.kiu-nav-cta {
    padding-top: 0.75rem;
}

@media (max-width: 1199.98px) {
    .kiu-navbar-collapse {
        padding-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .kiu-navbar-logo {
        height: 44px;
    }

    .kiu-navbar-brand {
        max-width: calc(100% - 62px);
        gap: 0.65rem;
    }

    .brand-stack strong {
        font-size: 0.92rem;
    }

    .brand-stack span {
        font-size: 0.78rem;
    }

    .kiu-navbar-toggler {
        margin-left: 0.5rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 399.98px) {
    .kiu-navbar-logo {
        height: 40px;
    }

    .brand-stack strong {
        font-size: 0.84rem;
    }

    .brand-stack span {
        font-size: 0.72rem;
    }
}

/* Guidelines page fixes */
.row.guideline-shell {
    align-items: flex-start;
}

.guideline-shell,
.guideline-shell * {
    min-width: 0;
    box-sizing: border-box;
}

.guideline-main-col,
.guideline-side-col {
    min-width: 0;
}

.portal-card.guideline-card,
.guideline-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    height: auto;
}

.guideline-card + .guideline-card {
    margin-top: 1.5rem;
}

.guideline-content {
    display: block;
    width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.guideline-content::after {
    content: "";
    display: block;
    clear: both;
}

.guideline-content > * {
    max-width: 100%;
}

.guideline-content > *:last-child {
    margin-bottom: 0;
}

.guideline-content img,
.guideline-content iframe,
.guideline-content video,
.guideline-content canvas,
.guideline-content svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.guideline-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guideline-content pre,
.guideline-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.guideline-content ul,
.guideline-content ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.guideline-content p,
.guideline-content li,
.guideline-content blockquote,
.guideline-content a,
.guideline-content span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.guideline-reminder-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guideline-reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
}

.guideline-reminder-item .feature-icon {
    flex: 0 0 44px;
}

.guideline-reminder-body {
    flex: 1 1 auto;
    min-width: 0;
}

.guideline-reminder-body strong,
.guideline-reminder-body span {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.guideline-sticky {
    position: sticky;
    top: 110px;
    align-self: flex-start;
}

@media (max-width: 991.98px) {
    .guideline-sticky {
        position: static;
        top: auto;
    }
}

/* =========================
   TOAST SYSTEM (REFINED)
========================= */

.kiu-toast-stack {
    position: fixed;
    top: 88px;
    right: 18px;
    z-index: 1080;

    display: flex;
    flex-direction: column;
    gap: 0.85rem;

    width: min(380px, calc(100vw - 24px));
    pointer-events: none;
}

/* Toast Card */
.kiu-toast {
    pointer-events: auto;

    display: flex;
    align-items: flex-start;
    gap: 0.85rem;

    padding: 1rem 1rem 1rem 0.95rem;

    border-radius: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);

    color: var(--kiu-text);

    transform: translateY(-12px) scale(0.98);
    opacity: 0;

    transition:
            opacity 0.25s ease,
            transform 0.25s ease;

    overflow: hidden;
    position: relative;
}

/* Show state */
.kiu-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hide state */
.kiu-toast.hide {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

/* Left accent bar */
.kiu-toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--kiu-green);
}

/* Variants */
.kiu-toast-success::before { background: #159f52; }
.kiu-toast-error::before,
.kiu-toast-danger::before { background: #dc3545; }
.kiu-toast-warning::before { background: #d8a106; }
.kiu-toast-info::before { background: #0d6efd; }

/* Icon */
.kiu-toast-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: grid;
    place-items: center;

    border-radius: 0.9rem;
    font-weight: 800;
    font-size: 0.82rem;

    background: var(--kiu-green-soft);
    color: var(--kiu-green-dark);
}

/* Variant icons */
.kiu-toast-success .kiu-toast-icon {
    background: #eaf7ef;
    color: #159f52;
}

.kiu-toast-error .kiu-toast-icon,
.kiu-toast-danger .kiu-toast-icon {
    background: #fdecec;
    color: #dc3545;
}

.kiu-toast-warning .kiu-toast-icon {
    background: #fff7df;
    color: #a67c00;
}

.kiu-toast-info .kiu-toast-icon {
    background: #e8f1ff;
    color: #0d6efd;
}

/* Body */
.kiu-toast-body {
    min-width: 0;
    flex: 1 1 auto;
}

/* Title */
.kiu-toast-title {
    display: block;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--kiu-text);
    margin-bottom: 0.2rem;
}

/* Message (IMPORTANT FIX) */
.kiu-toast-message {
    margin: 0;
    color: var(--kiu-muted);
    line-height: 1.55;

    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Close button */
.kiu-toast-close {
    border: none;
    background: transparent;
    color: var(--kiu-muted);

    padding: 0;
    margin: 0;

    line-height: 1;
    font-size: 1.05rem;
    cursor: pointer;

    flex: 0 0 auto;
}

.kiu-toast-close:hover {
    color: var(--kiu-text);
}

/* Mobile */
@media (max-width: 575.98px) {
    .kiu-toast-stack {
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* =========================
   KIU PAGINATION
========================= */

.kiu-pagination-wrap {
    width: 100%;
}

.kiu-pagination {
    gap: 0.4rem;
    padding: 0.45rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(7, 162, 65, 0.06);
    flex-wrap: wrap;
}

.kiu-pagination .page-item {
    margin: 0;
}

.kiu-pagination .page-link {
    min-width: 42px;
    height: 42px;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--kiu-green-border);
    background: #fff;
    color: var(--kiu-green-dark);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    box-shadow: none;
}

.kiu-pagination .page-link:hover {
    background: var(--kiu-green-soft);
    border-color: rgba(7, 162, 65, 0.35);
    color: var(--kiu-green-dark);
}

.kiu-pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(7, 162, 65, 0.14);
    border-color: rgba(7, 162, 65, 0.35);
}

.kiu-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--kiu-green), #0bb14a);
    border-color: var(--kiu-green);
    color: #fff;
    box-shadow: var(--kiu-shadow);
}

.kiu-pagination .page-item.disabled .page-link {
    background: #f4f8f5;
    color: #9ab0a4;
    border-color: var(--kiu-green-border);
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .kiu-pagination {
        gap: 0.3rem;
        padding: 0.35rem;
    }

    .kiu-pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 0 0.8rem;
        font-size: 0.88rem;
    }
}
