:root {
    --ss-primary: #1a73e8;
    --ss-primary-dark: #0f3f83;
    --ss-accent: #22c55e;
    --ss-warning: #f59e0b;
    --ss-danger: #ef4444;
    --ss-ink: #1f2937;
    --ss-muted: #6b7280;
    --ss-border: #e5eaf3;
    --ss-bg: #f5f7fb;
    --ss-sidebar: #162033;
}

* { box-sizing: border-box; }

body.portal-body {
    min-height: 100vh;
    background: #f5f7fb;
    color: var(--ss-ink);
    font-family: "Public Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
}

.portal-body .page-inner {
    font-size: 16px;
}

.portal-body .page-inner .table,
.portal-body .page-inner .form-control,
.portal-body .page-inner .form-select,
.portal-body .page-inner .form-label,
.portal-body .page-inner .card-body,
.portal-body .page-inner .card-category,
.portal-body .page-inner .modal-body,
.portal-body .page-inner .btn {
    font-size: 15px;
}

.portal-body .page-inner .card-title,
.portal-body .page-inner h3.fw-bold {
    font-size: 1.35rem;
}

.portal-body .page-inner h6.op-7 {
    font-size: 1rem;
}

.portal-body .page-inner .card {
    margin-bottom: 0;
}

.portal-body .page-inner > .row + .row,
.portal-body .page-inner > .row + .alert,
.portal-body .page-inner > .alert + .row {
    margin-top: 1.5rem;
}

.portal-body .chart-container {
    min-height: 220px;
    position: relative;
}

h1, h2, h3, h4, h5, h6,
.page-title,
.card-title,
.nav-section h4,
.portal-card-header h2 {
    font-family: "Poppins", "Inter", sans-serif;
}

.portal-logo {
    max-width: 176px;
    height: auto;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.04em;
    margin-bottom: 4px;
}

.page-subtitle { color: var(--ss-muted); margin: 0; }

.portal-card {
    background: #fff;
    border: 1px solid var(--ss-border);
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}

.portal-card-header { padding: 20px 22px 0; }
.portal-card-body { padding: 22px; }

.stat-card { min-height: 126px; overflow: hidden; position: relative; }

.stat-card::after {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -28px;
    top: -28px;
    border-radius: 999px;
    background: rgba(26, 115, 232, .09);
}

.portal-stat-card {
    transition: box-shadow .2s ease, transform .2s ease;
}

.portal-stat-link {
    color: inherit;
    display: block;
    height: 100%;
    text-decoration: none;
}

.portal-stat-link:hover,
.portal-stat-link:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}

.portal-stat-link:focus-visible {
    outline: 3px solid rgba(26, 115, 232, .28);
    outline-offset: 3px;
}

.stat-label {
    color: var(--ss-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.04em;
    margin-top: 8px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--ss-primary), #60a5fa);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f3f83;
    background: #e0ecff;
    text-transform: capitalize;
}

.status-pill.success { color: #166534; background: #dcfce7; }
.status-pill.warning { color: #92400e; background: #fef3c7; }
.status-pill.danger { color: #991b1b; background: #fee2e2; }

.table.portal-table { margin-bottom: 0; }

.portal-table thead th {
    color: var(--ss-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ss-border);
}

.portal-table td,
.portal-table th {
    padding: 14px 12px;
    vertical-align: middle;
}

.form-control,
.form-select {
    border-color: #d8e3f4;
    border-radius: 12px;
    font-size: 15px;
    min-height: 46px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ss-primary);
    box-shadow: 0 0 0 .2rem rgba(26, 115, 232, .14);
}

.btn {
    border-radius: 6px;
    font-weight: 700;
}

.btn-primary {
    background: var(--ss-primary);
    border-color: var(--ss-primary);
    box-shadow: 0 8px 18px rgba(26, 115, 232, .18);
}

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

.btn-soft-primary {
    color: var(--ss-primary);
    background: #e0ecff;
    border: 0;
}

.btn-soft-danger {
    color: #991b1b;
    background: #fee2e2;
    border: 0;
}

.public-header {
    position: relative;
    z-index: 2;
    padding: 22px 0;
}

.public-header-inner {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.public-brand {
    align-items: center;
    background: #fff;
    border-radius: 12px;
    display: inline-flex;
    padding: 8px 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.public-brand img {
    height: 48px;
    width: auto;
}

.public-nav {
    align-items: center;
    display: flex;
    gap: 18px;
}

.public-nav a:not(.btn) {
    color: #e7fff5;
    font-weight: 700;
    text-decoration: none;
}

.public-nav a:not(.btn):hover,
.public-nav a:not(.btn):focus {
    color: #fff;
}

.portal-body .public-header {
    background: #062f35;
}

.public-footer {
    background: #05262b;
    color: #c9e7df;
    padding: 34px 0 22px;
}

.public-footer-inner {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
}

.public-footer-brand {
    max-width: 340px;
}

.public-footer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    margin-bottom: 12px;
}

.public-footer-links,
.public-footer-list {
    display: grid;
    gap: 8px;
}

.public-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.public-footer-social a {
    align-items: center;
    background: rgba(201, 231, 223, .12);
    border-radius: 999px;
    display: inline-flex;
    font-size: 16px;
    gap: 0;
    height: 36px;
    justify-content: center;
    overflow: hidden;
    padding: 0 10px;
    transition: background .2s ease, color .2s ease, gap .2s ease;
    white-space: nowrap;
    width: 36px;
}

.public-footer-social a span {
    font-size: 13px;
    font-weight: 600;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width .2s ease, opacity .2s ease;
}

.public-footer a {
    color: #c9e7df;
    text-decoration: none;
}

.public-footer a:hover,
.public-footer a:focus {
    color: #fff;
}

.public-footer .public-footer-social a:hover,
.public-footer .public-footer-social a:focus {
    background: rgba(26, 115, 232, .18);
    color: var(--ss-primary);
    gap: 8px;
    width: auto;
}

.public-footer .public-footer-social a:hover span,
.public-footer .public-footer-social a:focus span {
    max-width: 80px;
    opacity: 1;
}

.public-footer-bottom {
    border-top: 1px solid rgba(201, 231, 223, .18);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 18px;
    font-size: 13px;
}

.login-shell {
    min-height: calc(100vh - 154px);
    display: grid;
    grid-template-columns: minmax(420px, 500px) 1fr;
    background:
        linear-gradient(90deg, rgba(245, 247, 251, .98) 0%, rgba(245, 247, 251, .92) 42%, rgba(15, 23, 42, .35) 100%),
        url("../images/leog-office.svg") center/cover no-repeat;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
}

.login-card {
    width: 100%;
    max-width: 430px;
}

.login-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    background: transparent;
}

.login-visual-bg {
    min-height: 100vh;
    align-items: end;
    justify-content: center;
    padding-bottom: 72px;
}

.login-visual img {
    max-width: 640px;
    width: 100%;
}

.landing-body {
    min-height: 100vh;
    font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #062f35;
}

.landing-hero {
    position: relative;
    min-height: 100vh;
    color: #f8fafc;
    background:
        linear-gradient(135deg, rgba(6, 47, 53, .94), rgba(20, 99, 83, .82) 52%, rgba(126, 82, 25, .58)),
        url("../images/leog-office.svg") center/cover no-repeat;
    overflow: hidden;
}

.landing-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 22, 27, .12), rgba(6, 22, 27, .56)),
        radial-gradient(circle at 18% 18%, rgba(63, 185, 132, .26), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(250, 204, 21, .14), transparent 28%);
}

.min-vh-75 {
    min-height: 75vh;
}

.landing-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .98;
    font-weight: 400;
    letter-spacing: 0;
    max-width: 840px;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .22);
}

.landing-copy {
    max-width: 720px;
    color: #d9f6ea;
    font-size: 1.1rem;
    line-height: 1.8;
}

.landing-card {
    background: rgba(255, 253, 247, .96);
    border-color: rgba(215, 231, 222, .86);
    color: #14332c;
    backdrop-filter: blur(10px);
}

.landing-card .text-muted,
#features .portal-card .text-muted {
    color: #5f746f !important;
}

#features .portal-card {
    background: #fffdf7;
    border-color: #dbe7de;
    color: #14332c;
}

.kaiadmin-hero-card {
    overflow: hidden;
    border: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #eaf3ff 100%);
}

.kaiadmin-hero-img {
    max-width: 260px;
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(21, 114, 232, .14);
}

.sidebar .logo-header .logo {
    max-width: 190px;
}

.avatar-initials {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #e0ecff;
    color: var(--ss-primary);
    font-weight: 800;
}

.empty-state {
    padding: 42px;
    text-align: center;
    color: var(--ss-muted);
}

.portal-card .card-title,
.portal-card h1,
.portal-card h2,
.portal-card h3,
.portal-card h4,
.portal-card h5 {
    letter-spacing: -.02em;
}

.product-photo-upload {
    position: relative;
}

.product-photo-dropzone {
    min-height: 220px;
    border: 2px dashed #b8c8dd;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--ss-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 18px;
    position: relative;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.product-photo-input {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.product-photo-preview-panel {
    background: #fff;
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    margin-top: 0;
    padding: 14px;
    width: 100%;
}

.product-photo-preview {
    background: #f8fbff;
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    display: block;
    max-height: 360px;
    min-height: 220px;
    object-fit: contain;
    width: 100%;
}

.product-photo-meta {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 12px;
}

.product-photo-name {
    color: var(--ss-ink);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-photo-dropzone:hover,
.product-photo-dropzone.is-dragging {
    background: #eef6ff;
    border-color: var(--ss-primary);
    box-shadow: 0 0 0 .2rem rgba(26, 115, 232, .1);
}

.product-photo-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-photo-empty i {
    color: var(--ss-primary);
    font-size: 34px;
}

.portal-table tbody tr:hover {
    background: #f8fbff;
}

.sidebar-logout {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    padding: 10px 25px;
    font-size: 14px;
    text-align: left;
}

.sidebar-logout i {
    width: 25px;
    margin-right: 15px;
    font-size: 18px;
}

.sidebar-logout p {
    margin: 0;
    font-weight: 400;
}

.sidebar .nav .nav-section .text-section {
    font-weight: 400;
}

.sidebar .nav > .nav-item a p,
.sidebar .nav > .nav-item.active > a p,
.sidebar .nav > .nav-item a:hover p,
.sidebar .nav > .nav-item a:focus p {
    font-weight: 400 !important;
}

.sidebar-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.main-header .navbar-header {
    min-height: 70px;
}

.page-inner {
    padding-top: 24px;
}

@media (min-width: 992px) {
    .main-header .main-header-logo {
        display: none;
    }
}

.card.card-stats.card-round {
    border-radius: 5px;
}

.card-stats .card-category {
    font-weight: 600;
}

.card-stats .card-title {
    font-weight: 800;
    letter-spacing: -.03em;
}

.evidence-box {
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 14px;
}

@media (max-width: 991.98px) {
    .public-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-footer-inner {
        grid-template-columns: 1fr;
    }

    .public-footer-bottom {
        flex-direction: column;
    }

    .public-nav {
        justify-content: space-between;
        width: 100%;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 32px 18px;
    }

    .login-visual {
        display: none;
    }
}
