/* Analytic Hub - Main Stylesheet */
/* Microsoft Fluent Design System */

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

:root {
    --ms-primary: #0078d4;
    --ms-secondary: #106ebe;
    --ms-accent: #107c10;
    --ms-danger: #da3b01;
    --ms-warning: #ffd700;
    --ms-light-gray: #f3f2f1;
    --ms-medium-gray: #a19f9d;
    --ms-dark-gray: #323130;
    --ms-black: #201f1e;
    --ms-white: #ffffff;
    --ms-border: #d2d0ce;
    --ms-hover: #005a9e;
    --ms-focus: #004578;
    --text-primary: #201f1e;
    --text-secondary: #605e5c;
    --shadow-depth-4: 0 3.2px 7.2px rgba(0, 0, 0, 0.132), 0 0.6px 1.8px rgba(0, 0, 0, 0.108);
    --shadow-depth-8: 0 6.4px 14.4px rgba(0, 0, 0, 0.132), 0 1.2px 3.6px rgba(0, 0, 0, 0.108);
    --shadow-depth-16: 0 12.8px 28.8px rgba(0, 0, 0, 0.132), 0 2.4px 7.2px rgba(0, 0, 0, 0.108);
    --shadow-depth-28: 0 22.4px 50.4px rgba(0, 0, 0, 0.132), 0 4.2px 12.6px rgba(0, 0, 0, 0.108);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI Web (West European)', 'Helvetica Neue', sans-serif;
    background: var(--ms-light-gray);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Navigation */
header {
    background: var(--ms-white);
    border-bottom: 1px solid var(--ms-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-depth-4);
}

header nav {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.3px;
}

.header-brand::before {
    content: '';
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--ms-primary), var(--ms-secondary));
    border-radius: 4px;
}

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

.header-nav-items a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 2px;
}

.header-nav-items a:hover {
    color: var(--ms-primary);
    background: rgba(0, 120, 212, 0.05);
}

.header-nav-items a.active {
    color: var(--ms-primary);
    border-bottom: 2px solid var(--ms-primary);
    padding-bottom: 2px;
}

/* Hamburger Menu */
.hamburger-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn:hover span {
    background: var(--ms-primary);
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.nav-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Menu */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--ms-white);
    flex-direction: column;
    z-index: 1000;
    box-shadow: var(--shadow-depth-28);
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-mobile.active {
    display: flex;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.nav-mobile-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-mobile-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-mobile-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.nav-mobile-close:hover {
    background: var(--ms-light-gray);
}

.nav-mobile-items {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-mobile-items a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    display: block;
}

.nav-mobile-items a:hover {
    background: var(--ms-light-gray);
    color: var(--ms-primary);
}

.nav-mobile-items a.active {
    background: rgba(0, 120, 212, 0.1);
    border-left-color: var(--ms-primary);
    color: var(--ms-primary);
}

.header-spacer {
    flex: 1;
}

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

/* Page Title */
.page-header {
    background: var(--ms-white);
    padding: 32px 28px;
    border-bottom: 1px solid var(--ms-border);
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 28px;
}

.container-fluid {
    width: 100%;
}

/* Section Header */
.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.section-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

/* Card */
.app-card {
    background: var(--ms-white);
    border: 1px solid var(--ms-border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-depth-4);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ms-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
    z-index: 10;
}

.app-card:hover {
    border-color: var(--ms-primary);
    box-shadow: var(--shadow-depth-8);
    transform: translateY(-2px);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card:focus-within {
    border-color: var(--ms-focus);
    outline: none;
}

.app-card.expanded {
    grid-column: span 1;
}

/* Icon Area */
.app-icon-wrapper {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #f3f2f1 0%, #e1dfdd 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon {
    font-size: 56px;
    font-weight: 400;
    color: var(--ms-primary);
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover .app-icon {
    transform: scale(1.08);
}

/* Icon Variants */
.icon-1 {
    background: linear-gradient(135deg, #eef6fc 0%, #e1effa 100%);
}

.icon-2 {
    background: linear-gradient(135deg, #f7f4ef 0%, #f0ebe4 100%);
}

.icon-3 {
    background: linear-gradient(135deg, #f0ebe8 0%, #e8dfd8 100%);
}

.icon-4 {
    background: linear-gradient(135deg, #eef6fc 0%, #d9eff7 100%);
}

.icon-5 {
    background: linear-gradient(135deg, #f5ebf0 0%, #ecdfe7 100%);
}

.icon-6 {
    background: linear-gradient(135deg, #f0f6f0 0%, #ddf0dd 100%);
}

.icon-1 .app-icon {
    color: var(--ms-primary);
}

.icon-2 .app-icon {
    color: #e45c04;
}

.icon-3 .app-icon {
    color: #a4373a;
}

.icon-4 .app-icon {
    color: #00a4ef;
}

.icon-5 .app-icon {
    color: #c50f1f;
}

.icon-6 .app-icon {
    color: var(--ms-accent);
}

/* Card Header */
.app-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--ms-white);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.app-card:hover .app-header {
    border-bottom-color: var(--ms-light-gray);
}

.app-header-left {
    flex: 1;
}

.app-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.app-status {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.status-active {
    background: #dffcf0;
    color: #107c10;
}

.status-coming {
    background: #fff4ce;
    color: #d97706;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-active .status-dot {
    background: #107c10;
    animation: pulse 2s infinite;
}

.status-coming .status-dot {
    background: #d97706;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Expand Button */
.expand-btn {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    border: 1px solid var(--ms-border);
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.expand-btn:hover {
    background: var(--ms-light-gray);
    border-color: var(--ms-medium-gray);
}

.expand-btn:active {
    background: #e1dfdd;
}

.app-card.expanded .expand-btn {
    background: var(--ms-light-gray);
    color: var(--ms-primary);
}

/* Content Section */
.app-content {
    padding: 0 20px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.app-card.expanded .app-content {
    max-height: 600px;
    padding: 16px 20px;
}

.app-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Features List */
.app-features {
    margin-bottom: 16px;
}

.feature-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.feature-item::before {
    content: '✓';
    font-weight: 700;
    color: var(--ms-accent);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: -2px;
}

/* Footer in Card */
.app-footer {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--ms-border);
}

/* Buttons */
.app-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--ms-border);
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: -0.2px;
    background: transparent;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--ms-primary);
    color: white;
    border-color: var(--ms-primary);
}

.btn-primary:hover {
    background: var(--ms-hover);
    border-color: var(--ms-hover);
}

.btn-primary:active {
    background: var(--ms-focus);
    border-color: var(--ms-focus);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--ms-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--ms-light-gray);
    border-color: var(--ms-medium-gray);
}

.btn-secondary:active {
    background: #e1dfdd;
}

/* Coming Soon Overlay */
.coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(1px);
    border-radius: 4px;
    z-index: 20;
    pointer-events: none;
}

.disabled-card:hover .coming-soon-overlay {
    opacity: 1;
}

.coming-soon-text {
    background: var(--ms-black);
    color: white;
    padding: 12px 24px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* Footer */
footer {
    background: var(--ms-black);
    color: #c7c5c3;
    text-align: center;
    padding: 24px 28px;
    border-top: 1px solid var(--ms-medium-gray);
    margin-top: 40px;
}

footer p {
    font-size: 12px;
    font-weight: 400;
}

footer a {
    color: #c7c5c3;
    text-decoration: none;
}

footer a:hover {
    color: var(--ms-white);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }

    main {
        padding: 20px 20px;
    }

    header nav {
        padding: 12px 20px;
    }

    .page-header {
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    header nav {
        padding: 12px 20px;
        gap: 12px;
    }

    .header-spacer {
        display: none;
    }

    .header-nav-items {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    main {
        padding: 16px 12px;
    }

    .page-title {
        font-size: 24px;
    }

    .app-name {
        font-size: 15px;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .expand-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .app-header {
        padding: 12px 16px;
    }

    .app-icon-wrapper {
        height: 120px;
    }

    .app-icon {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    main {
        padding: 12px 10px;
    }

    .app-header {
        padding: 12px 12px;
    }

    .app-content {
        padding: 0 12px !important;
    }

    .app-card.expanded .app-content {
        padding: 12px 12px !important;
    }

    .feature-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .feature-item {
        font-size: 12px;
        padding: 4px 0;
    }

    .app-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .nav-mobile {
        width: 100%;
    }
}

/* Accessibility */
.app-card:focus,
.expand-btn:focus {
    outline: 2px solid var(--ms-primary);
    outline-offset: 2px;
}

/* Animation on Load */
.grid>.app-card {
    animation: slideInUp 0.4s ease backwards;
}

.grid>.app-card:nth-child(1) {
    animation-delay: 0.05s;
}

.grid>.app-card:nth-child(2) {
    animation-delay: 0.1s;
}

.grid>.app-card:nth-child(3) {
    animation-delay: 0.15s;
}

.grid>.app-card:nth-child(4) {
    animation-delay: 0.1s;
}

.grid>.app-card:nth-child(5) {
    animation-delay: 0.15s;
}

.grid>.app-card:nth-child(6) {
    animation-delay: 0.2s;
}

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

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

/* Link styling */
a {
    color: var(--ms-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}