/* 
   Social Sinergy: Operational Hub
   Enterprise Dark Mode Design System
*/

:root {
    --bg-primary: #0B0E14;
    --bg-secondary: #141820;
    --bg-tertiary: #1E2430;

    --accent-cobalt: #2E5BFF;
    --accent-cobalt-glow: rgba(46, 91, 255, 0.4);
    --accent-cobalt-light: #5C81FF;

    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --sidebar-width: 280px;
    --glass-bg: rgba(20, 24, 32, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation-hint {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(46, 91, 255, 0.05);
    border: 1px solid rgba(46, 91, 255, 0.15);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: fit-content;
}

.navigation-hint i {
    color: var(--accent-cobalt);
    font-size: 1.1rem;
}

.pulse {
    animation: pulse-horizontal 2s infinite;
}

@keyframes pulse-horizontal {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 3.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-cobalt);
    filter: drop-shadow(0 0 8px var(--accent-cobalt-glow));
}

.logo-text {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--accent-cobalt-light);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: var(--transition-smooth);
}

.nav-link i {
    width: 20px;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(46, 91, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(46, 91, 255, 0.2);
}

.nav-link.active i {
    color: var(--accent-cobalt);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.status-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Content Area Styling */
.content {
    margin-left: var(--sidebar-width);
    padding: 4rem 10%;
    min-height: 100vh;
}

.main-header {
    margin-bottom: 5rem;
}

.main-header h1 {
    font-size: 3.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff 40%, var(--accent-cobalt-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-section {
    display: none;
    min-height: 60vh;
    animation: fadeIn 0.6s ease-out forwards;
}

.app-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background-color: rgba(46, 91, 255, 0.1);
    color: var(--accent-cobalt-light);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(46, 91, 255, 0.2);
}

.app-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.app-section p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.tech-stack-preview {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.tech-tag:hover {
    border-color: var(--accent-cobalt);
    color: var(--text-primary);
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-interact {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: var(--accent-cobalt);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px 0 rgba(46, 91, 255, 0.39);
}

.btn-interact:hover {
    background-color: var(--accent-cobalt-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 91, 255, 0.45);
}

.btn-interact.secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-interact.secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 900px;
    border-radius: 1.5rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    /* Allow body to expand to fill container */
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--accent-cobalt-light);
    background: rgba(255, 255, 255, 0.05);
}

/* Data Mining Table Preview */
.data-table-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.table-row.header {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge.high {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.badge.verified {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

/* AI Media Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Custom Scrollbar */
.gallery-grid::-webkit-scrollbar {
    width: 6px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    border-color: var(--accent-cobalt);
    background: rgba(255, 255, 255, 0.04);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    /* Crucial: show full video without cropping */
    background: #000;
    border-radius: 0.4rem;
}

.gallery-item p {
    font-size: 0.8rem;
    margin-bottom: 0;
    text-align: center;
}

.gallery-category-title {
    grid-column: 1 / -1;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    color: var(--accent-cobalt-light);
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.video-placeholder {
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
}

.video-placeholder i {
    font-size: 4rem;
    color: var(--accent-cobalt);
}

/* n8n Flow Tease */
.n8n-flow-tease {
    background: linear-gradient(135deg, rgba(46, 91, 255, 0.05) 0%, rgba(20, 24, 32, 0.5) 100%);
    border: 1px dashed var(--accent-cobalt);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.n8n-flow-tease h3 {
    margin-bottom: 0.5rem;
}

/* Document Viewer */
.doc-viewer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Diagram Zoomable Container */
.diagram-zoom-wrapper {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    position: relative;
    background: #000;
    border-radius: 0.75rem;
    cursor: grab;
    border: 1px solid var(--border-color);
}

.diagram-zoom-wrapper:active {
    cursor: grabbing;
}

#zoomable-diagram {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center;
    transition: transform 0.1s ease-out;
    image-rendering: -webkit-optimize-contrast;
    /* Enhance clarity on zoom */
    image-rendering: crisp-edges;
}

/* AI Chat Agent */
.chat-section {
    max-width: 900px;
    margin: 0 auto;
}

.chat-container {
    height: 60vh;
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.message {
    max-width: 80%;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0.2rem;
}

.user-message {
    align-self: flex-end;
    background: var(--accent-cobalt);
    color: white;
    border-bottom-right-radius: 0.2rem;
    box-shadow: 0 4px 15px rgba(46, 91, 255, 0.3);
}

.chat-input-area {
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border-color);
}

#ai-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.3s ease;
}

#ai-input:focus {
    border-color: var(--accent-cobalt);
}

.send-btn {
    background: var(--accent-cobalt);
    color: white;
    border: none;
    padding: 0 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.send-btn:hover {
    background: #1e4bd6;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Typing Indicator */
.typing {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.doc-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
}

.doc-item i {
    font-size: 2.5rem;
    color: var(--accent-cobalt-light);
}

.doc-item h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.doc-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* n8n Flow Diagram */
.n8n-diagram-static {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cobalt-light);
}

.step-box {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.step-box.active {
    border-color: var(--accent-cobalt);
    box-shadow: 0 0 15px var(--accent-cobalt-glow);
}

.step-box.success {
    border-color: #10B981;
    color: #10B981;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.mt-2 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0;
        align-items: center;
    }

    .logo-text,
    .sidebar-subtitle,
    .sidebar-nav span,
    .status-text {
        display: none;
    }

    .sidebar-header {
        margin-bottom: 2rem;
    }

    .logo-container {
        justify-content: center;
    }

    .nav-link {
        justify-content: center;
        padding: 1rem;
    }

    .content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.5rem;
    }

    .app-section h2 {
        font-size: 1.85rem;
    }

    .content {
        padding: 3rem 5%;
    }
}

/* Protected PDF Viewer */
.pdf-viewer-mode .modal-container {
    width: 95vw;
    height: 90vh;
    max-width: 1400px;
    padding: 0;
    overflow: hidden;
}

.pdf-viewer-mode .modal-body {
    padding: 0;
    overflow: hidden;
}

.pdf-container {
    position: relative;
    width: 100%;
    flex: 1;
    /* Match flex of parent */
    background: #1a1e26;
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
/* Authentication Shield Styling */
.auth-shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #141820 0%, #0B0E14 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.auth-shield.fade-out {
    opacity: 0;
    visibility: hidden;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(46, 91, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: authCardEntrance 1s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes authCardEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-icon {
    font-size: 3rem;
    color: var(--accent-cobalt);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px var(--accent-cobalt-glow));
}

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.auth-body .input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.auth-body .input-group i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cobalt);
    font-size: 1rem;
}

.auth-body input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.auth-body input:focus {
    border-color: var(--accent-cobalt);
    box-shadow: 0 0 0 4px rgba(46, 91, 255, 0.1);
}

.auth-body input.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #FF4D4D!important;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.auth-body .btn-interact {
    width: 100%;
    justify-content: center;
}

.auth-error-msg {
    margin-top: 1rem;
    color: #FF4D4D;
    font-size: 0.85rem;
    height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-error-msg.visible {
    opacity: 1;
}

.auth-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

