/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Network Environment & Management Operations Theme */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 25%, #1a1a1a 50%, #262626 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: organizationalGradient 25s ease infinite;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.3);
    position: relative;
}

/* Tech Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 107, 53, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: organizationalGridMove 30s linear infinite;
    pointer-events: none;
    z-index: -2;
}

/* Dynamic Mouse Particle System */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 107, 53, 0.08) 0%, 
        rgba(255, 140, 66, 0.04) 30%, 
        transparent 70%);
    pointer-events: none;
    z-index: -1;
    transition: background 0.1s ease;
}

/* Mouse Trail Particles */
.mouse-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: mouseTrailFade 1s ease-out forwards;
}

@keyframes mouseTrailFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes organizationalGradient {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg); }
    25% { background-position: 100% 50%; filter: hue-rotate(15deg); }
    50% { background-position: 100% 100%; filter: hue-rotate(30deg); }
    75% { background-position: 0% 100%; filter: hue-rotate(45deg); }
    100% { background-position: 0% 50%; filter: hue-rotate(60deg); }
}

@keyframes organizationalGridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Password Protection Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 25%, #1a1a1a 50%, #262626 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: organizationalGradient 25s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 107, 53, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: organizationalGridMove 30s linear infinite;
    pointer-events: none;
    z-index: -1;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-box {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 140, 66, 0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    z-index: -1;
}

.organization-seal {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    animation: sealGlow 3s ease-in-out infinite;
}

.organization-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.organization-subtitle {
    color: #cccccc;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 400;
    opacity: 0.8;
}

.organization-tagline {
    color: #ff8c42;
    font-size: 0.9rem;
    margin-bottom: 25px;
    font-weight: 500;
    font-style: italic;
    opacity: 0.9;
}

.access-level {
    margin-bottom: 30px;
}

.classification {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    animation: classificationPulse 2s ease-in-out infinite;
}

@keyframes sealGlow {
    0%, 100% { 
        box-shadow: 0 10px 30px rgba(100, 200, 255, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 15px 40px rgba(100, 200, 255, 0.5);
        transform: scale(1.05);
    }
}

@keyframes classificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(26, 26, 26, 0.8);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.input-group input:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: rgba(26, 26, 26, 1);
}

.input-group input::placeholder {
    color: #999999;
    opacity: 0.6;
}

.input-group i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999999;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.input-group input:focus + i {
    color: #ff6b35;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #ff6b6b;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
    background: rgba(255, 107, 107, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.organization-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

.organization-footer p {
    color: #cccccc;
    font-size: 0.85rem;
    margin: 5px 0;
    opacity: 0.8;
}

.timestamp {
    font-family: 'Courier New', monospace;
    color: #ff6b35 !important;
    font-weight: 500;
}

/* Main Dashboard */
.dashboard {
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.3);
}

/* Top Navigation */
.top-nav {
    background: rgba(45, 57, 75, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(156, 201, 245, 0.2);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8eaed;
}

.brand-logo i {
    color: #9cc9f5;
    font-size: 1.8rem;
}

.brand-text {
    color: #9cc9f5;
    text-shadow: 0 0 10px rgba(156, 201, 245, 0.3);
    font-weight: 600;
}

.organization-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(156, 201, 245, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(156, 201, 245, 0.2);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 0.85rem;
    color: #9cc9f5;
    font-weight: 500;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    color: #8e9297;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e4e6eb;
}

.nav-item.active {
    background: linear-gradient(135deg, #64c8ff 0%, #9664ff 100%);
    color: white;
}

.nav-item i {
    font-size: 1rem;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #64c8ff 0%, #9664ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.profile-name {
    color: #e4e6eb;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 6px;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.3);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(26, 26, 46, 0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    overflow-y: auto;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    color: #8e9297;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #8e9297;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e4e6eb;
}

.sidebar-link.active {
    background: rgba(100, 200, 255, 0.1);
    color: #64c8ff;
    border-right: 3px solid #64c8ff;
}

.sidebar-link i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    height: calc(100vh - 64px);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2rem;
    font-weight: 700;
    color: #e8eaed;
}

.page-title i {
    color: #9cc9f5;
    text-shadow: 0 0 10px rgba(156, 201, 245, 0.3);
}

.content-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e4e6eb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: sectionFadeIn 0.5s ease;
}

@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.status-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.status-card.critical {
    --accent-color: #ff6b6b;
}

.status-card.warning {
    --accent-color: #fbbf24;
}

.status-card.info {
    --accent-color: #3b82f6;
}

.status-card.success {
    --accent-color: #10b981;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.card-content h3 {
    color: #e4e6eb;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.label {
    color: #8e9297;
    font-size: 0.9rem;
}

.status-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-indicator.operational {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-indicator.secure {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-indicator.updated {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.status-indicator.healthy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Systems Section */
.systems-section {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #e4e6eb;
    font-size: 1.5rem;
    font-weight: 600;
}

.section-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #8e9297;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}

.control-btn.active {
    background: linear-gradient(135deg, #64c8ff 0%, #9664ff 100%);
    color: white;
    border-color: transparent;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.system-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--system-color), transparent);
}

.system-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.system-card[data-category="proxy"] {
    --system-color: #3b82f6;
}

.system-card[data-category="remote"] {
    --system-color: #10b981;
}

.system-card[data-category="dev"] {
    --system-color: #8b5cf6;
}

.system-card[data-category="sec"] {
    --system-color: #f59e0b;
}

.system-card[data-category="workflow"] {
    --system-color: #ef4444;
}

.system-card[data-category="container"] {
    --system-color: #06b6d4;
}

.system-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.system-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--system-color), rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.system-info {
    flex: 1;
}

.system-info h3 {
    color: #e4e6eb;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.system-domain {
    color: #8e9297;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.classification {
    background: rgba(255, 255, 255, 0.1);
    color: #8e9297;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-text {
    color: #4ade80;
    font-size: 0.85rem;
    font-weight: 500;
}

.system-actions {
    display: flex;
    gap: 10px;
}

.system-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.system-btn.primary {
    background: linear-gradient(135deg, #64c8ff 0%, #9664ff 100%);
    color: white;
}

.system-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(100, 200, 255, 0.3);
}

.system-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #8e9297;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.system-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #64c8ff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .systems-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        top: 0;
    }
    
    .dashboard-layout {
        flex-direction: column;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .systems-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Filter animations */
.system-card.hidden {
    display: none;
}

.system-card.show {
    animation: cardSlideIn 0.3s ease;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}