@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #38bdf8;
    --accent-hover: #0284c7;
    --bg-color: #f1f5f9;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --ticker-bg: #020617;
    --ticker-text: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; width: 100%; }

.top-banner {
    background-color: var(--ticker-bg);
    color: var(--ticker-text);
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ticker-wrap { width: 100%; overflow: hidden; }
.ticker { display: inline-flex; animation: ticker 40s linear infinite; }
.ticker:hover { animation-play-state: paused; }
.ticker__item { padding: 0 50px; border-right: 1px solid rgba(255, 255, 255, 0.15); }

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.main-menu { background-color: var(--primary-color); color: var(--white); padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-links { list-style: none; display: flex; }
.nav-links li a { color: var(--white); font-weight: 800; font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; padding: 8px 16px; border-radius: 6px; letter-spacing: 0.5px; }
.nav-links li a:hover { background-color: rgba(255, 255, 255, 0.1); }

.sub-menu { background-color: var(--secondary-color); color: var(--white); padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.1); }
.sub-nav-links { list-style: none; display: flex; }
.sub-nav-links li a { color: #cbd5e1; font-weight: 600; font-size: 0.9rem; padding: 6px 16px; border-radius: 4px; letter-spacing: 0.5px; }
.sub-nav-links li a:hover { color: var(--white); background-color: rgba(255, 255, 255, 0.1); }

.layout-container { display: flex; flex: 1; max-width: 1400px; margin: 40px auto; width: 100%; padding: 0 40px; gap: 40px; }
.sidebar { width: 280px; flex-shrink: 0; }
.sidebar-section { background: var(--white); border-radius: 12px; padding: 25px; margin-bottom: 25px; border: 1px solid var(--border-color); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.sidebar-section h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-color); font-weight: 800; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; }
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 5px; }
.sidebar-list li a { display: block; padding: 12px 16px; color: #475569; font-weight: 600; font-size: 0.95rem; border-radius: 8px; transition: all 0.2s; }
.sidebar-list li a:hover { background-color: #f8fafc; color: var(--primary-color); transform: translateX(5px); }
.sidebar-list li a.active { background-color: #f0f9ff; color: var(--accent-hover); font-weight: 700; border-left: 4px solid var(--accent-hover); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

.main-content {
    flex: 1;
    position: relative;
    max-width: 100%;
}

.shadow-glow { box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08); }

.space-section {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-color);
    display: none;
    animation: fadeIn 0.3s ease-out forwards;
}

.space-section.active {
    display: block;
}

.presentation-header { margin-bottom: 30px; }

.breadcrumbs {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs .separator { color: #cbd5e1; }
.breadcrumbs .current-node { color: var(--accent-hover); }

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-intro { font-size: 1.05rem; color: #475569; max-width: 900px; line-height: 1.7; }

/* STRUCTURED PRESENTATION SPACE */
.presentation-layout {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    min-height: 600px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.presentation-menu {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.menu-header {
    padding: 20px 24px;
    background: #0f172a;
    color: var(--accent-color);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    border-bottom: 1px solid #1e293b;
}

.dynamic-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

.dynamic-menu-list .menu-item {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dynamic-menu-list .menu-item::after { 
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.dynamic-menu-list .menu-item:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.dynamic-menu-list .menu-item:hover::after {
    opacity: 0.5;
    transform: translateX(0);
}

.dynamic-menu-list .menu-item.active {
    background: #f0f9ff;
    color: var(--accent-hover);
    border-left-color: var(--accent-hover);
}

.dynamic-menu-list .menu-item.active::after {
    opacity: 1;
    transform: translateX(0);
}

.presentation-panel {
    flex: 1;
    padding: 40px;
    background: #f8fafc;
    position: relative;
    overflow-y: auto;
    max-height: 800px;
}

.panel-content {
    display: none;
    animation: fadeIn 0.3s ease-out forwards;
}

.panel-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.card-preview {
    height: 140px;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-preview::after {
    content: attr(data-title);
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    opacity: 0.2;
    letter-spacing: 5px;
    font-family: 'Space Grotesk', sans-serif;
}

.card-preview.style-1 { background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%); }
.card-preview.style-2 { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); }
.card-preview.style-3 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.card-preview.style-4 { background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%); }
.card-preview.style-system { background: #1e293b; border-bottom: 1px solid rgba(255,255,255,0.05); }

.card-content { padding: 25px; display: flex; flex-direction: column; flex: 1; }

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #e0f2fe;
    color: var(--accent-hover);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 6px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    align-self: flex-start;
}

.card-title { font-size: 1.15rem; font-weight: 800; color: var(--primary-color); margin-bottom: 10px; }
.card-desc { color: #64748b; font-size: 0.95rem; margin-bottom: 25px; flex: 1; line-height: 1.6; }
.card-link { color: var(--accent-hover); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s ease; display: inline-flex; align-items: center; gap: 5px; }
.card:hover .card-link { color: var(--primary-color); }

/* Detail Views */
.panel-navigation { margin-bottom: 25px; }
.back-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: #64748b;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.back-btn:hover { background: #f8fafc; color: var(--primary-color); border-color: #cbd5e1; transform: translateX(-2px); }

.detail-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
}

.detail-visual {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.detail-visual::after {
    content: attr(data-title);
    color: var(--white);
    font-size: 4rem;
    font-weight: 800;
    opacity: 0.15;
    letter-spacing: 15px;
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
}

.detail-visual.style-1 { background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%); }
.detail-visual.style-2 { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); }
.detail-visual.style-3 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.detail-visual.style-4 { background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%); }
.detail-visual.style-system { background: #1e293b; border-bottom: 1px solid rgba(255,255,255,0.05); }

.detail-body { padding: 50px; }
.detail-title { font-size: 2rem; color: var(--primary-color); margin-bottom: 20px; font-weight: 800; letter-spacing: -0.5px; }
.detail-desc { color: #475569; font-size: 1.1rem; line-height: 1.8; margin-bottom: 40px; }

.action-btn {
    display: inline-flex;
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2);
    border: none;
    cursor: pointer;
}
.action-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.3); }

/* Dynamic Placeholder Styles */
.dynamic-placeholder-content {
    background: #f1f5f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 35px;
    border-left: 4px solid var(--accent-color);
}
.dynamic-placeholder-content h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}
.dynamic-placeholder-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dynamic-placeholder-content li {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
    font-weight: 500;
}
.dynamic-placeholder-content li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 800;
    font-family: monospace;
}

.site-footer { background-color: var(--primary-color); color: #94a3b8; padding: 40px 0; margin-top: auto; font-size: 0.95rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-left span { color: #f8fafc; font-weight: 700; }

@media (max-width: 1024px) {
    .layout-container { flex-direction: column; padding: 0 20px; margin-top: 20px; }
    .sidebar { width: 100%; display: flex; flex-direction: column; gap: 20px; }
    .sidebar-section { margin-bottom: 0; }
    .presentation-layout { flex-direction: column; }
    .presentation-menu { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); max-height: 300px; }
    .presentation-panel { padding: 25px; }
    .detail-body { padding: 30px; }
}

@media (max-width: 600px) {
    .grid-preview { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* -- FUNCTIONAL PROTOTYPE STYLES -- */

.operational-banner {
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid #000;
}
.op-status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.op-actions { display: flex; gap: 15px; align-items: center; }
.op-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 6px 14px; border-radius: 4px; cursor: pointer; transition: all 0.2s; font-size: 0.8rem; font-weight: 600; }
.op-btn:hover { background: rgba(255,255,255,0.2); }
.cart-btn { background: var(--accent-hover); color: white; border: none; }
.cart-btn:hover { background: var(--accent-color); color: #000; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.8); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease-out; }
.modal-content { background: var(--white); padding: 40px; border-radius: 12px; width: 100%; max-width: 400px; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.modal-content h3 { color: var(--primary-color); margin-bottom: 25px; font-size: 1.5rem; font-weight: 800; }
.close-modal { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; }
.close-modal:hover { color: var(--primary-color); }
#auth-form input { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 6px; font-family: inherit; font-size: 0.95rem; }
#auth-form input:focus { outline: none; border-color: var(--accent-hover); }
.modal-toggle-text { margin-top: 15px; font-size: 0.85rem; text-align: center; color: #64748b; }
.modal-toggle-text span { color: var(--accent-hover); cursor: pointer; font-weight: 700; text-decoration: underline; }

.cart-content { max-width: 500px; }
.cart-items { max-height: 400px; overflow-y: auto; margin-bottom: 20px; padding-right: 10px; }
.cart-item { padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
.cart-item-details h4 { font-size: 1.05rem; color: var(--primary-color); margin-bottom: 5px; font-weight: 800; }
.cart-item-details p { font-size: 0.85rem; color: #64748b; font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.remove-item { background: #ef4444; color: white; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-weight: bold; transition: background 0.2s; }
.remove-item:hover { background: #dc2626; }
.empty-cart-msg { text-align: center; padding: 30px; color: #64748b; font-weight: 600; }
.w-full { width: 100%; box-sizing: border-box; }
.mb-container { min-height: 600px; display: flex; flex-direction: column; }

/* Dream.ZONE Form & Report */
.dz-form-container { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 12px; padding: 25px; margin-bottom: 30px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.dz-form-container h4 { color: var(--primary-color); font-size: 1.2rem; margin-bottom: 20px; font-weight: 800; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.dz-form { display: flex; flex-direction: column; }
.form-row { display: flex; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.form-group label { font-size: 0.85rem; font-weight: 700; color: #475569; text-transform: uppercase; }
.form-group input { padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 0.95rem; }
.form-group input:focus { outline: none; border-color: var(--accent-hover); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1); }

.dz-report-container { margin-top: 20px; animation: fadeIn 0.4s ease-out; }
.report-object { background: white; border: 2px solid #cbd5e1; border-radius: 8px; padding: 30px; margin-bottom: 20px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }
.report-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary-color); padding-bottom: 15px; margin-bottom: 20px; }
.report-header h5 { font-size: 1.3rem; color: var(--primary-color); font-weight: 800; }
.report-id { font-family: monospace; color: #64748b; font-weight: bold; background: #f1f5f9; padding: 4px 8px; border-radius: 4px; border: 1px solid #e2e8f0; }
.report-table-wrapper { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem; }
.report-table th, .report-table td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--border-color); }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table th { background: #f1f5f9; color: var(--primary-color); font-weight: 700; border-top: 1px solid var(--border-color); }
.report-table th.highlight, .report-table td.highlight-val { background: #f0f9ff; color: #0284c7; font-weight: 800; border-left: 1px dashed #bae6fd; border-right: 1px dashed #bae6fd; }
.report-table td { font-family: "Space Grotesk", sans-serif; font-weight: 600; color: #334155; }
.report-footer { display: flex; justify-content: space-between; font-size: 0.85rem; color: #64748b; font-weight: 600; background: #f8fafc; padding: 12px; border-radius: 6px; border: 1px solid #e2e8f0; }
.report-actions { display: flex; gap: 15px; }
.success-btn { background: #10b981; }
.success-btn:hover { background: #059669; }

@media print {
    body * { visibility: hidden; }
    .pdf-ready, .pdf-ready * { visibility: visible; }
    .pdf-ready { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; padding: 0; margin: 0; }
}

/* -- PRELIMINARY INTRO STYLES -- */
.prelim-intro-container {
    background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
    color: white;
    padding: 60px 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.intro-overlay-content {
    max-width: 700px;
}

.intro-title {
    font-size: 2.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -1px;
    color: var(--accent-color);
}

.intro-body {
    margin-bottom: 40px;
}

.intro-teaser {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #cbd5e1;
}

.intro-source-note {
    font-size: 0.9rem;
    color: #94a3b8;
    background: rgba(255,255,255,0.05);
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-block;
}

.intro-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.outline-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.outline-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* -- DREAM.ZONE GATE STYLES -- */
.dz-gate {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
}

.gate-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.dz-gate h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 800;
}

.dz-gate p {
    color: #64748b;
    margin-bottom: 30px;
}

/* -- 11 REPORTS GRID STYLES -- */
.reports-header-summary {
    background: var(--primary-color);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.reports-header-summary h4 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.reports-header-summary p {
    color: #94a3b8;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.report-object.mini-card {
    padding: 20px;
    border-radius: 12px;
    border-color: #e2e8f0;
    transition: all 0.3s ease;
}

.report-object.mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
    border-color: var(--accent-color);
}

.report-object.mini-card h5 {
    color: var(--accent-hover);
    font-size: 1.1rem;
}

.report-object.mini-card .report-table th, 
.report-object.mini-card .report-table td {
    padding: 8px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    .intro-title {
        font-size: 2rem;
    }
}
