/* === Design System === */

:root {
    --accent: #1D9E75;
    --accent-hover: #178a65;
    --accent-subtle: rgba(29, 158, 117, 0.08);
    --accent-light: rgba(29, 158, 117, 0.12);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.btn-primary, .bg-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: var(--accent-hover);
    --bs-btn-active-bg: var(--accent-hover);
    --bs-btn-active-border-color: var(--accent-hover);
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-bg: var(--accent-hover);
    --bs-btn-active-border-color: var(--accent-hover);
}

.btn-success {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: var(--accent-hover);
}

.nav-pills .nav-link.active {
    background-color: var(--accent);
}

.nav-pills-sm .nav-link {
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem;
}

/* === Portal Sidebar Layout === */

.portal-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--bs-border-color);
    background: #fbfbfb;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-nav {
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.15s;
}

.sidebar-item:hover {
    background-color: var(--accent-subtle);
    color: var(--accent);
}

.sidebar-item.active {
    background-color: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-back {
    font-size: 0.8rem;
    color: #6c757d;
}

.sidebar-header {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-divider {
    margin: 0.25rem 1rem;
    border-color: var(--bs-border-color);
}

.sidebar-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: 0.25rem 0;
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #6c757d;
    overflow: hidden;
}

.portal-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2rem;
}

/* Responsive: on < lg, sidebar becomes offcanvas */
@media (max-width: 991.98px) {
    .sidebar {
        width: 280px;
    }
    .portal-content {
        padding: 1rem;
    }
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* === Landing: Hero === */

.hero {
    text-align: center;
    padding: 5rem 0 3.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(29, 158, 117, 0.08), transparent),
        linear-gradient(180deg, #f0fdf7 0%, #ffffff 100%);
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* === Landing: Terminal === */

.terminal-tabs { margin: 2.5rem auto 0; max-width: 700px; }

.tab-bar { display: flex; }

.tab {
    background: #22272e;
    color: #768390;
    border: none;
    padding: 0.5rem 1.25rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}
.tab.active { background: #2d333b; color: #e6edf3; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel .terminal { border-radius: 0 0 10px 10px; }

.terminal {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.terminal-header {
    background: #2d333b;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title { margin-left: auto; font-size: 0.75rem; color: #768390; }

.terminal-body {
    background: #0d1117;
    padding: 1.25rem 1.5rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    text-align: left;
}

.terminal-line { opacity: 0; animation: line-appear 0.4s ease forwards; }
.terminal-line:first-child { animation-delay: 0.3s; }
.line-delay-1 { animation-delay: 1.0s; color: #8b949e; }
.line-delay-2 { animation-delay: 1.6s; color: #8b949e; }
.line-delay-3 { animation-delay: 2.2s; }
.line-delay-4 { animation-delay: 2.8s; color: #8b949e; }
.line-delay-5 { animation-delay: 3.4s; }
.line-delay-6 { animation-delay: 4.0s; }

.terminal-body .prompt { color: #8b949e; user-select: none; }
.terminal-body .cmd { color: #e6edf3; }
.terminal-body .success { color: #2ecc40; }

@keyframes line-appear {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Landing: Feature icons === */

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.feature-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    stroke-width: 2;
    fill: none;
}

/* === Landing: Pricing === */

.pricing-badge {
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 700;
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    line-height: 1;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
}
.pricing-card li::before {
    content: "\2713";
    color: var(--accent);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* === Build log viewer === */

.build-log {
    background: #0d1117;
    color: #c9d1d9;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 1rem;
    border-radius: 6px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* === Git URL block === */

.git-url-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #0d1117;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.git-url-block code {
    flex: 1;
    background: none;
    padding: 0;
    font-size: 0.9rem;
    word-break: break-all;
    color: #c9d1d9;
}

/* === Docs content === */

.docs-content pre {
    background: #0d1117;
    color: #c9d1d9;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}
.docs-content pre code { background: none; padding: 0; font-size: inherit; }
