@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Theme & Custom Variables --- */
:root {
    --bg-main: #0c0e0d;
    --bg-panel: rgba(22, 26, 24, 0.8);
    --bg-panel-solid: #161a18;
    --bg-card: rgba(30, 36, 33, 0.6);
    --bg-card-hover: rgba(38, 46, 42, 0.9);
    
    --border-color: rgba(122, 142, 123, 0.2);
    --border-color-hover: rgba(122, 142, 123, 0.5);
    
    --color-accent: #7a8e7b;      /* Tactical Military Green */
    --color-accent-light: #a6c0a7;/* Light Olive Green */
    --color-accent-glow: rgba(122, 142, 123, 0.4);
    
    --color-gold: #bfa67a;        /* Logo brass/gold details */
    --color-gold-muted: #8e7a55;
    
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #5e6b5f;
    
    --color-online: #4ade80;
    --color-idle: #fbbf24;
    --color-offline: #64748b;
    --color-hospital: #f87171;
    --color-jail: #f472b6;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    
    --shadow-glow: 0 0 15px rgba(122, 142, 123, 0.25);
    --shadow-glow-strong: 0 0 25px rgba(122, 142, 123, 0.45);
    --shadow-gold: 0 0 15px rgba(191, 166, 122, 0.2);
}

/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(122, 142, 123, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 10% 30%, rgba(191, 166, 122, 0.05) 0%, transparent 35%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* --- Typography Helpers --- */
h1, h2, h3, h4, .tactical-font {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.glow-text {
    text-shadow: 0 0 8px var(--color-accent-glow);
}

.gold-text {
    color: var(--color-gold);
}

/* --- Layout & Structure --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

/* --- Top Navigation Header --- */
.header {
    background: rgba(12, 14, 13, 0.9);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--color-gold);
    box-shadow: var(--shadow-gold);
    object-fit: cover;
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(122, 142, 123, 0.1);
    border-color: rgba(122, 142, 123, 0.3);
}

.nav-btn.active {
    color: var(--color-accent-light);
    background: rgba(122, 142, 123, 0.15);
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(122, 142, 123, 0.15);
}

/* User Profile Stats Area in Nav */
.user-status-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
}

.api-status-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-offline);
    box-shadow: 0 0 6px var(--color-offline);
    display: inline-block;
}

.api-status-badge.connected {
    background: var(--color-online);
    box-shadow: 0 0 8px var(--color-online);
}

.api-status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--color-hospital);
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: underline;
    display: none;
}

/* Mobile Nav Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* --- Login / Setup Screen --- */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(85vh - 70px);
}

.login-card {
    max-width: 500px;
    width: 100%;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(191, 166, 122, 0.3);
    box-shadow: var(--shadow-gold);
}

.login-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--color-gold);
    box-shadow: var(--shadow-gold);
    display: block;
    object-fit: cover;
}

.login-title {
    color: var(--color-gold);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    background: rgba(12, 14, 13, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(191, 166, 122, 0.25);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #7a8e7b, #5a6d5b);
    color: var(--bg-main);
    border: none;
    padding: 0.85rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(122, 142, 123, 0.1);
    border-color: var(--color-accent);
}

.info-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    border-left: 2px solid var(--color-gold);
    padding-left: 0.75rem;
    text-align: left;
}

.info-note a {
    color: var(--color-gold);
    text-decoration: none;
}

.info-note a:hover {
    text-decoration: underline;
}

.demo-trigger {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.demo-link {
    color: var(--color-accent-light);
    text-decoration: none;
    cursor: pointer;
}

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

/* --- Dashboard Section Layouts --- */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overview Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Metric / Stat Card */
.metric-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-accent);
}

.metric-card.gold::before {
    background: var(--color-gold);
}

.metric-card.danger::before {
    background: var(--color-hospital);
}

.metric-label {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.metric-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* --- Faction Tab with Subcategories --- */
.subcategory-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.sub-tab-btn {
    background: rgba(12, 14, 13, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-tab-btn:hover {
    color: var(--text-primary);
    border-color: rgba(122, 142, 123, 0.4);
    background: rgba(122, 142, 123, 0.05);
}

.sub-tab-btn.active {
    color: var(--color-accent-light);
    border-color: var(--color-accent);
    background: rgba(122, 142, 123, 0.1);
}

.sub-content {
    display: none;
}

.sub-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Roster Table Design */
.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

table.tactical-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

table.tactical-table th {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    letter-spacing: 0.05em;
    background: rgba(12, 14, 13, 0.5);
}

table.tactical-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(122, 142, 123, 0.1);
    vertical-align: middle;
}

table.tactical-table tr:hover td {
    background: rgba(122, 142, 123, 0.03);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.status-pill.online {
    background: rgba(74, 222, 128, 0.1);
    color: var(--color-online);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-pill.idle {
    background: rgba(251, 191, 36, 0.1);
    color: var(--color-idle);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-pill.offline {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-pill.online .status-indicator {
    background: var(--color-online);
    box-shadow: 0 0 6px var(--color-online);
}

.status-pill.idle .status-indicator {
    background: var(--color-idle);
    box-shadow: 0 0 6px var(--color-idle);
}

.status-pill.offline .status-indicator {
    background: var(--color-offline);
}

/* Stats Grid Subtab */
.stats-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.member-stat-card {
    padding: 1.25rem;
    background: var(--bg-card);
    transition: all 0.3s ease;
}

.member-stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.member-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
}

.member-name:hover {
    color: var(--color-accent-light);
}

.member-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(12, 14, 13, 0.6);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.member-stats-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(122, 142, 123, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.member-stat-item {
    display: flex;
    flex-direction: column;
}

.member-stat-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.member-stat-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

/* --- War & Chains Section --- */
.two-col-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .two-col-layout {
        grid-template-columns: 1fr;
    }
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.tactical-btn-sm {
    background: rgba(122, 142, 123, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tactical-btn-sm:hover {
    border-color: var(--color-accent);
    background: rgba(122, 142, 123, 0.2);
}

.tactical-btn-sm.active {
    background: var(--color-accent);
    color: var(--bg-main);
    font-weight: bold;
}

/* Fake Chart visual elements */
.chart-container {
    height: 300px;
    border: 1px solid rgba(122, 142, 123, 0.1);
    border-radius: 8px;
    background: rgba(12, 14, 13, 0.4);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80%;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    z-index: 2;
}

.chart-bars-container {
    position: absolute;
    bottom: 2rem;
    left: 3rem;
    right: 1.5rem;
    height: 65%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    z-index: 1;
}

.chart-grid-line {
    position: absolute;
    left: 2.5rem;
    right: 1rem;
    height: 1px;
    background: rgba(122, 142, 123, 0.05);
    z-index: 0;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    margin: 0 4px;
    position: relative;
    group: hover;
}

.chart-bar {
    width: 80%;
    max-width: 35px;
    background: linear-gradient(to top, rgba(122, 142, 123, 0.3), rgba(122, 142, 123, 0.8));
    border-radius: 4px 4px 0 0;
    transition: all 0.5s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.chart-bar:hover {
    background: linear-gradient(to top, rgba(191, 166, 122, 0.4), rgba(191, 166, 122, 0.9));
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(191, 166, 122, 0.3);
}

.chart-bar-tooltip {
    position: absolute;
    top: -2.5rem;
    background: var(--bg-panel-solid);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.chart-bar-wrapper:hover .chart-bar-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.chart-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    text-align: center;
}

/* Chain Counter Widget */
/* Chain Counter Widget */
.chain-dial-layout {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    justify-content: space-between;
    padding: 1.5rem;
    background: radial-gradient(circle at 30% 50%, rgba(122, 142, 123, 0.1) 0%, transparent 70%);
}

.dial-left-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.watcher-schedule-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

.watcher-schedule-scroll {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(12, 14, 13, 0.5);
}

.watcher-schedule-scroll::-webkit-scrollbar {
    width: 6px;
}

.watcher-schedule-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.watcher-schedule-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

.schedule-table {
    border-collapse: collapse;
}

.schedule-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-panel-solid) !important;
}

.schedule-day-row td {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.schedule-table tr.active-watcher-row td {
    background: rgba(74, 222, 128, 0.15) !important;
    color: var(--color-online) !important;
    border-left: 2px solid var(--color-online);
}

@media (max-width: 600px) {
    .chain-dial-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.dial-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    border-top-color: var(--color-accent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-glow);
}

.dial-inner {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-panel-solid);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chain-count {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-accent-light);
    line-height: 1;
}

.chain-max {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chain-timer {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--color-idle);
    margin-top: 0.25rem;
}

/* --- Baldr's Targets Tab --- */
.baldr-hero {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 3px solid var(--color-gold);
}

.baldr-hero p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.difficulty-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.difficulty-tag.easy {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-online);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.difficulty-tag.medium {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-idle);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.difficulty-tag.hard {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-hospital);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Status specific colors for Targets */
.target-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
}

.target-status.okay {
    color: var(--color-online);
}

.target-status.hospital {
    color: var(--color-hospital);
}

.target-status.jail {
    color: var(--color-jail);
}

.target-status.offline {
    color: var(--text-secondary);
}

/* Action button for attacking */
.attack-btn {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--color-hospital);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.attack-btn:hover {
    background: var(--color-hospital);
    color: var(--bg-main);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.attack-btn.disabled {
    background: rgba(100, 116, 139, 0.1) !important;
    border-color: rgba(100, 116, 139, 0.2) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Target filtering */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --- Armory & Requests --- */
.armory-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 850px) {
    .armory-layout {
        grid-template-columns: 1fr;
    }
}

.form-select {
    width: 100%;
    background: rgba(12, 14, 13, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* Request history logs list */
.request-log-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(122, 142, 123, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.request-log-item:hover {
    background: rgba(122, 142, 123, 0.02);
}

.item-badge {
    font-family: var(--font-mono);
    color: var(--color-gold);
    font-weight: 600;
}

.user-tag {
    font-weight: 500;
}

.log-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-text.approved {
    color: var(--color-online);
}

.status-text.pending {
    color: var(--color-idle);
}

/* --- Footer --- */
.footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    margin: 0 auto 0.75rem;
    display: block;
    opacity: 0.5;
    object-fit: cover;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer a:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

.security-footer-note {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* --- Global Alert Modals --- */
.security-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 14, 13, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.security-modal.active {
    display: flex;
}

.modal-body {
    max-width: 600px;
    width: 90%;
    padding: 2rem;
    position: relative;
    border: 1px solid var(--color-gold);
    box-shadow: var(--shadow-gold);
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-modal-btn:hover {
    color: var(--color-hospital);
}

.modal-title {
    color: var(--color-gold);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-content-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-content-text ul {
    list-style-type: square;
    margin-left: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-content-text ul li {
    margin-bottom: 0.5rem;
}

/* --- Faction Overview Perks & Events --- */
.perk-badge {
    background: rgba(12, 14, 13, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
}

.perk-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
}

.perk-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gold);
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 14, 13, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
}

.event-info {
    display: flex;
    flex-direction: column;
}

.event-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.event-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.event-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-idle);
}

/* YATA Members Table Overrides */
#membersYataTable th, #membersYataTable td {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

/* --- Alert Badges & Warnings --- */
.alert-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 14, 13, 0.5);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-offline);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.alert-badge.danger {
    border-left-color: var(--color-hospital);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.1);
    animation: alert-pulse-danger 2s infinite ease-in-out;
}

.alert-badge.warning {
    border-left-color: var(--color-idle);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
}

.alert-badge.success {
    border-left-color: var(--color-online);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
}

.alert-info-text {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.alert-badge.danger .alert-title {
    color: var(--color-hospital);
}

.alert-badge.warning .alert-title {
    color: var(--color-idle);
}

.alert-badge.success .alert-title {
    color: var(--color-online);
}

.alert-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.alert-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

@keyframes alert-pulse-danger {
    0%, 100% { box-shadow: 0 0 6px rgba(248, 113, 113, 0.15); border-left-color: rgba(248, 113, 113, 0.8); }
    50% { box-shadow: 0 0 16px rgba(248, 113, 113, 0.35); border-left-color: rgba(248, 113, 113, 1); }
}

/* --- Micro Animations --- */
@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Mobile Responsiveness & Media Queries --- */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }
    
    .menu-toggle {
        display: block; /* Show hamburger toggle on mobile */
    }
    
    .nav-menu {
        display: none; /* Hide standard nav by default */
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
        margin-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
    }
    
    .nav-menu.expanded {
        display: flex; /* Expand menu vertically */
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1rem;
    }
    
    .user-status-widget {
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .two-col-layout {
        grid-template-columns: 1fr;
    }
    
    .baldr-hero {
        padding: 1rem;
    }
    
    table.tactical-table th, table.tactical-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }
    
    #chainReportGrid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Milestone Timeline & Chain Analyzer Styles --- */
.milestone-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(12, 14, 13, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.milestone-item:hover {
    border-color: rgba(191, 166, 122, 0.4);
    background: rgba(191, 166, 122, 0.05);
}

.milestone-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--color-gold);
    background: rgba(191, 166, 122, 0.15);
    border: 1px solid var(--color-gold-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 0 5px rgba(191, 166, 122, 0.1);
}

.milestone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.milestone-player {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.milestone-respect {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-online);
}

.milestone-check {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-online);
    box-shadow: 0 0 6px var(--color-online);
}

/* --- Stock Market & Travel Layouts --- */
#stockPanelLayout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    #stockPanelLayout {
        grid-template-columns: 1fr !important;
    }
}

.stock-trend {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stock-trend.up {
    color: var(--color-online);
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.stock-trend.down {
    color: var(--color-hospital);
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.stock-trend-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.stock-trend.up .stock-trend-indicator {
    background: var(--color-online);
    box-shadow: 0 0 6px var(--color-online);
}

.stock-trend.down .stock-trend-indicator {
    background: var(--color-hospital);
    box-shadow: 0 0 6px var(--color-hospital);
}

.travel-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
}

.travel-status.available {
    color: var(--color-online);
}

.travel-status.restocking {
    color: var(--color-idle);
}

.travel-status.out-of-stock {
    color: var(--color-hospital);
}

/* --- FF Scouter V2 CSS --- */
.ff-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.ff-badge.high {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-online);
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.2);
}

.ff-badge.medium {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-idle);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.15);
}

.ff-badge.low {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-hospital);
    border: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.2);
}

.scouter-intel-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
}

.scouter-intel-status.live {
    color: var(--color-online);
}

.scouter-intel-status.fallback {
    color: var(--color-idle);
}

.scouter-intel-status.error {
    color: var(--color-hospital);
}

/* --- Trade Requests Bounty Board Styling --- */
.trade-bounty-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-height: 580px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.trade-bounty-card {
    padding: 1rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    transition: all 0.3s ease;
}

.trade-bounty-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-2px);
}

.trade-bounty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-gold);
}

.trade-bounty-card.custom-item-card::before {
    background: var(--color-accent);
}

.bounty-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.bounty-item-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.bounty-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(191, 166, 122, 0.15);
    color: var(--color-gold);
    border: 1px solid var(--color-gold-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.bounty-card-body {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bounty-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.bounty-detail-label {
    color: var(--text-secondary);
}

.bounty-detail-value {
    font-family: var(--font-mono);
    font-weight: bold;
}

.bounty-detail-value.price {
    color: var(--color-gold);
}

.bounty-detail-value.total {
    color: var(--color-online);
    font-size: 0.9rem;
}

.bounty-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: auto;
}

.bounty-poster-info {
    display: flex;
    flex-direction: column;
}

.bounty-poster-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bounty-poster-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.complete-trade-btn {
    background: rgba(248, 113, 113, 0.1);
    color: var(--color-hospital);
    border: 1px solid rgba(248, 113, 113, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.complete-trade-btn:hover {
    background: var(--color-hospital);
    color: var(--bg-main);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
    border-color: var(--color-hospital);
}

/* --- Faction Branches Styling --- */
.branches-feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.branch-card {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-gold);
}

.branch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.branch-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-gold);
}

.delete-branch-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    padding: 0.2rem;
    line-height: 1;
}

.delete-branch-btn:hover {
    color: var(--color-hospital);
}

.branch-iframe-container {
    height: 280px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(12, 14, 13, 0.9);
}

.branch-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.branch-mock-card {
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(30, 36, 33, 0.4), rgba(22, 26, 24, 0.4));
}

.branch-mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.branch-mock-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(191, 166, 122, 0.1);
    color: var(--color-gold);
    border: 1px solid var(--color-gold-muted);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.branch-mock-name {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.branch-mock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.branch-mock-metric {
    background: rgba(12, 14, 13, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
}

.branch-mock-metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.branch-mock-metric-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-top: 0.15rem;
}

.branch-mock-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.branch-mock-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.branch-link-btn {
    display: block;
    width: 100%;
    background: rgba(122, 142, 123, 0.1);
    color: var(--color-accent-light);
    border: 1px solid var(--border-color);
    padding: 0.45rem;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.branch-link-btn:hover {
    background: var(--color-accent);
    color: var(--bg-main);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

