:root {
    /* Core Variables (7) */
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #ff0000;
    --muted-color: #dddddd;
    --border-color: var(--muted-color);
    --font-family: "Courier New", Courier, monospace;
    --border-radius: 5px;
    --border-width: 1px;

    /* Floating Tab Variables (8) */
    --tab-bg-logged-out: #ffffff;
    --tab-bg-logged-in: #ffffff;
    --tab-bg-opacity-logged-out: 0.9;
    --tab-bg-opacity-logged-in: 0.2;
    --tab-color-logged-out: #000000;
    --tab-color-logged-in: #ffffff;
    --tab-border-logged-out: #000000;
    --tab-border-logged-in: #ff0000;
    --tab-border-opacity-logged-out: 1.0;
    --tab-border-opacity-logged-in: 0.1;
}

/* Dark Mode Overrides */
body.dark-mode {
    --primary-color: #ffffff;
    --secondary-color: #000000;
    --accent-color: #ff0000;
    --muted-color: #222222;
    --border-color: var(--muted-color);


    --tab-bg-logged-out: #000000;
    --tab-color-logged-out: #ffffff;
    --tab-border-logged-out: #ffffff;
    --tab-bg-logged-in: #000000;
    --tab-color-logged-in: #ffffff;
    --tab-border-logged-in: #00ffff;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--secondary-color);
    color: var(--primary-color);
    /* line-height: 1.4; */
    padding: 0;
    max-width: none;
    margin: 0;
}

/* Header Styles */
.main-header {
    background-color: var(--secondary-color);

    padding: 15px 20px;
    z-index: 100;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-title {
    margin: 0;
    font-size: 24px;
    font-weight: normal;
    color: var(--primary-color);
    border: none;
    padding: 0;
    text-align: left;
}

.relay-info {
    text-align: center;
    flex: 1;
    max-width: 150px;
    margin: 0 auto;
}

.relay-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.relay-pubkey-container {
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    padding: 4px;
    margin-top: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background-color: var(--secondary-color);
    display: inline-block;
    width: fit-content;
}

.relay-pubkey-container:hover {
    border-color: var(--border-color);
}

.relay-pubkey-container.copied {
    border-color: var(--accent-color);
    animation: flash-accent 0.5s ease-in-out;
}

.relay-pubkey {
    font-size: 8px;
    color: var(--primary-color);
    font-family: "Courier New", Courier, monospace;
    line-height: 1.2;
    white-space: pre-line;
    text-align: center;
}

@keyframes flash-accent {
    0% { border-color: var(--accent-color); }
    50% { border-color: var(--accent-color); }
    100% { border-color: transparent; }
}

.relay-description {
    font-size: 10px;
    color: var(--primary-color);
    margin-bottom: 0;
    display: inline-block;
    width: fit-content;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.header-title {
    margin: 0;
    font-size: 24px;
    font-weight: bolder;
    color: var(--primary-color);
    border: none;
    padding: 0;
    text-align: left;
    display: flex;
    gap: 2px;
}

.relay-letter {
    position: relative;
    display: inline-block;
    transition: all 0.05s ease;
}

.relay-letter.underlined::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
}

.header-user-name {
    display: block;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 10px;
    text-align: center;
    margin-top: 4px;
}

.profile-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
    /* margin-left: auto; */
}

.admin-label {
    font-size: 10px;
    color: var(--primary-color);
    font-weight: normal;
    margin-bottom: 4px;
    text-align: center;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-area:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

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

.header-user-image {
    width: 48px; /* 50% larger than 32px */
    height: 48px; /* 50% larger than 32px */
    border-radius: var(--border-radius); /* Curved corners like other elements */
    object-fit: cover;
    border: 2px solid transparent; /* Invisible border */
    background-color: var(--secondary-color);
}


.logout-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 200;
    margin-top: 4px;
}

.logout-btn {
    width: 100%;
    padding: 5px 10px;
    background: none;
    border: none;
    color: var(--primary-color);
    text-align: left;
    cursor: pointer;
    font-size: 10px;
    font-family: var(--font-family);
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Login Modal Styles */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-modal-content {
    background-color: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 24px;
    font-family: var(--font-family);
    color: var(--primary-color);
}

h2 {
    font-weight: normal;
    text-align: center;
    font-size: 16px;
    font-family: var(--font-family);
    color: var(--primary-color);
}

h3 {
    font-weight: normal;
    font-size: 12px;
    font-family: var(--font-family);
    color: var(--primary-color);
    padding-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: lighter;
    font-size: 10px;
    font-family: var(--font-family);
    color: var(--primary-color);
}




.section {
    background: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 5px;
    margin-right:5px;
}

.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 15px;
}





.input-group {
    margin-bottom: 15px;
}


input,
textarea,
select {
    width: 100%;
    padding: 8px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    outline: none;
}

button {
    width: 100%;
    padding: 8px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    cursor: pointer;
    margin: 5px 0;
    font-weight: bold;
    transition: all 0.2s ease;
}

button:hover {
    border-color: var(--accent-color);
}

button:active {
    background: var(--accent-color);
    color: var(--secondary-color);
}

button:disabled {
    background-color: var(--muted-color);
    color: var(--primary-color);
    cursor: not-allowed;
    border-color: var(--muted-color);
}

/* Flash animation for refresh button */
@keyframes flash-red {
    0% { border-color: var(--border-color); }
    50% { border-color: var(--accent-color); }
    100% { border-color: var(--border-color); }
}

.flash-red {
    animation: flash-red 1s ease-in-out;
}

/* Flash animation for updated statistics values */
@keyframes flash-value {
    0% { color: var(--primary-color); }
    50% { color: var(--accent-color); }
    100% { color: var(--primary-color); }
}

.flash-value {
    animation: flash-value 1s ease-in-out;
}

/* Npub links styling */
.npub-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: normal;
    transition: color 0.2s ease;
}

.npub-link:hover {
    color: var(--accent-color);
}

.status {
    padding: 10px;
    margin: 10px 0;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: bold;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.status.connected {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.status.disconnected {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.status.authenticated {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.status.error {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}


.config-table {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0;
    overflow: hidden;
}

.config-table th,
.config-table td {
    border: 0.1px solid var(--muted-color);
    padding: 4px;
    text-align: left;
    font-family: var(--font-family);
    font-size: 10px;
}

.config-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.config-table-container {
    overflow-x: auto;
    max-width: 100%;
}

.config-table th {
    font-weight: bold;
    height: 24px; /* Base height for tbody rows */
    line-height: 24px; /* Center text vertically */
}

.config-table td {
    height: 16px; /* 50% taller than tbody rows would be */
    line-height: 16px; /* Center text vertically */
}

/* Inline config value inputs - remove borders and padding to fit seamlessly in table cells */
.config-value-input {
    border: none;
    padding: 2px 4px;
    background: transparent;
    width: 100%;
    min-height: auto;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border-radius: 0;
}

/* Relay Events Styles */
.status-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: var(--font-family);
    text-align: center;
}

.relay-entry {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    margin-bottom: 10px;
    background: var(--secondary-color);
}

.config-value-input:focus {
    border: 1px solid var(--accent-color);
    background: var(--secondary-color);
    outline: none;
}

/* Config actions cell - clickable for saving */
.config-actions-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center !important;
    font-weight: bold;
    vertical-align: middle;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    padding: 8px 4px;
}

.config-actions-cell:hover {
    border: 1px solid var(--accent-color);
    background-color: var(--muted-color);
}

.json-display {
    background-color: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    font-family: var(--font-family);
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
}

.log-panel {
    height: 200px;
    overflow-y: auto;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    font-size: 12px;
    background-color: var(--secondary-color);
    font-family: var(--font-family);
}

.log-entry {
    margin-bottom: 5px;
    border-bottom: 1px solid var(--muted-color);
    padding-bottom: 5px;
}

.log-timestamp {
    font-weight: bold;
    font-family: var(--font-family);
}

.inline-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.inline-buttons button {
    flex: 1;
}

.user-info {
    padding: 10px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 10px 0;
    background-color: var(--secondary-color);
}

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

.user-details {
    order: -1; /* Show user details first when logged in */
}

.login-section {
    text-align: center;
}

.logout-section {
    display: flex;
    justify-content: flex-end;
}

.login-logout-btn {
    width: auto;
    min-width: 120px;
    padding: 12px 16px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    flex-shrink: 0;
}

.login-logout-btn:hover {
    border-color: var(--accent-color);
}

.login-logout-btn:active {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.login-logout-btn.logout-state {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

.login-logout-btn.logout-state:hover {
    background: var(--primary-color);
    border-color: var(--border-color);
}

.user-pubkey {
    font-family: var(--font-family);
    font-size: 12px;
    word-break: break-all;
    margin: 5px 0;
}

/* User profile header with image */
.user-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.user-image-container {
    flex-shrink: 0;
}

.user-profile-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
}

.user-text-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.hidden {
    display: none;
}



.countdown-btn {
    width: auto;
    min-width: 40px;
    padding: 8px 12px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 10px;
    /* font-weight: bold; */
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    position: relative;
}

.countdown-btn:hover::after {
    content: "countdown";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.auth-rules-controls {
    margin-bottom: 15px;
}

.section-header .status {
    margin: 0;
    padding: 5px 10px;
    min-width: auto;
    font-size: 12px;
}

/* Auth Rule Input Sections Styling */
.auth-rule-section {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 15px 0;
    background-color: var(--secondary-color);
}

.auth-rule-section h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    border-left: 4px solid var(--border-color);
    padding-left: 8px;
    font-family: var(--font-family);
    color: var(--primary-color);
}

.auth-rule-section p {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: var(--muted-color);
    font-family: var(--font-family);
}

.rule-status {
    margin-top: 10px;
    padding: 8px;
    border: var(--border-width) solid var(--muted-color);
    border-radius: var(--border-radius);
    font-size: 12px;
    min-height: 20px;
    background-color: var(--secondary-color);
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.rule-status.success {
    border-color: #4CAF50;
    background-color: #E8F5E8;
    color: #2E7D32;
}

.rule-status.error {
    border-color: var(--accent-color);
    background-color: #FFEBEE;
    color: #C62828;
}

.rule-status.warning {
    border-color: #FF9800;
    background-color: #FFF3E0;
    color: #E65100;
}

.warning-box {
    border: var(--border-width) solid #FF9800;
    border-radius: var(--border-radius);
    background-color: #FFF3E0;
    padding: 10px;
    margin: 10px 0;
    font-size: 13px;
    color: #E65100;
    font-family: var(--font-family);
}

.warning-box strong {
    color: #D84315;
}

#login-section {
    text-align: center;
    padding: 20px;
}

/* Floating tab styles */
.floating-tab {
    font-family: var(--font-family);
    border-radius: var(--border-radius);
    border: var(--border-width) solid;
    transition: all 0.2s ease;
}

.floating-tab--logged-out {
    background: rgba(255, 255, 255, var(--tab-bg-opacity-logged-out));
    color: var(--tab-color-logged-out);
    border-color: rgba(0, 0, 0, var(--tab-border-opacity-logged-out));
}

.floating-tab--logged-in {
    background: rgba(0, 0, 0, var(--tab-bg-opacity-logged-in));
    color: var(--tab-color-logged-in);
    border-color: rgba(255, 0, 0, var(--tab-border-opacity-logged-in));
}

.transition {
    transition: all 0.2s ease;
}

/* SQL Query Interface Styles */
.query-selector {
    margin-bottom: 15px;
}

.query-selector select {
    width: 100%;
    padding: 8px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    cursor: pointer;
}

.query-selector select:focus {
    border-color: var(--accent-color);
    outline: none;
}

.query-selector optgroup {
    font-weight: bold;
    color: var(--primary-color);
}

.query-selector option {
    padding: 4px;
    background: var(--secondary-color);
    color: var(--primary-color);
}

.query-editor textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
    tab-size: 4;
    white-space: pre;
}

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

.query-actions button {
    flex: 1;
    min-width: 120px;
}

.primary-button {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.primary-button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}

.danger-button {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

.danger-button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}

.query-info {
    padding: 10px;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 10px 0;
    font-family: var(--font-family);
    font-size: 12px;
    background-color: var(--secondary-color);
}

.query-info-success {
    border-color: #4CAF50;
    background-color: #E8F5E8;
    color: #2E7D32;
}

.query-info-success span {
    display: inline-block;
    margin-right: 15px;
}

.request-id {
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    opacity: 0.7;
}

.error-message {
    border-color: var(--accent-color);
    background-color: #FFEBEE;
    color: #C62828;
    padding: 10px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    font-family: var(--font-family);
    font-size: 12px;
}

.sql-results-table {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0;
    overflow: hidden;
    font-size: 11px;
}

.sql-results-table th,
.sql-results-table td {
    border: 0.1px solid var(--muted-color);
    padding: 6px 8px;
    text-align: left;
    font-family: var(--font-family);
    white-space: nowrap;
    min-width: 100px;
}

.sql-results-table th {
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sql-results-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sql-results-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.no-results {
    text-align: center;
    font-style: italic;
    color: var(--muted-color);
    padding: 20px;
    font-family: var(--font-family);
}

.loading {
    text-align: center;
    font-style: italic;
    color: var(--muted-color);
    padding: 20px;
    font-family: var(--font-family);
}

/* Dark mode adjustments for SQL interface */
body.dark-mode .query-info-success {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    color: #81C784;
}

body.dark-mode .error-message {
    border-color: var(--accent-color);
    background-color: rgba(244, 67, 54, 0.1);
    color: #EF5350;
}

body.dark-mode .sql-results-table th {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sql-results-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sql-results-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}


/* Config Toggle Button Styles */
.config-toggle-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toggle Button Styles */
.toggle-btn {
    width: auto;
    min-width: 120px;
    padding: 8px 12px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.toggle-btn:hover {
    border-color: var(--accent-color);
}

.toggle-btn:active {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.config-toggle-btn:hover {
    border-color: var(--accent-color);
}

.config-toggle-btn:active {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.config-toggle-btn[data-state="true"] {
    color: var(--accent-color);
}

.config-toggle-btn[data-state="false"] {
    color: var(--primary-color);
}

.config-toggle-btn[data-state="indeterminate"] {
    background-color: var(--muted-color);
    color: var(--primary-color);
    cursor: not-allowed;
    border-color: var(--muted-color);
   
}


/* ================================
   REAL-TIME EVENT RATE CHART
   ================================ */

.chart-container {
    margin: 20px 0;
    padding: 15px;
    background: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
}

#event-rate-chart {
    font-family: var(--font-family);
    font-size: 12px;
    line-height: 1.2;
    color: var(--primary-color);
    background: var(--secondary-color);
    padding: 20px;
    overflow: hidden;
    white-space: pre;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

/* ================================
   SIDE NAVIGATION MENU
   ================================ */

.side-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--secondary-color);
    border-right: var(--border-width) solid var(--border-color);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 80px;
}

.side-nav.open {
    left: 0;
}

.side-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.side-nav-overlay.show {
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    border-bottom: var(--border-width) solid var(--muted-color);
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid var(--secondary-color);
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    border: 2px solid var(--secondary-color);
    background:var(--muted-color);
    color: var(--accent-color);
}

.nav-item.active {
    text-decoration: underline;
      padding-left: 16px;
  }

.nav-footer {
      position: absolute;
      bottom: 20px;
      left: 0;
      right: 0;
      padding: 0 20px;
  }

.nav-footer-btn {
      display: block;
      width: 100%;
      padding: 12px 20px;
      margin-bottom: 8px;
      color: var(--primary-color);

      border: 1px solid var(--border-color);
      border-radius: 4px;
      font-family: var(--font-family);
      font-size: 14px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.2s ease;
  }

.nav-footer-btn:hover {
      background:var(--muted-color);
      border-color: var(--accent-color);
  }

.nav-footer-btn:last-child {
      margin-bottom: 0;
  }

.header-title.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-title.clickable:hover {
    opacity: 0.8;
}

/* ================================
   SUBSCRIPTION TABLE COLLAPSIBLE GROUPS
   ================================ */

/* Subscription group header styles */
.subscription-group-header {

    font-weight: 500;

    cursor: pointer;
    user-select: none;
}

.subscription-group-header:hover {
    background-color: var(--secondary-color);
}

.expand-icon {
    display: inline-block;
    width: 20px;
    transition: transform 0.2s ease;
    font-size: 12px;
}

/* Detail row styles */
.subscription-detail-row {
    /* background-color: var(--secondary-color); */
}

.subscription-detail-row:hover {
    background-color: var(--muted-color);
}

/* Detail row cell styles */
.subscription-detail-prefix {
    padding-left: 30px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--muted-color);
}

.subscription-detail-id {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

