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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

.hidden {
    display: none !important;
}

/* Login Section */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-button {
    padding: 14px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover {
    background: #5a67d8;
}

.login-info {
    margin-top: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.login-info p {
    margin-bottom: 5px;
    font-size: 14px;
    color: #4a5568;
}

.login-info code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: #f7fafc;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 2rem;
    color: #667eea;
}

.header-left h1 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-user {
    color: #4a5568;
    font-weight: 500;
}

.logout-button {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-button:hover {
    background: #c53030;
}

.admin-nav {
    background: white;
    padding: 0 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 5px;
}

.nav-button {
    padding: 15px 20px;
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button:hover {
    color: #4a5568;
    background: #f7fafc;
}

.nav-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.admin-main {
    flex: 1;
    padding: 30px;
}

.admin-section {
    display: none;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-button, .add-button {
    padding: 10px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-button:hover, .add-button:hover {
    background: #5a67d8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #667eea;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-content p {
    color: #718096;
    font-size: 14px;
}

.status-online {
    color: #38a169 !important;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-text {
    color: #4a5568;
    font-size: 14px;
}

.activity-time {
    color: #a0aec0;
    font-size: 12px;
}

.system-info p {
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 14px;
}

.no-data {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Table */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.data-table tr:hover {
    background: #f7fafc;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-inactive {
    background: #fed7d7;
    color: #742a2a;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    background: #bee3f8;
    color: #2c5aa0;
}

.role-user {
    background: #e2e8f0;
    color: #4a5568;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.edit-button {
    background: #bee3f8;
    color: #2c5aa0;
}

.edit-button:hover {
    background: #90cdf4;
}

.delete-button {
    background: #fed7d7;
    color: #742a2a;
}

.delete-button:hover {
    background: #feb2b2;
}

/* Connections and Topics */
.connections-list, .topics-list {
    display: grid;
    gap: 15px;
}

.connection-card, .topic-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.connection-header, .topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.connection-title, .topic-title {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-time, .topic-subscribers {
    color: #a0aec0;
    font-size: 12px;
}

.connection-activity {
    margin: 8px 0;
    padding: 8px;
    background: #f7fafc;
    border-radius: 4px;
    border-left: 3px solid #48bb78;
}

.connection-activity small {
    color: #4a5568;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.connection-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.topic-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    color: #a0aec0;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cancel-button, .save-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.cancel-button {
    background: #e2e8f0;
    color: #4a5568;
}

.cancel-button:hover {
    background: #cbd5e0;
}

.save-button {
    background: #667eea;
    color: white;
}

.save-button:hover {
    background: #5a67d8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-nav {
        padding: 0 20px;
        overflow-x: auto;
    }

    .admin-main {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* System Monitor Styles */
.system-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.system-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.system-card-header {
    background: #f7fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.system-card-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-card-content {
    padding: 20px;
}

/* Memory Monitor */
.memory-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.memory-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.memory-used {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.memory-used.low {
    background: linear-gradient(90deg, #48bb78, #68d391);
}

.memory-used.medium {
    background: linear-gradient(90deg, #ed8936, #f6ad55);
}

.memory-used.high {
    background: linear-gradient(90deg, #e53e3e, #fc8181);
}

.memory-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.memory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.memory-item .label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.memory-item .value {
    font-size: 13px;
    color: #2d3748;
    font-weight: 600;
}

/* CPU Monitor */
.cpu-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cpu-gauge {
    flex-shrink: 0;
}

.gauge-container {
    position: relative;
    width: 120px;
    height: 60px;
    overflow: hidden;
}

.gauge-container::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border: 8px solid #e2e8f0;
    border-radius: 50%;
    border-bottom-color: transparent;
    top: 0;
    left: 0;
}

.gauge-fill {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 8px solid transparent;
    border-radius: 50%;
    border-bottom-color: #667eea;
    border-left-color: #667eea;
    top: 0;
    left: 0;
    transform-origin: center bottom;
    transform: rotate(0deg);
    transition: transform 0.5s ease;
}

.gauge-text {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.gauge-text span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.gauge-text small {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

.cpu-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #f7fafc;
    border-radius: 4px;
}

.cpu-item .label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.cpu-item .value {
    font-size: 13px;
    color: #2d3748;
    font-weight: 600;
}

/* Process Info */
.process-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.process-memory h4 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
}

.process-memory-item,
.process-item,
.system-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.process-memory-item:last-child,
.process-item:last-child,
.system-item:last-child {
    border-bottom: none;
}

.process-memory-item .label,
.process-item .label,
.system-item .label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.process-memory-item .value,
.process-item .value,
.system-item .value {
    font-size: 13px;
    color: #2d3748;
    font-weight: 600;
}

.process-details,
.system-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Test Section Styles */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.test-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-card h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.info-item label {
    font-weight: 500;
    color: #4a5568;
    min-width: 120px;
}

.info-item code {
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    flex: 1;
    min-width: 200px;
}

.copy-btn {
    padding: 6px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #5a67d8;
}

.code-example {
    position: relative;
}

.code-example pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.code-example .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.8);
}

.live-test {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.test-controls input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.test-controls input:focus {
    outline: none;
    border-color: #667eea;
}

.test-btn {
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-btn:hover {
    background: #38a169;
}

.unsubscribe-btn {
    background: #e53e3e;
}

.unsubscribe-btn:hover {
    background: #c53030;
}

.subscribed-topics {
    margin: 15px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
}

.subscribed-topics h4 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topics-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-badge {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-badge .remove-topic {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    opacity: 0.8;
}

.topic-badge .remove-topic:hover {
    opacity: 1;
}

.no-topics {
    color: #a0aec0;
    font-style: italic;
    font-size: 12px;
}

.test-logs {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.log-info {
    color: #90cdf4;
    margin: 0;
}

.log-success {
    color: #68d391;
    margin: 5px 0;
}

.log-error {
    color: #fc8181;
    margin: 5px 0;
}

.log-message {
    color: #e2e8f0;
    margin: 5px 0;
}

.test-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.clear-btn, .export-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-btn {
    background: #e53e3e;
    color: white;
}

.clear-btn:hover {
    background: #c53030;
}

.export-btn {
    background: #667eea;
    color: white;
}

.export-btn:hover {
    background: #5a67d8;
}

/* Message Monitor Styles */
.message-monitor {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.monitor-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
}

.message-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.message-filter input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.message-filter input:focus {
    outline: none;
    border-color: #667eea;
}

.toggle-btn {
    padding: 8px 12px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-btn.active {
    background: #48bb78;
    color: white;
}

.toggle-btn:hover {
    background: #cbd5e0;
}

.toggle-btn.active:hover {
    background: #38a169;
}

.messages-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.message-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background: #f7fafc;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-topic {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.message-time {
    color: #a0aec0;
    font-size: 11px;
}

.message-content {
    color: #2d3748;
    font-size: 14px;
    margin-bottom: 8px;
}

.message-from {
    color: #718096;
    font-size: 12px;
    font-weight: 500;
}

.message-metadata {
    margin-top: 8px;
    padding: 8px;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 11px;
    color: #4a5568;
    font-family: 'Courier New', monospace;
}

.no-messages {
    padding: 20px;
    text-align: center;
    color: #a0aec0;
    font-style: italic;
}

/* Monitor Section Styles */
.monitor-controls {
    display: flex;
    gap: 10px;
}

.monitor-filters {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.monitor-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.monitor-messages-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.monitor-message-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.monitor-message-item:last-child {
    border-bottom: none;
}

.monitor-message-item:hover {
    background: #f7fafc;
}

.monitor-message-item .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.monitor-message-item .message-topic {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.monitor-message-item .message-from {
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
}

.monitor-message-item .message-time {
    color: #a0aec0;
    font-size: 12px;
}

.monitor-message-item .message-content {
    color: #2d3748;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.monitor-message-item .message-metadata {
    background: #f7fafc;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #48bb78;
}

.monitor-message-item .message-metadata strong {
    color: #2d3748;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

.monitor-message-item .message-metadata pre {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #4a5568;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsive adjustments for test section */
@media (max-width: 768px) {
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .system-overview {
        grid-template-columns: 1fr;
    }
    
    .cpu-info {
        flex-direction: column;
        text-align: center;
    }
    
    .memory-details {
        grid-template-columns: 1fr;
    }
    
    .test-controls {
        flex-direction: column;
    }
    
    .test-controls input {
        min-width: auto;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-item label {
        min-width: auto;
    }
    
    .info-item code {
        min-width: auto;
        width: 100%;
    }
    
    .monitor-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .monitor-stats {
        flex-direction: column;
        gap: 10px;
    }
}