/* InfraZen FinOps Platform - Design System */

:root {
    /* Colors */
    --primary-blue: #1E40AF;
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #1E3A8A;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --error-red: #EF4444;
    
    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    
    /* Background Colors */
    --background-white: #FFFFFF;
    --background-light: #F9FAFB;
    --background-gray: #F3F4F6;
    
    /* Border Colors */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
}

/* Dashboard Layout */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn > i + span {
    margin-left: 0.5rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.kpi-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.kpi-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kpi-subtext-warning {
    color: var(--warning-orange);
    font-weight: 600;
}

.kpi-subtext-muted {
    color: var(--text-muted);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.icon-expense {
    background: rgba(30, 64, 175, 0.12);
    color: var(--primary-blue);
}

.icon-savings {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-green);
}

.icon-resources {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-orange);
}

.icon-providers {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-blue-light);
}

.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-trend.trend-down {
    color: var(--success-green);
}

.kpi-trend.trend-up {
    color: var(--error-red);
}

.kpi-trend.trend-neutral {
    color: var(--text-secondary);
}

.dashboard-section {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.section-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.provider-card {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.25rem;
    background: var(--background-white);
    max-width: 280px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provider-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.provider-badge.gcp {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.provider-badge.sel {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.provider-name {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: lowercase;
}

.provider-connection {
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-connected {
    color: var(--success-green);
}

.status-pending {
    color: var(--warning-orange);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success-green);
    display: inline-block;
}

.status-indicator.status-pending {
    background: var(--warning-orange);
}

.provider-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.provider-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.provider-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.provider-card.add-card {
    border-style: dashed;
    border-color: var(--border-medium);
    background: var(--background-light);
    text-align: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
}

.provider-card.add-card .add-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 64, 175, 0.12);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.provider-card.add-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.provider-card.add-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--background-white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.icon-button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.icon-button.icon-danger {
    color: var(--error-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.icon-button.icon-danger:hover {
    background: rgba(239, 68, 68, 0.08);
}

.link-button {
    border: none;
    background: none;
    color: var(--primary-blue);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    text-decoration: underline;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--background-white);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.filter-pill.active {
    background: rgba(30, 64, 175, 0.12);
    border-color: transparent;
    color: var(--primary-blue);
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
    padding: 2.5rem 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(30, 64, 175, 0.15);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.05) 0%, rgba(30, 64, 175, 0.02) 100%);
    margin-bottom: 1.5rem;
}

.chart-placeholder i {
    font-size: 2.5rem;
    color: var(--primary-blue-light);
}

.chart-placeholder p {
    font-weight: 600;
    color: var(--text-primary);
}

.chart-placeholder span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.summary-metrics {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.usage-percent {
    font-weight: 600;
    color: var(--primary-blue);
}

.usage-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--background-gray);
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--success-green) 100%);
}

.usage-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border-light);
    border-radius: 12px;
    background: var(--background-light);
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(30, 64, 175, 0.12);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 320px;
}

.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.form-control {
    flex: 1;
    min-width: 180px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.875rem;
    background: var(--background-white);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.text-primary-blue {
    color: var(--primary-blue);
}

.text-success {
    color: var(--success-green);
}

.text-warning {
    color: var(--warning-orange);
}

.text-muted {
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .provider-grid {
        grid-template-columns: 1fr;
    }
}

/* Logo Component */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.logo-text span:first-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    line-height: 1;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: 1px solid var(--primary-blue);
}

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

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

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

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--background-white);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent; /* Removed for the new design */
}

.nav-item:hover {
    background: var(--background-light);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--background-light);
    color: var(--primary-blue);
    font-weight: 500;
    border-radius: 0 8px 8px 0; /* Rounded right corners */
    margin-right: 1rem; /* Space from right edge */
}

.nav-icon {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--background-light);
    transition: background-color 0.2s ease;
    min-width: 0; /* Allow shrinking */
}

.user-profile:hover {
    background: var(--background-gray);
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0.125rem;
    margin: -0.125rem;
    min-width: 0; /* Allow shrinking */
    overflow: hidden; /* Hide overflow text */
    max-width: calc(100% - 50px); /* Leave more space for logout button */
}

.user-profile-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-profile-link:active {
    transform: translateY(0);
}

.settings-icon {
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-left: auto;
}

.user-profile-link:hover .settings-icon {
    color: rgba(0, 0, 0, 0.9);
    transform: rotate(45deg);
}

.logout-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(0, 0, 0, 0.8) !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0 !important;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.05); /* Darker background */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Darker border */
    margin-left: 0.25rem; /* Add some margin */
}

.logout-icon:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: rgba(0, 0, 0, 1) !important;
    transform: scale(1.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.content-header {
    background: var(--background-white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.content-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    background: var(--background-white);
}

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

.landing-hero {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-title .highlight {
    color: var(--primary-blue);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-light);
    padding: 2rem;
}

.login-card {
    background: var(--background-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-login-btn:hover {
    background: var(--background-light);
    border-color: var(--border-medium);
}

/* Placeholder Content */
.placeholder-content {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.placeholder-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.placeholder-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.flash-message.flash-success {
    background-color: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success-green);
}

.flash-message.flash-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--error-red);
}

.flash-message.flash-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning-orange);
}

.flash-message.flash-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--primary-blue);
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    margin-left: auto;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flash-close:hover {
    opacity: 1;
}

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

/* Admin and Role Styles */
.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 0;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.user-role {
    margin-top: 0.25rem;
}

.role-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.role-user {
    background-color: #E3F2FD;
    color: #1976D2;
}

.role-admin {
    background-color: #FFF3E0;
    color: #F57C00;
}

.role-super_admin {
    background-color: #FCE4EC;
    color: #C2185B;
}

.role-demo {
    background-color: #F3F4F6;
    color: #6B7280;
}

.impersonation-warning {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    color: var(--warning-orange);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: space-between;
}

.impersonation-warning:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.impersonation-warning:active {
    transform: translateY(0);
}

.impersonation-warning span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.admin-table th {
    background: var(--background-light);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.admin-table tbody tr:hover {
    background: var(--background-light);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.btn-warning {
    background-color: var(--warning-orange);
    color: white;
    border: 1px solid var(--warning-orange);
}

.btn-warning:hover {
    background-color: #D97706;
    border-color: #D97706;
}

.btn-danger {
    background-color: var(--error-red);
    color: white;
    border: 1px solid var(--error-red);
}

.btn-danger:hover {
    background-color: #DC2626;
    border-color: #DC2626;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #D4EDDA;
    color: #155724;
}

.status-badge.inactive {
    background-color: #F8D7DA;
    color: #721C24;
}

/* User Info in Tables */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.user-company {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-medium);
    background: white;
    color: var(--text-primary);
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination button:hover {
    background: var(--background-light);
}

.pagination button.btn-primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-medium);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 3rem;
}

/* Admin Navigation Styles */
.admin-nav {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.admin-nav-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
}

.admin-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.admin-nav-tab:hover {
    color: var(--primary-blue);
    background-color: var(--background-light);
}

.admin-nav-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background-color: var(--background-light);
}

.admin-nav-tab i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Unrecognized Resources Page Styles */
.compact-filters {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--background-white);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--background-white);
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}


.results-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.resources-container {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.error-state {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem;
    border-left: 4px solid var(--error-red);
}

.modern-table {
    overflow-x: auto;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-white);
}

.resources-table thead {
    background: var(--background-light);
}

.resources-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

.resources-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.resource-row:hover {
    background: var(--background-light);
}

.col-resource {
    min-width: 200px;
}

.col-type {
    min-width: 120px;
}

.col-provider {
    min-width: 150px;
}

.col-user {
    min-width: 180px;
}

.col-discovered {
    min-width: 140px;
}

.col-status {
    min-width: 100px;
}

.col-actions {
    min-width: 120px;
}

.resource-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.resource-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.resource-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.resource-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.provider-info, .user-info, .discovery-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.provider-name, .user-email, .discovery-date {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.provider-connection, .user-name, .discovery-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.resolved {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.status-badge.unresolved {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-orange);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.admin-content .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.admin-content .action-btn.view-btn {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
}

.admin-content .action-btn.view-btn:hover {
    background: var(--primary-blue);
    color: white;
}

.admin-content .action-btn.resolve-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.admin-content .action-btn.resolve-btn:hover {
    background: var(--success-green);
    color: white;
}

.admin-content .action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

.admin-content .action-btn.delete-btn:hover {
    background: var(--error-red);
    color: white;
}


/* Empty States */
.empty-state-cell {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-results, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.empty-results i, .empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-results h3, .empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.empty-results p, .empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
    text-align: center;
}

/* Pagination */
.pagination-container {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--background-light);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    background: var(--background-white);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination button:hover {
    background: var(--background-light);
    border-color: var(--border-medium);
}

.pagination button.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .view-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
}

@media (max-width: 768px) {
    .compact-filters {
        padding: 1rem;
    }
    
    .resources-table {
        font-size: 0.75rem;
    }
    
    .resources-table th,
    .resources-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
}

