/* ZMDM Application Layout Styles */

/* Main Application Structure */
#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--gw-gray-50);
}

/* Fixed Header */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--gw-surface);
    border-bottom: 1px solid var(--gw-gray-200);
    box-shadow: var(--gw-shadow-sm);
    height: 40px; /* Reduced header height */
}

/* Main Content Area */
#app-content {
    position: fixed;
    top: 40px; /* Header height */
    bottom: 40px; /* Footer height */
    left: 0;
    right: 0;
    padding: var(--gw-spacing-xl) var(--gw-spacing-md) var(--gw-spacing-md);
    overflow-y: auto;
    background: var(--gw-gray-50);
}

/* Fixed Footer */
#app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--gw-gray-900);
    color: var(--gw-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gw-spacing-md);
    border-top: 1px solid var(--gw-gray-800);
    z-index: 999;
}

/* Footer Sections */
.footer-left {
    display: flex;
    align-items: center;
}

/* Ask Zora — Footer button (kept for backward compat) */
.ask-zora-btn {
    background: transparent;
    border: 1px solid var(--gw-gray-600);
    color: var(--gw-gray-200);
    padding: var(--gw-spacing-xs) var(--gw-spacing-sm);
    border-radius: var(--gw-border-radius-md);
    font-size: var(--gw-font-size-xs);
    font-weight: var(--gw-font-weight-medium);
    cursor: pointer;
    transition: var(--gw-transition);
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-xs);
}

.ask-zora-btn:hover {
    background: var(--gw-gray-800);
    border-color: var(--gw-gray-500);
    color: var(--gw-gray-100);
}

/* Ask Zora — Top navbar CTA button */
.ask-zora-nav-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1;
}

.ask-zora-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.ask-zora-nav-btn .material-icons {
    font-size: 14px;
}


.zora-indicator {
    width: 8px;
    height: 8px;
    background: var(--gw-green-500);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.demo-launch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: var(--gw-spacing-xs) var(--gw-spacing-sm);
    border-radius: var(--gw-border-radius-md);
    font-size: var(--gw-font-size-xs);
    font-weight: var(--gw-font-weight-medium);
    cursor: pointer;
    transition: var(--gw-transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.demo-launch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.demo-launch-btn i {
    font-size: 16px;
}

.footer-right {
    display: flex;
    align-items: center;
    font-size: var(--gw-font-size-xs);
    color: var(--gw-gray-400);
    font-style: italic;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Content Loading States */
.content-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    flex-direction: column;
    gap: var(--gw-spacing-md);
}

.content-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gw-gray-200);
    border-top: 4px solid var(--gw-primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation Active States */
.gw-nav-link.active {
    color: var(--gw-primary-600) !important;
    background: var(--gw-primary-50);
    border-radius: var(--gw-border-radius-md);
}

.gw-nav-link.active .material-icons {
    color: var(--gw-primary-600) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #app-content {
        top: 40px;
        bottom: 60px;
        padding: var(--gw-spacing-sm);
    }
    
    #app-footer {
        height: 60px;
        flex-direction: column;
        gap: var(--gw-spacing-xs);
        padding: var(--gw-spacing-xs) var(--gw-spacing-md);
        text-align: center;
    }
    
    .footer-left, .footer-right {
        justify-content: center;
    }
    
    .footer-right {
        font-size: var(--gw-font-size-xs);
    }
}

/* Content Fade Transitions */
.content-fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.content-fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-fade-exit {
    opacity: 1;
    transform: translateY(0);
}

.content-fade-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure content doesn't overlap with fixed elements */
.container-fluid {
    max-width: 100%;
    padding-left: var(--gw-spacing-lg);
    padding-right: var(--gw-spacing-lg);
}

/* Loading indicator for dynamic content */
.content-container {
    min-height: calc(100vh - 80px);
    position: relative;
}

/* Header improvements */
.gw-navbar {
    padding: var(--gw-spacing-xs) 0;
    height: 40px;
    display: flex;
    align-items: center;
}

.gw-navbar-brand {
    font-size: var(--gw-font-size-md);
    font-weight: var(--gw-font-weight-bold);
    text-decoration: none;
    color: var(--gw-gray-900);
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-xs);
}

.gw-navbar-brand:hover {
    color: var(--gw-primary-600);
    text-decoration: none;
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: var(--gw-spacing-xs);
}

.gw-navbar-nav {
    display: flex;
    gap: var(--gw-spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.gw-nav-item {
    margin: 0;
}

.gw-nav-link {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-xs);
    padding: var(--gw-spacing-xs) var(--gw-spacing-sm);
    color: var(--gw-gray-700);
    text-decoration: none;
    border-radius: var(--gw-border-radius-md);
    transition: var(--gw-transition);
    font-size: var(--gw-font-size-sm);
    font-weight: var(--gw-font-weight-medium);
}

.gw-nav-link:hover {
    color: var(--gw-primary-600);
    background: var(--gw-primary-50);
    text-decoration: none;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: var(--gw-spacing-xs);
    cursor: pointer;
    color: var(--gw-gray-700);
}

.mobile-menu-toggle .material-icons {
    font-size: 24px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Mobile navigation */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .gw-navbar-nav {
        position: fixed;
        top: 40px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 40px);
        background: var(--gw-surface);
        flex-direction: column;
        padding: var(--gw-spacing-md);
        box-shadow: var(--gw-shadow-lg);
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .gw-navbar-nav.mobile-menu-open {
        left: 0;
    }
    
    .gw-nav-item {
        width: 100%;
    }
    
    .gw-nav-link {
        font-size: var(--gw-font-size-sm);
        padding: var(--gw-spacing-sm);
        width: 100%;
        justify-content: flex-start;
    }
    
    .gw-nav-link .material-icons {
        margin-right: var(--gw-spacing-sm);
    }
    
    /* Hide text on very small screens */
    @media (max-width: 576px) {
        .gw-navbar-brand {
            font-size: var(--gw-font-size-sm);
        }
    }
}

/* Lineage and Relationship Node Styles */
.lineage-node, .relationship-node {
    background: var(--gw-surface);
    border: 2px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-lg);
    margin: var(--gw-spacing-sm);
    transition: var(--gw-transition);
    cursor: pointer;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gw-spacing-sm);
}

.lineage-node:hover, .relationship-node:hover {
    box-shadow: var(--gw-shadow-lg);
    border-color: var(--gw-primary-500);
}

.lineage-node.source, .relationship-node.source {
    border-color: var(--gw-green-500);
    background: var(--gw-green-50);
}

.lineage-node.transformation, .relationship-node.transformation {
    border-color: var(--gw-blue-500);
    background: var(--gw-blue-50);
}

.lineage-node.target, .relationship-node.target {
    border-color: var(--gw-purple-500);
    background: var(--gw-purple-50);
}

.lineage-node .material-icons, .relationship-node .material-icons {
    font-size: 2rem;
    color: var(--gw-gray-700);
}

.lineage-node.source .material-icons {
    color: var(--gw-green-600);
}

.lineage-node.transformation .material-icons {
    color: var(--gw-blue-600);
}

.lineage-node.target .material-icons {
    color: var(--gw-purple-600);
}

.lineage-flow, .relationship-container {
    padding: var(--gw-spacing-xl);
    background: var(--gw-gray-50);
    border-radius: var(--gw-border-radius-lg);
    border: 1px solid var(--gw-gray-200);
}

/* System List Styles */
.system-list {
    display: flex;
    flex-direction: column;
    gap: var(--gw-spacing-sm);
}

.system-item {
    background: var(--gw-gray-50);
    border-radius: var(--gw-border-radius-md);
    padding: var(--gw-spacing-md);
    transition: var(--gw-transition);
}

.system-item:hover {
    background: var(--gw-gray-100);
}

/* User Profile Navigation */
.user-profile {
    padding: var(--gw-spacing-xs) !important;
    border-radius: var(--gw-border-radius-lg);
}

.user-avatar {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gw-primary-100);
    border-radius: 50%;
    color: var(--gw-primary-600);
}

.user-avatar .material-icons {
    font-size: 18px;
}

/* Adjust header icons */
.gw-navbar .material-icons {
    font-size: 18px;
}

.gw-navbar-brand .material-icons {
    font-size: 20px;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gw-primary-100);
    border-radius: 50%;
    color: var(--gw-primary-600);
    margin-right: var(--gw-spacing-md);
}

.user-avatar-large .material-icons {
    font-size: 3rem;
}

/* Domain Cards */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gw-spacing-lg);
}

.domain-card {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-lg);
    transition: var(--gw-transition);
    cursor: pointer;
}

.domain-card:hover {
    box-shadow: var(--gw-shadow-lg);
    border-color: var(--gw-primary-300);
}

.domain-header {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-md);
    margin-bottom: var(--gw-spacing-md);
}

.domain-icon {
    font-size: 2rem;
    color: var(--gw-primary-600);
}

.domain-title {
    font-size: var(--gw-font-size-lg);
    font-weight: var(--gw-font-weight-semibold);
    margin: 0;
}

.domain-stats {
    display: flex;
    gap: var(--gw-spacing-lg);
    margin-bottom: var(--gw-spacing-md);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: var(--gw-font-size-lg);
    font-weight: var(--gw-font-weight-bold);
    color: var(--gw-gray-900);
}

.stat-label {
    display: block;
    font-size: var(--gw-font-size-sm);
    color: var(--gw-gray-600);
}

/* Workflow Cards */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--gw-spacing-lg);
}

.workflow-card {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-xl);
}

.workflow-header {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-md);
    margin-bottom: var(--gw-spacing-md);
}

.workflow-icon {
    font-size: 2rem;
    color: var(--gw-primary-600);
}

.workflow-title {
    font-size: var(--gw-font-size-lg);
    font-weight: var(--gw-font-weight-semibold);
    margin: 0;
}

.workflow-description {
    color: var(--gw-gray-600);
    margin-bottom: var(--gw-spacing-md);
}

.workflow-stats {
    display: flex;
    gap: var(--gw-spacing-sm);
    margin-bottom: var(--gw-spacing-lg);
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--gw-gray-100);
    color: var(--gw-gray-700);
    padding: var(--gw-spacing-xs) var(--gw-spacing-sm);
    border-radius: var(--gw-border-radius-pill);
    font-size: var(--gw-font-size-xs);
    font-weight: var(--gw-font-weight-medium);
}

.stat-badge.success {
    background: var(--gw-green-100);
    color: var(--gw-green-700);
}

.stat-badge.warning {
    background: var(--gw-yellow-100);
    color: var(--gw-yellow-700);
}

/* Admin Cards */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gw-spacing-lg);
}

.admin-card {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-lg);
    cursor: pointer;
    transition: var(--gw-transition);
}

.admin-card:hover {
    box-shadow: var(--gw-shadow-lg);
    border-color: var(--gw-primary-300);
}

.admin-header {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-md);
    margin-bottom: var(--gw-spacing-sm);
}

.admin-icon {
    font-size: 2rem;
    color: var(--gw-primary-600);
}

.admin-title {
    font-size: var(--gw-font-size-lg);
    font-weight: var(--gw-font-weight-semibold);
    margin: 0;
}

.admin-description {
    color: var(--gw-gray-600);
    margin-bottom: var(--gw-spacing-md);
}

.admin-stats .stat-value {
    font-size: var(--gw-font-size-md);
    color: var(--gw-primary-600);
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--gw-spacing-sm);
}

.quick-action-btn {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-md);
    padding: var(--gw-spacing-md);
    text-align: center;
    cursor: pointer;
    transition: var(--gw-transition);
    text-decoration: none;
    color: var(--gw-gray-700);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gw-spacing-sm);
}

.quick-action-btn:hover {
    background: var(--gw-primary-50);
    border-color: var(--gw-primary-200);
    color: var(--gw-primary-700);
}

.quick-action-btn .material-icons {
    font-size: 1.5rem;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: var(--gw-spacing-md);
}

.activity-item {
    display: flex;
    gap: var(--gw-spacing-md);
    padding: var(--gw-spacing-md);
    background: var(--gw-gray-50);
    border-radius: var(--gw-border-radius-md);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.success {
    background: var(--gw-green-100);
    color: var(--gw-green-600);
}

.activity-icon.info {
    background: var(--gw-blue-100);
    color: var(--gw-blue-600);
}

.activity-icon.warning {
    background: var(--gw-yellow-100);
    color: var(--gw-yellow-600);
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--gw-spacing-xs);
}

.activity-time {
    font-size: var(--gw-font-size-xs);
    color: var(--gw-gray-500);
}

.activity-details {
    font-size: var(--gw-font-size-sm);
    color: var(--gw-gray-600);
}

/* System Status */
.system-status {
    display: flex;
    flex-direction: column;
    gap: var(--gw-spacing-md);
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-size: var(--gw-font-size-sm);
    color: var(--gw-gray-700);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.online {
    background: var(--gw-green-500);
}

.status-indicator.warning {
    background: var(--gw-yellow-500);
}

.status-indicator.offline {
    background: var(--gw-red-500);
}

/* Search Interface */
.search-container {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-xl);
}

.search-bar-advanced {
    margin-bottom: var(--gw-spacing-lg);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-md);
    background: var(--gw-gray-50);
    border: 2px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-md);
}

.search-icon {
    color: var(--gw-gray-500);
}

.search-input-advanced {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--gw-font-size-base);
    color: var(--gw-gray-900);
}

.search-input-advanced::placeholder {
    color: var(--gw-gray-500);
}

.search-filters-advanced .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gw-spacing-md);
}

.quick-searches {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-xl);
}

.quick-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gw-spacing-md);
}

.quick-search-item {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-md);
    padding: var(--gw-spacing-md);
    background: var(--gw-gray-50);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-md);
    cursor: pointer;
    transition: var(--gw-transition);
}

.quick-search-item:hover {
    background: var(--gw-primary-50);
    border-color: var(--gw-primary-200);
    color: var(--gw-primary-700);
}

/* Profile Cards */
.profile-card {
    background: var(--gw-surface);
    border: 1px solid var(--gw-gray-200);
    border-radius: var(--gw-border-radius-lg);
    padding: var(--gw-spacing-lg);
    margin-bottom: var(--gw-spacing-lg);
}

.profile-section-title {
    font-size: var(--gw-font-size-lg);
    font-weight: var(--gw-font-weight-semibold);
    margin-bottom: var(--gw-spacing-md);
    color: var(--gw-gray-900);
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gw-spacing-sm) 0;
    border-bottom: 1px solid var(--gw-gray-100);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    font-weight: var(--gw-font-weight-medium);
    color: var(--gw-gray-700);
}

.permission-list {
    display: flex;
    flex-direction: column;
    gap: var(--gw-spacing-sm);
}

.permission-item {
    display: flex;
    align-items: center;
    gap: var(--gw-spacing-sm);
}

.activity-summary {
    display: flex;
    flex-direction: column;
    gap: var(--gw-spacing-md);
}

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

.activity-stat .stat-number {
    display: block;
    font-size: var(--gw-font-size-xl);
    font-weight: var(--gw-font-weight-bold);
    color: var(--gw-primary-600);
}

.activity-stat .stat-label {
    display: block;
    font-size: var(--gw-font-size-sm);
    color: var(--gw-gray-600);
}

.profile-actions {
    display: flex;
    gap: var(--gw-spacing-md);
    flex-wrap: wrap;
}