:root {
    /* Colors matches other Ollie apps */
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-tertiary: #3a3a3c;
    --bg-hover: #48484a;
    
    --text-primary: #ffffff;
    --text-secondary: #b0b0b8;
    --text-muted: #76767e;
    
    --border-color: #48484a;
    --border-light: #545456;
    
    --primary: #0a84ff;
    --primary-hover: #409cff;
    
    --success: #30d158;
    --warning: #ffd60a;
    --error: #ff453a;
    --offline: #76767e;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden; /* App-like feel, no scroll */
    user-select: none;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.hub-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area .material-symbols-rounded {
    color: var(--primary);
    font-size: 24px;
}

.logo-area h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.version-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

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

.last-sync-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.icon-btn .material-symbols-rounded {
    font-size: 20px;
}

.hub-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.ecosystem-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ecosystem-summary p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.global-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* Status Indicator Dots */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--offline);
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
    position: relative;
}

.status-indicator.live {
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(35, 134, 54, 0.2);
}

.status-indicator.live::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--success);
    opacity: 0;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-indicator.warning {
    background-color: var(--warning);
    box-shadow: 0 0 0 2px rgba(210, 153, 34, 0.2);
}

.status-indicator.error {
    background-color: var(--error);
    box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.2);
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

/* Grid Layout */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* App Cards */
.app-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--border-light);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.app-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.app-icon .material-symbols-rounded {
    font-size: 24px;
}

.app-info h2 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

.app-info .app-id {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.app-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.app-status.status-online {
    color: #4ec9b0; /* green-ish */
}

.app-status.status-offline {
    color: var(--text-secondary);
}

.app-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.detail-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label .material-symbols-rounded {
    font-size: 14px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: inherit;
}

.detail-value.mono {
    font-family: monospace;
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
