/* Flowengine Corporate CSS: Green & White Theme */

:root {
    --bg-light: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(16, 185, 129, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.15);
    --accent: #0f172a;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background floating green decorative blur circles */
body::before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(255,255,255,0) 70%);
    top: -200px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(255,255,255,0) 70%);
    bottom: -200px;
    left: -100px;
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 8%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
}

.logo-accent {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Hero Section */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 4% 100px;
}

.hero {
    text-align: center;
    margin-bottom: 80px;
}

.badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-hover);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Feature Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 85px;
}

.card {
    border-radius: 16px;
    padding: 36px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Connected Services Section */
.services-box {
    border-radius: 20px;
    padding: 50px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.services-box h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.services-box p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

.app-links-row {
    display: flex;
    justify-content: center;
}

.app-item-card {
    display: block;
    max-width: 380px;
    width: 100%;
    padding: 28px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.app-item-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.1);
}

.app-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.app-item-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.app-item-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 60px;
}

/* ================== NEW STYLES: DEVELOPER CONSOLE ================== */

/* Tab Buttons */
.nav-tab {
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.nav-tab.active {
    color: white;
    background: var(--primary);
}

.logo-badge {
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-hover);
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 700;
}

/* Tab Display Logic */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Dashboard Additions */
.card-status {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
}

.card-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-hover);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.metric-row {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.metric {
    flex: 1;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.metric span {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

.metric strong {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Interactive Graph */
.graph-container {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.graph-container h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.graph-container p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.graph-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.bar {
    flex: 1;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.5s ease;
}

.bar:hover {
    background: var(--primary);
}

.bar span {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.bar.animate-bar {
    background: linear-gradient(to top, var(--primary), var(--primary-hover));
}

/* Workflow Orchestrator */
.orchestrator-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
}

.node-options-panel h3, .canvas-panel h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

.workflow-canvas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 24px;
    margin-bottom: 24px;
    min-height: 180px;
}

.canvas-node {
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    width: 140px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    position: relative;
    transition: all 0.3s ease;
}

.canvas-node.anim-pulse {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}

.node-badge {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.node-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.canvas-connector {
    flex: 1;
    height: 3px;
    background: #cbd5e1;
    margin: 0 12px;
    position: relative;
    overflow: hidden;
}

.canvas-connector.anim-flow::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 100%;
    background: var(--primary);
    left: -30px;
    animation: flow 1.5s infinite linear;
}

@keyframes flow {
    0% { left: -30px; }
    100% { left: 100%; }
}

.sim-status-message {
    font-size: 0.9rem;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid #94a3b8;
    background: #f8fafc;
    color: var(--text-secondary);
}

.sim-status-message.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    color: #1d4ed8;
}

.sim-status-message.success {
    border-left-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    color: var(--primary-hover);
}

/* Key Vault Panel */
.vault-status-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.vault-icon {
    font-size: 2.2rem;
}

.vault-status-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
}

.vault-status-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.secrets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.secret-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 20px;
    border-radius: 8px;
}

.secret-name {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: #0f172a;
}

.secret-ref {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.secret-state {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.secret-state.verified {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-hover);
}

/* Console Shell */
.logs-console {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #1e293b;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

.console-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

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

.console-btn {
    background: transparent;
    border: 1px solid #475569;
    color: #cbd5e1;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.console-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: #cbd5e1;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: glow-pulse 1.8s infinite ease-in-out;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

.status-text {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.console-body {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    height: 320px;
    overflow-y: auto;
    background: #090d16;
}

.log-line {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 4px;
}

.text-success { color: #34d399; }
.text-warning { color: #fbbf24; }
.text-danger { color: #f87171; }

.glass-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
