:root {
    --primary-bg: #f4f6f8;
    /* Soft industrial light bg */
    --sidebar-bg: #091a2e;
    /* Navy blue - institutional */
    --sidebar-text: #e0e6ed;
    --accent-color: #0d8df1;
    /* Bright blue for accents */
    --text-main: #333d47;
    --text-muted: #6b7a8a;
    --card-bg: #ffffff;
    --border-color: #d1d9e0;
    --success: #2e8b57;
    /* Sea green */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow: hidden;
    /* Avoid main body scroll */
}

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

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.sidebar-header {
    padding: 0 1.5rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    color: #fff;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
}

.version-tag {
    margin-top: 0.8rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin-bottom: 0.2rem;
}

.nav-btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-btn.active {
    background: rgba(13, 141, 241, 0.1);
    border-left: 4px solid var(--accent-color);
    color: #fff;
    font-weight: 600;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 3.5rem;
    position: relative;
    background: var(--primary-bg);
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.content-header h1 {
    font-size: 2.2rem;
    color: var(--sidebar-bg);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* CARDS & GRIDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 1.25rem;
    color: var(--sidebar-bg);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card p {
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-panel {
    background: #fff;
    padding: 1.5rem;
    border-left: 4px solid var(--sidebar-bg);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.info-panel h3 {
    margin-bottom: 0.8rem;
    color: var(--sidebar-bg);
}

.stats-list {
    margin-top: 1rem;
    list-style-position: inside;
    line-height: 1.8;
}

/* TABLES */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--sidebar-bg);
}

.status.success {
    background-color: rgba(46, 139, 87, 0.15);
    color: var(--success);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ALERTS */
.alert-box {
    margin-top: 2rem;
    padding: 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-box.security {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* DIAGRAM TABS */
.diagram-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.diagram-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
}

.diagram-btn:hover {
    background: var(--primary-bg);
}

.diagram-btn.active {
    background: var(--sidebar-bg);
    color: #fff;
    border-color: var(--sidebar-bg);
}

.diagram-viewer {
    background: #fff;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.feature-list {
    margin-top: 1rem;
    list-style: none;
}

.feature-list li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

/* DEPLOYMENT */
.center-div {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.deploy-card {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    border: 1px solid var(--border-color);
}

.ip-display {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: left;
    font-family: monospace;
    font-size: 1rem;
    line-height: 1.6;
    border-left: 4px solid var(--sidebar-bg);
}

.deploy-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.deploy-button:hover {
    background-color: #0a73c7;
}

.cyber-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

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