/* Enhanced T&S Policy Watcher Dashboard Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-gray: #ecf0f1;
    --dark-gray: #34495e;
    --background: #f8f9fa;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.08);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background);
    color: #333;
    min-height: 100vh;
}

/* Header Styles - Subtle Blue Gradient Animation */
header {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        #2980b9 30%, 
        var(--dark-gray) 70%, 
        var(--primary-color) 100%);
    background-size: 200% 200%;
    animation: subtleBlueShift 20s ease-in-out infinite;
    color: white;
    padding: 2rem 0;
    box-shadow: var(--card-shadow);
}

/* Very gentle blue gradient movement */
@keyframes subtleBlueShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-left {
    flex: 1;
}

.header-right {
    flex-shrink: 0;
    margin-left: 2rem;
}

.header-status-bar {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 0.8rem;
    border-radius: 8px;
}

.status-number, .status-icon {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.8rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1;
    display: block;
    height: 1.4rem;
}

/* Health status indicators */
.status-item.operational .status-icon {
    color: #22c55e;  /* Green for operational */
}

.status-item.degraded .status-icon {
    color: #f59e0b;  /* Yellow/Orange for degraded */
}

.status-item.issues .status-icon {
    color: #ef4444;  /* Red for issues */
}

.status-item.issues .status-number {
    color: #fca5a5;  /* Light red for issue icons */
}

.status-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    margin-top: 0;
    white-space: nowrap;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header h1 i {
    margin-right: 0.5rem;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* System Status Indicator */
#system-status-indicator {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#system-status-indicator:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

#system-status-indicator.status-success .stat-icon {
    color: var(--success-color);
}

#system-status-indicator.status-error .stat-icon {
    color: var(--danger-color);
}

/* Newsletter Chat Widget */
.newsletter-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
}

.newsletter-widget.visible {
    display: block;
}

.widget-trigger {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.widget-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
}

.widget-trigger::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f39c12, transparent, #f39c12);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
    opacity: 0.7;
}

.widget-form {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 80px);
    max-height: 400px;
    background: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-sizing: border-box;
    overflow: hidden;
}

.widget-form.expanded {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.widget-form::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    z-index: 10;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.widget-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.widget-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    font-size: 0.9rem;
    font-weight: 600;
}

.widget-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.widget-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    overflow-wrap: break-word;
    hyphens: auto;
}

.widget-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.widget-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
    font-size: 0.9rem;
}

.widget-input-group input:focus {
    border-color: var(--secondary-color);
}

.widget-input-group button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5dade2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    flex-shrink: 0;
    min-width: 120px;
}

.widget-input-group button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.widget-privacy {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-privacy i {
    color: var(--success-color);
}

.widget-validation {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 6px;
    animation: shake 0.3s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-validation i {
    color: var(--danger-color);
    font-size: 0.9rem;
}

.widget-input-group input.invalid {
    border-color: var(--danger-color);
    background: #fff5f5;
}

.widget-input-group input.valid {
    border-color: var(--success-color);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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


@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive widget */
@media (max-width: 768px) {
    .newsletter-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .widget-trigger {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }
    
    .widget-form {
        width: calc(100vw - 60px);
        max-width: 400px;
        right: 20px;
        bottom: 85px;
        padding: 1.2rem;
        max-height: 350px;
        overflow: hidden;
    }
    
    .widget-form::after {
        right: 30px;
    }
    
    .widget-input-group {
        flex-direction: column;
        gap: 0.7rem;
        width: 100%;
    }
    
    .widget-input-group input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .widget-input-group button {
        width: 100%;
        padding: 0.8rem 1.5rem;
        min-width: auto;
        font-size: 1rem;
    }
    
    .widget-title h3 {
        font-size: 1rem;
    }
    
    .widget-subtitle {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .newsletter-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .widget-trigger {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .widget-form {
        width: calc(100vw - 50px);
        max-width: 350px;
        right: 15px;
        bottom: 70px;
        padding: 1rem;
        max-height: 300px;
        overflow: hidden;
    }
    
    .widget-form::after {
        right: 25px;
    }
    
    .widget-title h3 {
        font-size: 0.95rem;
    }
    
    .widget-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .widget-input-group {
        flex-direction: column;
        gap: 0.7rem;
        width: 100%;
    }
    
    .widget-input-group input {
        padding: 0.7rem;
        font-size: 16px; /* Prevents zoom on iOS */
        width: 100%;
        box-sizing: border-box;
    }
    
    .widget-input-group button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        min-width: auto;
    }
}

/* Navigation Styles - Apple-Inspired Design */
.main-nav {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced mobile navigation behavior */
@media (max-width: 768px) {
    .main-nav {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    /* When platform selector is sticky, it takes precedence */
    .platform-selector.sticky {
        z-index: 200;
        top: 0;
    }
    
    /* Hide main nav when platform selector is sticky */
    .main-nav.hidden-by-platform {
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
}

.nav-tab {
    background: none;
    border: none;
    padding: 1.25rem 2.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1d1d1f;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0.25rem;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}

.nav-tab:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.06) 100%);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.25), 0 2px 8px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.nav-tab.active:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f99 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3), 0 4px 12px rgba(52, 152, 219, 0.2);
}

.nav-tab i {
    margin-right: 0.6rem;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-tab:hover i {
    transform: scale(1.05);
}

.nav-tab.active i {
    transform: scale(1.1);
}

/* Focus states for accessibility */
.nav-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Health Alert Banner */
.health-alert-banner {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0;
    margin: 0;
    border-bottom: 3px solid #a93226;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    animation: slideDown 0.3s ease-out;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
}

.alert-message h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.alert-message p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.alert-actions {
    flex-shrink: 0;
}

.alert-dismiss {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 1rem;
}

.alert-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #fafafa, white);
}

.card-header h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.card-header h2 i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.card-body {
    padding: 2rem;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.system-health-card {
    grid-row: span 2;
}

.full-width {
    width: 100%;
    grid-column: 1 / -1;
}

/* Health Badges */
.health-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.health-badge.healthy {
    background: var(--success-color);
    color: white;
}

.health-badge.warning {
    background: var(--warning-color);
    color: white;
}

.health-badge.error {
    background: var(--danger-color);
    color: white;
}

/* Health Metrics */
.health-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.health-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: var(--dark-gray);
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.success {
    background: #d5f4e6;
    color: var(--success-color);
}

.status-badge.warning {
    background: #fdf6e3;
    color: var(--warning-color);
}

.status-badge.error {
    background: #fadbd8;
    color: var(--danger-color);
}

/* Quick Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-row:last-child {
    border-bottom: none;
}

/* Recent Changes List */
.change-item {
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    background: #f8f9fa;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: all 0.3s ease;
}

.change-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.change-header {
    margin-bottom: 1rem;
}

.change-item h4 {
    color: var(--primary-color);
    margin: 0.5rem 0 0 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.change-item .platform-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.change-item .timestamp {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.summary-container {
    margin: 1rem 0;
}

/* Platform Tabs - Enhanced Apple-Inspired Design */
.platform-selector {
    margin-bottom: 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky Platform Selector Styles */
.platform-selector.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    animation: slideDownSticky 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-selector.sticky .platform-tabs {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* Sticky animation */
@keyframes slideDownSticky {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spacer to prevent content jump when platform selector becomes sticky */
.platform-selector-spacer {
    height: 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-selector-spacer.active {
    height: var(--platform-selector-height, 120px);
}

/* Mobile spacer height adjustment */
@media (max-width: 768px) {
    .platform-selector-spacer.active {
        height: var(--platform-selector-height, 100px);
    }
}

@media (max-width: 480px) {
    .platform-selector-spacer.active {
        height: var(--platform-selector-height, 90px);
    }
}

.platform-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

.platform-tab {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 250, 252, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 2rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.platform-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(52, 152, 219, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.platform-tab:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.12) 100%);
    color: #000000;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(52, 152, 219, 0.2);
}

.platform-tab:hover::before {
    opacity: 1;
}

.platform-tab.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.25), 0 4px 16px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px) scale(1.02);
}

.platform-tab.active::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 1;
}

.platform-tab.active:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f99 100%);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(52, 152, 219, 0.3), 0 6px 20px rgba(52, 152, 219, 0.2);
}

.platform-tab i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.platform-tab:hover i {
    transform: scale(1.1) rotate(5deg);
}

.platform-tab.active i {
    transform: scale(1.15);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

.platform-name {
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.platform-tab.active .platform-name {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.platform-tab:hover .platform-name {
    transform: translateX(2px);
}

/* Focus states for accessibility */
.platform-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3), 0 8px 25px rgba(52, 152, 219, 0.15);
}

/* Platform Content */
.platform-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.policy-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    padding: 0;
    border: 1px solid #e8eef3;
    transition: var(--transition);
    overflow: hidden;
}

.policy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
    background-color: rgba(173, 216, 230, 0.1);
}

.summary-preview {
    padding: 1.5rem;
}

.policy-card:hover .summary-preview {
    background-color: rgba(173, 216, 230, 0.15);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.policy-header {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e8eef3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.policy-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.update-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Intelligence Panel Styles */
.intelligence-panel {
    padding: 1.5rem 2rem 2rem 2rem;
    background-color: #f0f4f8;
    border-bottom: 1px solid #e0e0e0;
    max-width: 1200px;
    margin: 0 auto;
}


/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.insight-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
    min-height: 80px;
    cursor: pointer;
    width: 100%;
}

.insight-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.insight-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    min-width: 0;
}

.insight-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--secondary-color);
}

.insight-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.insight-info h3 {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insight-status {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

/* Focus Areas Summary Styles */
.focus-summary {
    line-height: 1.6;
}

.focus-summary p {
    margin: 0 0 0.8rem 0;
    font-size: 0.95rem;
    color: #555;
}

.focus-summary p:last-child {
    margin-bottom: 0;
}

.focus-summary strong {
    color: var(--primary-color);
    font-weight: 600;
}

.focus-summary em {
    color: var(--secondary-color);
    font-style: normal;
    font-weight: 500;
}

/* Legacy CSS removed - now using simplified card structure */

.empty-state h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary {
    margin: 1rem 0;
    line-height: 1.6;
}

.initial-summary {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.update-summary {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
    font-style: italic;
}

.timestamp {
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Recent Changes Expandable Styles */
.change-item.expandable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.change-item.expandable:hover {
    background-color: #f8f9fa;
    border-radius: 6px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
}

.read-less {
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
}

.policy-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.policy-actions a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.policy-actions a:hover {
    color: var(--primary-color);
}

/* History Table */
.history-table-container {
    overflow-x: auto;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
}

#history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#history-table th,
#history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#history-table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--primary-color);
}

#history-table tr:hover {
    background: #f8f9fa;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-icon.success {
    background: var(--success-color);
}

.status-icon.warning {
    background: var(--warning-color);
}

.status-icon.error {
    background: var(--danger-color);
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.platform-activity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.platform-info small {
    color: #666;
    margin-left: 0.5rem;
}

.activity-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.change-count {
    font-weight: 600;
    color: var(--primary-color);
}

.change-rate {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Risk Assessment Indicators */
.risk-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.risk-indicator.elevated {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.risk-indicator.moderate {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.risk-indicator.stable {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* Coverage Analysis */
.gap-indicators {
    margin-top: 1rem;
}

.coverage-item {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #555;
}

/* Platform Frequency Comparison */
.platform-frequency-comparison {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.platform-frequency-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 4px solid var(--light-gray);
    background: #f9f9f9;
    transition: var(--transition);
}

.platform-frequency-stat.high {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.platform-frequency-stat.moderate {
    border-left-color: var(--warning-color);
    background: #fffbf0;
}

.platform-frequency-stat.low {
    border-left-color: var(--success-color);
    background: #f0fdf4;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.platform-info i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.platform-name {
    font-weight: 600;
    color: #333;
}

.frequency-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    font-size: 0.9rem;
}

.change-count {
    font-weight: 600;
    color: #333;
}

.frequency-rate {
    color: #666;
    font-size: 0.8rem;
}

/* Latest Key Change */
.latest-change-card {
    padding: 0.5rem 0;
}

.change-platform {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.change-platform i {
    color: var(--secondary-color);
}

.change-policy {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.change-summary {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

.view-change-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.view-change-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.no-changes-state {
    text-align: center;
    padding: 1rem 0;
    color: #666;
}

.no-changes-state i {
    font-size: 2rem;
    color: var(--success-color);
    margin-bottom: 0.8rem;
}





.icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: var(--dark-gray);
}

.icon-container.intel {
    color: var(--secondary-color);
}

.icon-container.change {
    color: var(--warning-color);
}

.icon-container.system {
    color: var(--success-color);
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

/* Legacy header styles removed */

.card-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.3;
}

/* Enhanced card types - Apple-inspired minimal approach */
/* Removed individual card hover effects */

/* Removed old expansion styles - now using modals */

/* Modal Content Styles */
.platform-activity-details .activity-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.platform-breakdown {
    display: grid;
    gap: 1rem;
}

.platform-detail {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.platform-header h4 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
}

.change-count {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-stats {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.recent-changes .change-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.no-changes {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

.latest-update-details .update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    gap: 2rem;
}

.platform-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.platform-info i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.platform-info div {
    flex: 1;
}

.platform-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.platform-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.update-header .action-btn {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.update-content h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.update-summary {
    line-height: 1.6;
    font-size: 0.95rem;
}

.system-health-details .health-overview {
    margin-bottom: 2rem;
}

.status-indicator {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.status-indicator.operational {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.degraded {
    background: #fef3c7;
    color: #92400e;
}

.status-indicator.down, .status-indicator.issues {
    background: #fee2e2;
    color: #991b1b;
}

.status-indicator h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.status-indicator p {
    margin: 0;
    opacity: 0.8;
}

.recent-runs h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.runs-list {
    display: grid;
    gap: 0.75rem;
}

.run-item {
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.run-item.success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.run-item.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.run-item.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.run-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.run-time {
    font-weight: 600;
    font-size: 0.9rem;
}

.run-status {
    font-size: 0.8rem;
    text-transform: capitalize;
}

.run-stats {
    font-size: 0.8rem;
    color: #666;
}

.chart-placeholder {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    height: 300px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

/* Error Display */
.error-item {
    background: #fadbd8;
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 0.5rem 0;
}

.error-item strong {
    color: var(--danger-color);
}

/* Modal Styles - Simplified and Fixed */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem 2rem 2rem 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-button:hover {
    background-color: #f5f5f5;
    color: #333;
}

.modal-summary {
    margin-bottom: 2rem;
}

.modal-summary h3 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-update {
    background: #fef7e6;
    border: 1px solid #f0b90b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-update h3 {
    color: #856404;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

#run-log-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.run-log-list .log-entry {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-left-width: 5px;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.run-log-list .log-entry:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.log-entry.log-success {
    border-left-color: var(--success-color);
}

.log-entry.log-error {
    border-left-color: var(--danger-color);
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.log-status {
    font-weight: 600;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-timestamp {
    font-size: 0.9em;
    color: var(--secondary-text-color);
}

.log-entry-body {
    font-size: 0.95em;
    color: var(--primary-text-color);
    padding-left: 5px;
    border-left: 2px solid var(--border-color);
    padding: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
}

.log-entry-body span {
    margin-right: 15px;
}

.error-log {
    margin-top: 10px;
    background-color: #fff0f0;
    border: 1px solid var(--danger-color);
    border-radius: 4px;
    padding: 10px;
    font-size: 0.9em;
}

.error-log ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.error-log li {
    margin-bottom: 5px;
}

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

.text-error {
    color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .platform-content {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-right {
        margin-left: 0;
        align-self: stretch;
    }
    
    .header-status-bar {
        gap: 1rem;
        padding: 0.8rem 1rem;
        justify-content: space-around;
    }
    
    .status-item {
        min-width: 60px;
        padding: 0.3rem;
    }
    
    .status-number, .status-icon {
        font-size: 1.4rem;
    }
    
    .status-label {
        font-size: 0.6rem;
    }
    
    /* Mobile-optimized insights grid */
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .insight-card {
        min-height: 80px;
    }
    
    /* Legacy mobile styles removed */
    
    .intelligence-panel {
        padding: 1rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .change-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .change-item h4 {
        font-size: 1.1rem;
    }
    
    .change-item .platform-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 36px;
        margin: 0 0.05rem;
    }
    
    .main-nav {
        padding: 0.25rem 0.5rem;
        gap: 0.125rem;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    main {
        padding: 1rem;
    }
    
    .platform-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .policy-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .update-badge {
        margin-left: 0;
        align-self: flex-start;
    }

    .policy-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .platform-tabs {
        gap: 0.375rem;
        padding: 0.5rem;
    }
    
    .platform-tab {
        padding: 0.5rem 0.75rem;
        min-height: 36px;
        font-size: 0.8rem;
    }
    
    .platform-tab i {
        font-size: 0.9rem;
        margin-right: 0.25rem;
    }
    
    /* Tablet sticky platform selector adjustments */
    .platform-selector.sticky {
        padding: 0.5rem 0.75rem;
    }
    
    .platform-selector.sticky .platform-tab {
        padding: 0.5rem 0.75rem;
        min-height: 36px;
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 1rem;
    }

    .policy-card .summary {
        padding: 1rem;
    }

    .policy-header {
        padding: 1rem;
    }
    
    /* Very small screens - keep horizontal but more compact */
    .main-nav {
        padding: 0.25rem 0.5rem;
        gap: 0.125rem;
        justify-content: space-between;
    }
    
    .nav-tab {
        padding: 0.4rem 0.6rem;
        margin: 0;
        text-align: center;
        justify-content: center;
        border-radius: 6px;
        font-size: 0.75rem;
        min-height: 32px;
        flex: 1;
    }
    
    .nav-tab i {
        font-size: 0.9rem;
        margin-right: 0.25rem;
    }
    
    .nav-tab i {
        margin-right: 0.5rem;
    }
    
    /* Enhanced platform tabs for small screens */
    .platform-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .platform-tab {
        width: 100%;
        padding: 1rem 1.25rem;
        justify-content: flex-start;
        gap: 0.6rem;
        min-height: 48px;
        font-size: 0.9rem;
    }
    
    .platform-tab i {
        font-size: 1rem;
        width: 18px;
    }
    
    .platform-name {
        flex: 1;
        text-align: left;
    }
    
    /* Mobile sticky platform selector adjustments */
    .platform-selector.sticky {
        padding: 0.125rem 0.25rem;
        top: 0;
    }
    
    .platform-selector.sticky .platform-tabs {
        padding: 0.375rem;
        gap: 0.25rem;
    }
    
    .platform-selector.sticky .platform-tab {
        padding: 0.375rem 0.5rem;
        min-height: 32px;
        font-size: 0.75rem;
    }
    
    .platform-selector.sticky .platform-tab i {
        font-size: 0.8rem;
    }
}

/* Loading States */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Markdown Rendering Styles */
.summary .md-h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.summary .md-h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.2rem 0 0.8rem 0;
}

.summary .md-h4 {
    color: var(--dark-gray);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0 0.6rem 0;
}

.summary p {
    margin: 0.8rem 0;
    line-height: 1.7;
    color: #444;
}

.summary ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.summary li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.summary strong {
    color: var(--primary-color);
    font-weight: 600;
}

.summary em {
    color: var(--dark-gray);
    font-style: italic;
}

/* Enhanced Policy Card Summaries */
.policy-card .summary {
    padding: 1.5rem;
    margin: 0;
}

.policy-card .initial-summary {
    background: #fbfcfd;
    border-top: 1px solid #e8eef3;
}

.policy-card .update-summary {
    background: linear-gradient(135deg, #fef8e7, #fffdf5);
    border-top: 1px solid #f4d03f;
    margin-top: 0;
}

.update-label {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-label i {
    font-size: 0.8rem;
}

/* Action Buttons */
.policy-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e8eef3;
    display: flex;
    gap: 0.8rem;
    margin: 0;
}

.action-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.history-btn {
    background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
    color: var(--dark-gray);
    border-color: #bdc3c7;
}

.history-btn:hover {
    background: linear-gradient(135deg, #d5dbdb, #bdc3c7);
    transform: translateY(-1px);
}

.live-btn {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    color: white;
}

.live-btn:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Recent changes in overview */
.change-item .summary {
    background: transparent;
    padding: 0;
    border: none;
    margin: 0.5rem 0;
}

.change-item .summary p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Read More Button */
.read-more-btn {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin: 1rem 0 0.5rem 0;
    transition: var(--transition);
    display: inline-block;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.read-more-btn.expanded {
    background: linear-gradient(135deg, var(--warning-color), #f8c471);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

.read-more-btn.expanded:hover {
    background: linear-gradient(135deg, #e67e22, var(--warning-color));
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.read-more-btn i {
    margin-right: 0.5rem;
}

.full-content {
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Policy Matrix Styles */
.matrix-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.export-btn {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-1px);
}

.matrix-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.matrix-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-gray));
    color: white;
    padding: 1rem 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.matrix-table td {
    padding: 1.2rem 0.8rem;
    border-bottom: 1px solid #e0e6ed;
    vertical-align: top;
    line-height: 1.6;
    border-right: 1px solid #f8f9fa;
}

.matrix-table td:last-child {
    border-right: none;
}

.matrix-table tbody tr:hover {
    background: #f8f9fa;
}

.platform-section {
    background: #f8f9fa !important;
}

.platform-section:hover {
    background: #e9ecef !important;
}

.platform-section td {
    background: #f8f9fa !important;
}

.platform-section:hover td {
    background: #e9ecef !important;
}

.platform-section {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.platform-section:hover {
    background: #e9ecef !important;
}

.platform-section:hover .platform-header-full {
    background: #e9ecef !important;
    border-color: var(--secondary-color) !important;
}

.platform-section .platform-header-full {
    width: 100% !important;
    padding: 1.4rem 1.5rem !important;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-bottom: 2px solid var(--secondary-color) !important;
    text-align: left;
}

.platform-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
}

.platform-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.platform-title i {
    margin-right: 0.75rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.platform-chevron {
    color: #6c757d;
    font-size: 1rem;
    font-weight: normal;
    transition: transform 0.3s ease;
    margin-left: auto;
    margin-right: 1rem;
    min-width: 20px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
}

.platform-section:hover .platform-title {
    color: var(--secondary-color);
}

.platform-accordion-header.collapsed .platform-chevron i {
    transform: rotate(-90deg);
}

.platform-policies {
    transition: opacity 0.3s ease;
}

.platform-policies.collapsed {
    display: none;
}

.platform-header-empty {
    padding: 1rem !important;
    border: none !important;
    background: transparent !important;
}

.matrix-table .status-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matrix-table .status-badge.success {
    background: #d5f4e6;
    color: var(--success-color);
    border: 1px solid #a3e4d7;
}

.matrix-table .status-badge.warning {
    background: #fdf6e3;
    color: var(--warning-color);
    border: 1px solid #f7dc6f;
}

.matrix-table .status-badge.error {
    background: #fadbd8;
    color: var(--danger-color);
    border: 1px solid #f1948a;
}

.link-btn {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.link-btn:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
    transform: translateY(-1px);
    color: white;
}

.link-btn.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.link-btn.disabled:hover {
    background: #e9ecef;
    transform: none;
    color: #6c757d;
}

/* Matrix Table Responsive */
@media (max-width: 768px) {
    .matrix-table {
        font-size: 0.8rem;
    }
    
    .matrix-table th,
    .matrix-table td {
        padding: 0.6rem 0.4rem;
    }
    
    .platform-header {
        font-size: 1rem;
    }
    
    .export-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }