/* =========================================================
   YIRP ERP — STATIC SITE LAYOUT
   Dark shell, teal navigation and light reading surface,
   matched to the Manergy brand system.
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

a {
    color: var(--link);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--teal);
    color: #04110d;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    z-index: 20;
}

.skip-link:focus {
    left: 0;
}

/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */

.layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.sidebar {
    flex: 0 0 285px;
    width: 285px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background:
        radial-gradient(420px 260px at 100% 0%, rgba(0, 230, 178, 0.10), transparent 62%),
        var(--ink);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    padding: 28px 20px 40px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.brand {
    display: block;
    font-family: var(--font-head);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--white);
    text-decoration: none;
}

.brand:hover .brand-accent {
    filter: brightness(1.15);
}

.brand-sub {
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8b9899;
    margin: 6px 0 0 0;
}

.brand-parent {
    display: inline-block;
    margin-top: 8px;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: #7f8c8d;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.brand-parent:hover {
    color: var(--gold);
    border-bottom-color: rgba(240, 180, 10, 0.55);
}

.sidebar nav {
    margin-top: 26px;
}

.nav-toggle {
    display: none;
}

.nav-summary {
    display: none;
}

.nav-group + .nav-group {
    margin-top: 22px;
}

.nav-group-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7f8c8d;
    margin: 0 0 8px 10px;
}

.nav-group-title::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 2px;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--gold);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8.5px 11px;
    margin: 2px 0;
    border-radius: 10px;
    font-size: 14.5px;
    color: #c7d1d0;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-icon {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    opacity: 0.85;
}

.nav-emoji {
    flex: 0 0 19px;
    width: 19px;
    font-size: 15px;
    line-height: 1;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    box-shadow: inset 2px 0 0 rgba(240, 180, 10, 0.65);
}

.nav-link.active {
    background: var(--grad);
    color: #04110d;
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--gold), 0 8px 18px rgba(0, 230, 178, 0.18);
}

.nav-link.active .nav-icon {
    opacity: 1;
}

.sidebar-note {
    margin-top: 28px;
    padding: 14px 14px 0 14px;
    border-top: 1px solid var(--gold-soft);
    font-size: 11.5px;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: #6f7c7c;
}

.sidebar-note b {
    color: #9fb0ae;
    font-weight: 600;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 40px 52px 70px 52px;
    background: var(--paper);
}

.page-content {
    max-width: 1180px;
    margin: 0 auto;
}

/* ---------------------------------------------------------
   CONTENT COLUMNS (replaces Streamlit st.columns)
   --------------------------------------------------------- */

.columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 8px 0 20px 0;
    align-items: stretch;
}

.columns-1 {
    grid-template-columns: minmax(0, 1fr);
}

.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.column > * {
    margin: 0;
}

/* ---------------------------------------------------------
   SECTIONS
   --------------------------------------------------------- */

.section-header h2 {
    color: var(--ink);
    font-size: 27px;
    font-weight: 800;
    margin: 0 0 6px 0;
}

.contact-help {
    margin-top: 44px;
}

/* ---------------------------------------------------------
   FORM (replaces the Streamlit demo-request form)
   --------------------------------------------------------- */

.demo-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 32px;
}

.form-field {
    display: block;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.form-field span {
    display: block;
    margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    font-weight: 400;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9aa7a6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--teal-2);
    box-shadow: 0 0 0 3px rgba(0, 230, 178, 0.20);
}

.form-field textarea {
    resize: vertical;
    min-height: 140px;
}

.form-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 15px 24px;
    margin: 6px 0 0 0;
}

.form-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 10px 0;
}

.form-message-error {
    background: #fdecea;
    color: #8a1f16;
}

.form-message-success {
    background: #e6faf3;
    color: #0b6b52;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 980px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 20px;
    }

    .nav-toggle {
        position: absolute;
        left: -9999px;
    }

    .nav-summary {
        display: block;
        cursor: pointer;
        padding: 12px 14px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-left: 3px solid var(--gold);
        border-radius: 10px;
        font-weight: 600;
        color: var(--white);
        list-style: none;
        margin-top: 16px;
    }

    .nav-summary::after {
        content: "▾";
        float: right;
        color: var(--teal);
    }

    .nav-toggle:checked ~ .sidebar-head .nav-summary::after {
        content: "▴";
    }

    .nav-toggle:focus ~ .sidebar-head .nav-summary {
        outline: 2px solid var(--teal);
        outline-offset: 2px;
    }

    .nav-toggle:not(:checked) ~ nav {
        display: none;
    }

    .nav-toggle:checked ~ nav {
        display: block;
        margin-top: 10px;
    }

    .sidebar nav {
        margin-top: 10px;
    }

    .sidebar-note {
        display: none;
    }

    .content {
        padding: 26px 20px 50px 20px;
    }

    .columns,
    .columns-2,
    .columns-3,
    .columns-4 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media print {
    .sidebar {
        display: none;
    }

    .content {
        padding: 0;
    }
}
