/* ==========================================================================
   SAAS WHITEPAPER PAGE — mani-saas-whitepaper-ltr.css
   Components: main-grid, panel, code-editor, terminal, api-endpoint,
               endpoint-method, schema-table, script-showcase, architecture-*
   ========================================================================== */

/* --- DUAL PANEL GRID ---------------------------------------------------- */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* --- PANEL (code/terminal container) ------------------------------------ */
.panel {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
    padding: 22px;
    height: 520px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

.panel:hover {
    border-color: var(--pg-green, #059669);
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.04);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--pg-border, #e2e8f0);
    padding-bottom: 14px;
    flex-shrink: 0;
}

.panel-header .fw-bold {
    font-size: 0.9rem;
}

/* --- CODE EDITOR -------------------------------------------------------- */
.code-editor {
    flex: 1;
    background: #1e293b;
    border-radius: var(--pg-radius, 8px);
    padding: 18px;
    font-family: 'Courier New', 'Courier Prime', monospace;
    font-size: 0.82rem;
    overflow-y: auto;
    color: #e2e8f0;
    text-align: left;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-editor .keyword  { color: #60a5fa; }
.code-editor .string   { color: #34d399; }
.code-editor .comment  { color: #64748b; font-style: italic; }
.code-editor .function { color: #fbbf24; }

/* --- TERMINAL ----------------------------------------------------------- */
.terminal {
    flex: 1;
    background: #0f172a;
    border-radius: var(--pg-radius, 8px);
    padding: 18px;
    font-family: 'Courier New', 'Courier Prime', monospace;
    font-size: 0.8rem;
    overflow-y: auto;
    color: #94a3b8;
    text-align: left;
    line-height: 1.5;
}

.terminal .status-valid   { color: #10b981; font-weight: 700; }
.terminal .status-invalid { color: #ef4444; font-weight: 700; }

/* --- ARCHITECTURE CARD -------------------------------------------------- */
.architecture-card {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
    padding: 36px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.architecture-card:hover {
    border-color: var(--pg-green, #059669);
    border-style: dashed;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    font-size: 1.4rem;
}

.architecture-label {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--pg-green, #059669);
    margin-bottom: 0.6rem;
}

.architecture-title {
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--pg-navy, #0f172a);
}

.architecture-desc {
    color: var(--pg-muted, #475569);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- TECH TAGS ---------------------------------------------------------- */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.8rem;
}

.tech-tag {
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pg-navy, #0f172a);
}

/* --- API ENDPOINT ------------------------------------------------------- */
.api-endpoint {
    background: #1e293b;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 6px 0;
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
    font-size: 0.82rem;
}

.endpoint-method {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    margin-right: 8px;
    color: #fff;
}

.method-get    { background: #10b981; }
.method-post   { background: #3b82f6; }
.method-put    { background: #f59e0b; }
.method-delete { background: #ef4444; }

/* --- DATABASE SCHEMA ---------------------------------------------------- */
.database-schema {
    padding: 28px;
    margin: 1.5rem 0;
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
}

.database-schema:hover {
    border-color: var(--pg-green, #059669);
    border-style: dashed;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
}

.schema-table th {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 2px solid var(--pg-border, #e2e8f0);
    font-weight: 700;
    color: var(--pg-navy, #0f172a);
    font-size: 0.85rem;
}

.schema-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--pg-border, #e2e8f0);
    font-size: 0.85rem;
    color: var(--pg-muted, #475569);
}

.schema-table tr:hover { background: #f8fafc; }

/* --- SCRIPT SHOWCASE ---------------------------------------------------- */
.script-showcase {
    background: #0f172a;
    border-radius: var(--pg-radius, 8px);
    padding: 22px;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #94a3b8;
    overflow-x: auto;
    line-height: 1.55;
}

.script-line        { margin-bottom: 2px; }
.script-comment     { color: #64748b; font-style: italic; }
.script-string      { color: #34d399; }
.script-keyword     { color: #60a5fa; }
.script-function    { color: #fbbf24; }
.script-variable    { color: #c084fc; }

/* --- CONTROL PANEL ------------------------------------------------------ */
.control-panel {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
    padding: 28px;
    margin-top: 20px;
}

.control-panel:hover {
    border-color: var(--pg-green, #059669);
    border-style: dashed;
}

.input-field {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 6px;
    transition: 0.25s;
    background: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--pg-green, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.btn-validate {
    display: block;
    width: auto;
    margin: 16px auto 0;
    text-align: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: 0.3s;
    cursor: pointer;
}

.btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.2);
}

/* --- STATUS BANNER ------------------------------------------------------ */
.status-banner {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 6px;
    display: none;
    border: 2px solid;
    animation: wp-slide-in 0.4s ease;
}

@keyframes wp-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE --------------------------------------------------------- */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        height: 420px;
    }
}
