body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f8f9fa;
    margin: 20px;
    padding-right: 280px;
    color: #333333;
}

nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 230px;
    margin-bottom: 0 !important;
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] a {
    display: block;
    margin-right: 0 !important;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333333;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] a:last-child {
    margin-bottom: 0;
}

nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] a:hover,
nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] a[style*="font-weight: bold"] {
    background: #e6f2ff;
    border-color: #0e7fde;
    box-shadow: inset 0 0 6px rgba(102, 126, 234, 0.15);
    color: #0e7fde !important;
}

h1 {
    text-align: center;
    color: #333333;
    margin-bottom: 30px;
}

section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

form input, form select, form button {
    margin: 8px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #d0d0d0;
}

form input,
form select,
textarea {
    background: #ffffff;
    color: #333333;
}

form button {
    background: #0e7fde;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    text-align: left;
    color: #333333;
}

th {
    background: #0e7fde;
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.report-toolbar button {
    background: #0e7fde;
    color: #fff;
    border: 1px solid #0e7fde;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
}

.report-toolbar button.secondary {
    background: #eeeeee;
    border-color: #cccccc;
    color: #333333;
}

.report-toolbar button:hover {
    opacity: 0.9;
}

.column-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 10px;
}

.column-controls.hidden {
    display: none;
}

.column-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.row-selectable {
    cursor: pointer;
}

.row-selected {
    background: #e6f2ff !important;
}

a {
    color: #0e7fde;
}

footer {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.page-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.page-col {
    min-width: 0;
}

.page-col-main {
    flex: 2 1 0;
}

.page-col-side {
    flex: 1 1 0;
}

body.cyber-shell {
    margin: 0;
    padding: 0;
    color: #333333;
    background: #f8f9fa;
}

.cyber-shell .app-layout {
    min-height: 100vh;
    padding: 28px 300px 28px 28px;
    box-sizing: border-box;
}

.cyber-shell .right-nav {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 260px;
    height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(14,127,222,0.08);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
}

.cyber-shell .nav-brand {
    padding: 10px 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.cyber-shell .nav-brand h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #0e7fde;
    letter-spacing: 0.6px;
}

.cyber-shell .nav-brand p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #999999;
}

.cyber-shell .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333333;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cyber-shell .nav-item:hover,
.cyber-shell .nav-item.active {
    background: #e6f2ff;
    border-color: #0e7fde;
    box-shadow: inset 0 0 6px rgba(102, 126, 234, 0.15);
    color: #0e7fde;
}

.cyber-shell .nav-icon {
    color: #0e7fde;
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.cyber-shell .dashboard-main {
    max-width: 1300px;
}

.cyber-shell .dashboard-header {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cyber-shell .dashboard-header h1 {
    text-align: left;
    color: #333333;
    margin: 0;
    font-size: 1.45rem;
}

.cyber-shell .dashboard-header p {
    margin: 6px 0 0;
    color: #666666;
}

.cyber-shell .header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cyber-shell .header-btn,
.cyber-shell button,
.cyber-shell form button {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #0e7fde;
    background: #0e7fde;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cyber-shell .header-btn:hover,
.cyber-shell button:hover,
.cyber-shell form button:hover {
    transform: translateY(-1px);
    background: #5568d3;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cyber-shell section,
.cyber-shell .panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.cyber-shell .time-travel-panel {
    border-color: #0e7fde;
}

.cyber-shell .info-banner {
    margin-bottom: 20px;
    border-left: 3px solid #0e7fde;
    background: #e6f2ff;
}

.cyber-shell h2,
.cyber-shell h3,
.cyber-shell p,
.cyber-shell label,
.cyber-shell small,
.cyber-shell td,
.cyber-shell th {
    color: #333333;
}

.cyber-shell table,
.cyber-shell th,
.cyber-shell td {
    border-color: #e0e0e0;
}

.cyber-shell th {
    background: #0e7fde;
    color: #ffffff;
}

.cyber-shell tr:nth-child(even) {
    background-color: #f8f9fa;
}

.cyber-shell a {
    color: #0e7fde;
}

.cyber-shell form input,
.cyber-shell form select {
    background: #ffffff;
    color: #333333;
    border: 1px solid #d0d0d0;
}

.cyber-shell .app-footer {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

@media (max-width: 1100px) {
    body {
        padding-right: 20px;
    }

    nav[style*="margin-bottom: 20px; padding: 15px; background: white; border-radius: 8px"] {
        position: static;
        width: auto;
        max-height: none;
        overflow-y: visible;
    }

    .page-grid {
        flex-direction: column;
    }

    .cyber-shell .app-layout {
        padding: 16px;
    }

    .cyber-shell .right-nav {
        position: static;
        width: auto;
        height: auto;
        margin-bottom: 14px;
    }

    .cyber-shell .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ── Techxyra Brand Enhancements ─────────────────────────────────────────── */
:root {
  --tx-blue: #0e7fde;
  --tx-green: #00c896;
  --tx-navy: #0a1628;
  --tx-gradient: linear-gradient(135deg, #0e7fde 0%, #00c896 100%);
}

/* Sidebar brand upgrade */
.cyber-shell .nav-brand h2 {
  background: var(--tx-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.cyber-shell .nav-brand p {
  font-size: 0.72rem;
  color: #aaa;
}

/* Active nav item gets gradient accent */
.cyber-shell .nav-item.active {
  background: linear-gradient(90deg, rgba(14,127,222,0.1), rgba(0,200,150,0.07));
  border-color: var(--tx-blue);
  color: var(--tx-blue);
}

/* Table header gradient */
.cyber-shell th, th {
  background: var(--tx-gradient) !important;
  color: #fff !important;
}

/* Buttons use gradient */
.cyber-shell .header-btn,
.cyber-shell button,
.cyber-shell form button,
.report-toolbar button:not(.secondary) {
  background: var(--tx-gradient) !important;
  border: none !important;
  color: #fff !important;
}

/* Dashboard header accent bar */
.cyber-shell .dashboard-header {
  border-top: 3px solid transparent;
  border-image: var(--tx-gradient) 1;
}

/* Sign out link in sidebar */
.cyber-shell .nav-item[href="/logout"] {
  color: #e05555 !important;
  margin-top: auto;
}
.cyber-shell .nav-item[href="/logout"] .nav-icon {
  color: #e05555 !important;
}
.cyber-shell .nav-item[href="/logout"]:hover {
  background: rgba(224,85,85,0.08) !important;
  border-color: rgba(224,85,85,0.3) !important;
  color: #e05555 !important;
}

/* Page title style for sub-pages */
h1 {
  background: var(--tx-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--tx-blue); border-radius: 3px; opacity: 0.6; }

/* Top nav (sub-pages) link highlight */
.txra-nav-links a[href="{{ request.path }}"],
.txra-topnav a.active {
  background: #e6f2ff;
  color: var(--tx-blue);
}
