* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

body:not(.home-page):not(.portal-page) {
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.portal-page {
    display: block;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #1B7F5C;
    text-decoration: none;
}

.nav-logo-img {
    width: 50px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1B7F5C;
}

.nav-auth-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-btn-login,
.nav-btn-signup,
.btn-signup-home,
.card-btn,
.submit-btn {
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn-login {
    background: #fff;
    border: 1px solid #001F3F;
    border-radius: 12px;
    color: #001F3F;
    padding: 10px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 31, 63, 0.12);
}

.nav-btn-signup {
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    border: 1px solid transparent;
    border-radius: 12px;
    color: white;
    padding: 10px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(27, 127, 92, 0.3);
}

.hero {
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
    padding: 100px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 228, 212, 0.25) 0%, rgba(127, 228, 212, 0) 72%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 18px;
    opacity: 0.9;
}

.hero-content h1 {
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.home-shell,
.portal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.purpose-section,
.roles-section,
.journey-section,
.score-section,
.dashboard-overview,
.dashboard-details,
.workspace-section {
    padding: 90px 30px;
}

.purpose-section,
.score-section,
.dashboard-details {
    background: #f5f7fa;
}

.roles-section,
.dashboard-overview,
.workspace-section {
    background: white;
}

.journey-section {
    background: linear-gradient(180deg, #f9fbfb 0%, #eef5f3 100%);
}

.section-header {
    max-width: 860px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-header-left {
    max-width: 760px;
    margin: 0 0 40px;
    text-align: left;
}

.section-header h2 {
    font-size: 42px;
    color: #1c2533;
    margin-bottom: 16px;
    line-height: 1.15;
}

.section-header p:last-child {
    color: #566274;
    font-size: 17px;
    line-height: 1.8;
}

.section-label {
    color: #1B7F5C;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-label-light {
    color: #7FE4D4;
}

.purpose-grid,
.journey-grid,
.stats-grid,
.dashboard-grid,
.workspace-grid,
.role-grid,
.score-layout {
    display: grid;
}

.purpose-grid,
.journey-grid,
.stats-grid,
.dashboard-grid,
.workspace-grid {
    gap: 28px;
}

.purpose-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.role-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.journey-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.score-layout {
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 32px;
    align-items: start;
}

.info-panel,
.role-card,
.journey-step,
.input-card,
.stat-card,
.detail-card,
.workspace-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #dbe6e2;
    box-shadow: 0 20px 45px rgba(12, 33, 55, 0.08);
}

.info-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
}

.info-panel h3,
.role-card h3,
.journey-step h3,
.input-card h3,
.stat-card h3,
.detail-card h3,
.workspace-card h3 {
    color: #1c2533;
    margin-bottom: 14px;
    font-size: 24px;
}

.info-panel p,
.role-card p,
.journey-step p,
.input-card p,
.stat-card p,
.detail-card p,
.workspace-card p {
    color: #5e6a7b;
    line-height: 1.75;
}

.role-tag,
.workspace-tag,
.card-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(27, 127, 92, 0.1);
    color: #1B7F5C;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.role-list,
.workspace-list {
    margin-top: 22px;
    padding-left: 20px;
    color: #334155;
    line-height: 1.8;
}

.compact-list {
    margin-top: 18px;
}

.journey-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.journey-step {
    position: relative;
    overflow: hidden;
    text-align: left;
}

.journey-step .journey-number {
    position: absolute;
    top: 0;
    right: 0;
    width: 92px;
    height: 92px;
    border-radius: 0;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px 12px 0 0;
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    line-height: 1;
    z-index: 1;
}

.journey-step h3 {
    padding-right: 88px;
}

.journey-step p {
    padding-right: 14px;
}

.risk-scale {
    display: grid;
    gap: 18px;
}

.risk-band {
    border-radius: 22px;
    padding: 26px 28px;
    color: #173042;
}

.risk-range {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.risk-band h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.risk-band p {
    line-height: 1.7;
}

.high-risk {
    background: #ff8b77;
    border: 1px solid red;
}

.medium-risk {
    background: hsl(40, 100%, 70%);
    border: 1px solid orangered;
}

.low-risk {
    background: #3ff6b9;
    border: 1px solid green;
}

.access-section {
    padding: 0 30px 90px;
    background: #f5f7fa;
}

.access-banner {
    background: linear-gradient(135deg, #0f3d4d 0%, #001F3F 100%);
    color: white;
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 24px 50px rgba(0, 31, 63, 0.18);
}

.access-banner-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px 36px;
}

.access-banner-copy {
    min-width: 0;
}

.access-banner h2 {
    font-size: 38px;
    margin-bottom: 18px;
    line-height: 1.15;
}

.access-banner p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    line-height: 1.8;
}

.btn-signup-home {
    background: linear-gradient(135deg, #1B7F5C 0%, #0f4f60 100%);
    border: 1px solid white;
    border-radius: 12px;
    color: white;
    padding: 12px 50px;
    margin: 20px 0 -10px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-signup-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.portal-hero {
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
    padding: 80px 30px;
    text-align: center;
}

.portal-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.portal-hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.portal-hero-content p {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.6;
}

.seller-hero {
    background: linear-gradient(135deg, #7FE4D4 0%, #1B7F5C 100%);
}

.user-hero {
    background: linear-gradient(135deg, #103f4f 0%, #001F3F 100%);
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #1B7F5C 0%, #7FE4D4 100%);
}

.stat-value {
    display: block;
    font-size: 46px;
    font-weight: 700;
    color: #1B7F5C;
    margin-bottom: 16px;
}

.stat-value.is-empty {
    font-size: 22px;
    color: #5e6a7b;
    line-height: 1.3;
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}

.detail-list {
    list-style: none;
    display: grid;
    gap: 16px;
}

.detail-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e3ece8;
    color: #425062;
    line-height: 1.6;
}

.detail-list strong,
.metric-row strong {
    color: #1c2533;
}

.metric-stack {
    display: grid;
    gap: 20px;
}

.portal-form {
    margin-top: 18px;
}

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

.portal-form-grid-wide {
    grid-column: 1 / -1;
}

.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 110px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #1B7F5C;
    box-shadow: 0 0 0 3px rgba(27, 127, 92, 0.1);
}

input[readonly] {
    background: #f1f5f7;
    color: #617181;
    cursor: not-allowed;
}

.form-note {
    margin-top: 8px;
}

.checkbox-row {
    margin: 24px 0 18px;
    color: #425062;
}

.status-banner {
    min-height: 22px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #5e6a7b;
}

.status-banner.success {
    color: #1B7F5C;
}

.status-banner.error {
    color: #c0392b;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #425062;
    font-size: 15px;
}

.metric-bar {
    height: 10px;
    background: #dfeae6;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

.metric-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1B7F5C 0%, #7FE4D4 100%);
}

.history-list {
    display: grid;
    gap: 16px;
}

.history-item {
    padding: 20px;
    border-radius: 20px;
    background: #f7faf9;
    border: 1px solid #dbe6e2;
}

.history-date {
    color: #1B7F5C;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.history-item h4 {
    color: #1c2533;
    margin-bottom: 8px;
    font-size: 18px;
}

.history-item.empty-state {
    background: #fbfcfc;
}

.result-card {
    border-top: 5px solid #dbe6e2;
}

.result-card.is-low {
    border-top-color: #1B7F5C;
}

.result-card.is-medium {
    border-top-color: #d99100;
}

.result-card.is-high {
    border-top-color: #d64545;
}

.result-score-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0;
    align-items: end;
}

.result-label {
    display: block;
    margin-bottom: 8px;
    color: #566274;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.result-score {
    display: block;
    font-size: 42px;
    line-height: 1;
    color: #1c2533;
}

.result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.neutral-pill {
    background: #edf2f5;
    color: #4b5b69;
}

.low-pill {
    background: rgba(27, 127, 92, 0.12);
    color: #1B7F5C;
}

.medium-pill {
    background: rgba(217, 145, 0, 0.14);
    color: #8f5a00;
}

.high-pill {
    background: rgba(214, 69, 69, 0.12);
    color: #b53030;
}

.result-meta {
    margin-top: 18px;
}

.workspace-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 8px;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.workspace-card .card-btn {
    margin-top: 26px;
}

.seller-card {
    border-top: 5px solid #1B7F5C;
}

.seller-btn {
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
}

.seller-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(27, 127, 92, 0.4);
}

.buyer-card {
    border-top: 5px solid #7FE4D4;
}

.buyer-btn {
    background: linear-gradient(135deg, #7FE4D4 0%, #5fd4c4 100%);
    color: #001F3F;
}

.buyer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(127, 228, 212, 0.4);
}

.footer {
    background: linear-gradient(135deg, #001F3F 0%, #1B7F5C 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.container {
    display: flex;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.content-section {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
    min-height: 600px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo img {
    width: 180px;
    height: 90px;
    border-radius: 50%;
    background: white;
    padding: 0.5px;
    margin-bottom: 20px;
    object-fit: fill;
}

.logo h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.description {
    text-align: center;
}

.description p {
    font-size: 18px;
    line-height: 1.8;
    opacity: 0.95;
    font-weight: 300;
}

.auth-section {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 600px;
}

.toggle-container {
    display: flex;
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
}

.toggle-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.toggle-btn:hover {
    color: #1B7F5C;
}

.toggle-btn.active {
    color: #1B7F5C;
    border-bottom-color: #1B7F5C;
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.auth-form h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #1B7F5C;
    box-shadow: 0 0 0 3px rgba(27, 127, 92, 0.1);
}

.form-group input.error {
    border-color: #ff4757;
}

.error-message {
    display: block;
    color: #ff4757;
    font-size: 12px;
    margin-top: 5px;
    min-height: 15px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #1B7F5C;
}

.checkbox.full-width {
    width: 100%;
    margin-bottom: 20px;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.forgot-link {
    color: #1B7F5C;
    font-weight: 600;
}

.forgot-link:hover,
.form-footer a:hover {
    color: #001F3F;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1B7F5C 0%, #001F3F 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(27, 127, 92, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #1B7F5C;
    font-weight: 600;
}

@media (max-width: 968px) {
    .container {
        flex-direction: column;
        gap: 0;
    }

    .content-section {
        min-height: 300px;
        padding: 40px 30px;
    }

    .logo h1 {
        font-size: 36px;
    }

    .logo img {
        width: 100px;
        height: 100px;
    }

    .description p {
        font-size: 16px;
    }

    .auth-section {
        min-height: auto;
        padding: 40px 30px;
    }

    .nav-links {
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 18px;
    }
}

@media (max-width: 900px) {
    .score-layout {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 34px;
    }

    .access-banner h2 {
        font-size: 30px;
    }

    .access-banner-content {
        grid-template-columns: 1fr;
    }

    .btn-signup-home {
        justify-self: start;
    }
}

@media (max-width: 768px) {
    .portal-hero-content h1 {
        font-size: 32px;
    }

    .portal-hero-content p {
        font-size: 16px;
    }

    .portal-form-grid,
    .result-score-row {
        grid-template-columns: 1fr;
        display: grid;
    }
}

@media (max-width: 640px) {
    .purpose-section,
    .roles-section,
    .journey-section,
    .score-section,
    .dashboard-overview,
    .dashboard-details,
    .workspace-section {
        padding: 60px 20px;
    }

    .access-section {
        padding: 0 20px 60px;
    }

    .info-panel,
    .role-card,
    .journey-step,
    .input-card,
    .stat-card,
    .detail-card,
    .workspace-card,
    .access-banner {
        padding: 24px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .detail-list li,
    .metric-row {
        flex-direction: column;
        gap: 6px;
    }

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

    .stat-value {
        font-size: 38px;
    }
}

@media (max-width: 600px) {
    .container {
        border-radius: 10px;
    }

    .content-section,
    .auth-section {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .logo img {
        width: 80px;
        height: 80px;
    }

    .description p {
        font-size: 14px;
    }

    .auth-form h2 {
        font-size: 24px;
    }

    .toggle-container {
        margin-bottom: 30px;
    }

    .toggle-btn {
        font-size: 14px;
        padding: 12px 15px;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .nav-links {
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-auth-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .footer {
        padding: 40px 20px 20px;
    }
}
