/*
 * Wonder Platform - Landing Page Styles
 * Industrial command center aesthetic
 * Version: 1.0
 */

/* ============================================
   PLATFORM HEADER
   ============================================ */

.platform-header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-strong);
    padding: var(--space-lg) 0;
}

.header-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.company-logo {
    height: 50px;
    width: auto;
}

.platform-title h1 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    color: var(--text-primary);
}

.platform-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.system-time {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-name {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.user-dropdown {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-dropdown:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.platform-main {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--space-xl);
    min-height: calc(100vh - 200px);
}

/* ============================================
   GLOBAL STATUS BAR
   ============================================ */

.global-status-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.status-item label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0;
}

.status-value {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.metric-value {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* ============================================
   PRODUCT CARDS - INDUSTRIAL AESTHETIC
   ============================================ */

.product-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-subtle);
    transition: background var(--transition-base);
}

/* Active product (Sentinel) */
.product-card.active {
    border-color: var(--accent-sentinel);
    cursor: pointer;
}

.product-card.active::before {
    background: var(--accent-sentinel);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.product-card.active:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Upcoming products */
.product-card.upcoming {
    opacity: 0.7;
}

.product-card.upcoming::before {
    background: var(--status-offline);
}

/* ============================================
   PRODUCT CARD CONTENT
   ============================================ */

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: none;
    background: transparent;
}

.product-logo {
    height: 80px;
    width: auto;
}

.product-status {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-body {
    flex: 1;
    padding: 0;
}

.product-name {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.product-tagline {
    font-size: var(--text-sm);
    color: var(--accent-sentinel);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.product-card[data-product="wise"] .product-tagline {
    color: var(--accent-wise);
}

.product-card[data-product="mentor"] .product-tagline {
    color: var(--accent-mentor);
}

.product-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

/* ============================================
   PRODUCT METRICS
   ============================================ */

.product-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric .metric-value {
    font-size: var(--text-2xl);
    color: var(--accent-sentinel);
}

.metric-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   PRODUCT ACTION BUTTONS
   ============================================ */

.card-footer {
    padding: 0;
    border: none;
}

.product-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 1rem;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    background: transparent;
    border: 2px solid var(--accent-sentinel);
    border-radius: var(--radius-sm);
    color: var(--accent-sentinel);
    cursor: pointer;
    transition: all var(--transition-base);
}

.product-action:hover:not(:disabled) {
    background: var(--accent-sentinel);
    color: var(--bg-primary);
}

.product-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--border-strong);
    color: var(--text-muted);
}

/* ============================================
   ACTIVITY FEED - LOG TABLE STYLE
   ============================================ */

.activity-feed {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
}

.activity-feed h3 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.activity-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
    animation: slideIn 0.3s ease;
}

.activity-item:hover {
    background: var(--bg-primary);
}

.activity-item:last-child {
    border-bottom: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-time {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: left;
}

.activity-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Custom scrollbar for activity feed */
.activity-items::-webkit-scrollbar {
    width: 6px;
}

.activity-items::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.activity-items::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-sm);
}

.activity-items::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .activity-item {
        grid-template-columns: 100px 1fr;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
}

@media (max-width: 768px) {
    .platform-main {
        padding: var(--space-md);
    }

    .global-status-bar {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }

    .company-logo {
        height: 40px;
    }

    .platform-title h1 {
        font-size: var(--text-base);
    }

    .product-card {
        padding: var(--space-lg);
    }

    .product-logo {
        height: 60px;
    }

    .metric .metric-value {
        font-size: var(--text-xl);
    }

    .activity-item {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .activity-time {
        font-size: var(--text-xs);
    }

    .activity-text {
        font-size: var(--text-xs);
    }
}

/* ============================================
   MENTOR AI FLOATING BUTTON & OVERLAY
   ============================================ */

/* Floating Button */
.mentor-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-mentor) 0%, #9333ea 100%);
    border: 2px solid rgba(168, 85, 247, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: relative;
}

.mentor-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.mentor-floating-btn svg {
    width: 28px;
    height: 28px;
}

.mentor-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--status-critical);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

/* Overlay */
.mentor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mentor-overlay-content {
    width: 450px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mentor-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.mentor-overlay-header h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-mentor);
    display: flex;
    align-items: center;
}

.mentor-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .mentor-floating-btn {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
    }

    .mentor-floating-btn svg {
        width: 24px;
        height: 24px;
    }

    .mentor-overlay-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
