:root {
    --primary-navy: #1b3d6d;
    --primary-navy-dark: #153158;
    --accent-blue: #0088cc;
    --accent-orange: #51b37d;
    --accent-orange-dark: #02ae50;

    --bg-color: #f4f7fa;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #dcdde1;

    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Roboto", sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
}

.pnf-index {
    padding-top: 50px;
    padding-bottom: 40px;
}

.pnf-main {
    padding-top: 90px;
    padding-bottom: 40px;
}

/* Bootstrap navbar customization */

.navbar {
    min-height: 68px;
    border-bottom: 1px solid #e5e9ee;
}

.navbar-brand img {
    max-height: 42px;
}

.navbar-nav .nav-link {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--primary-navy);
}

.dropdown-menu {
    border: 1px solid #e5e9ee;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(27, 61, 109, 0.12);
}

.dropdown-item {
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
}

.dropdown-item:hover {
    background: #eef6fb;
    color: var(--primary-navy);
}



/* =========================================================
   AI Stock Valuation - Page Specific CSS
   ========================================================= */

.valuation-wrapper {
    padding-bottom: 60px;
}

.container-card {
    max-width: 1200px;
    margin: auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);

    box-shadow:
        0 10px 25px -5px rgba(27, 61, 109, 0.12),
        0 8px 10px -6px rgba(0, 136, 204, 0.08);

    border-bottom: 3px solid var(--accent-orange);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 136, 204, 0.15);
    padding-bottom: 12px;
}

.header-flex h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-navy);
    font-family: "Montserrat", sans-serif;
}

.badge-custom {
    background: linear-gradient(135deg,
            var(--accent-blue),
            var(--primary-navy));
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow:
        0 2px 5px rgba(0, 136, 204, 0.2);
}

.inline-row {
    display: flex;
    gap: 16px;
    margin-top: 15px;
    align-items: flex-end;
}

.inline-field {
    flex: 1;
}

.inline-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-navy);
}

.inline-field input,
.inline-field select,
.inline-field textarea {
    width: 100%;
    padding: 10px 14px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.inline-field input:focus,
.inline-field select:focus,
.inline-field textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 3px rgba(0, 136, 204, 0.2);
}

.btn-execute {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background:
        linear-gradient(135deg,
            var(--accent-orange),
            var(--accent-orange-dark));
    border: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 10px rgba(245, 128, 37, 0.3);
}

.btn-execute:hover {
    background:
        linear-gradient(135deg,
            var(--accent-orange-dark),
            #cc6600);

    transform: translateY(-1px);

    box-shadow:
        0 6px 14px rgba(245, 128, 37, 0.4);
}

.btn-execute:active {
    transform: translateY(1px);
}

.btn-execute:disabled {
    background: #94a3b8;

    cursor: not-allowed;

    box-shadow: none;

    transform: none;
}


/* =========================================================
   AI Response
   ========================================================= */

.response {
    margin-top: 25px;

    padding: 25px;

    background: #ffffff;

    border:
        2px solid rgba(0, 136, 204, 0.2);

    border-radius: var(--radius);

    line-height: 1.5;

    font-size: 13px;

    display: none;

    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.response.active {
    display: block;
}

.response h1 {
    font-size: 18px;

    color: var(--primary-navy);

    border-bottom:
        2px solid var(--accent-orange);

    padding-bottom: 6px;
}

.response h2 {
    font-size: 16px;

    color: var(--accent-blue);
}

.response h3 {
    font-size: 14px;

    color: var(--primary-navy);
}

.response h1,
.response h2,
.response h3 {
    margin-top: 20px;

    font-weight: 600;

    font-family: "Montserrat", sans-serif;
}

.response table {
    width: 100%;

    border-collapse: collapse;

    margin: 15px 0;

    font-size: 12px;
}

.response th,
.response td {
    border: 1px solid #cbd5e1;

    padding: 8px 10px;

    text-align: left;
}

.response th {
    background-color: #e6f2fb;

    color: var(--primary-navy);

    font-weight: 600;
}

.response code {
    background: #f1f5f9;

    color: var(--accent-orange);

    padding: 2px 5px;

    border-radius: 4px;

    font-size: 12px;
}

.response pre {
    background: var(--primary-navy);

    color: #f8fafc;

    padding: 12px;

    overflow: auto;

    border-radius: 8px;

    font-family: monospace;

    font-size: 12px;
}

.response pre code {
    background: transparent;

    color: inherit;

    padding: 0;
}


/* =========================================================
   Loading
   ========================================================= */

.loading-state {
    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--accent-blue);

    font-weight: 600;

    font-size: 13px;
}

.spinner {
    width: 18px;
    height: 18px;

    border:
        2px solid var(--border-color);

    border-top-color:
        var(--accent-orange);

    border-radius: 50%;

    animation:
        spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {

    .inline-row {
        flex-direction: column;

        align-items: stretch;
    }

    .container-card {
        padding: 20px;
    }

    .header-flex {
        align-items: flex-start;
        gap: 10px;
    }

}