/* ===================================================================
   APEX TYCOON • ENTERPRISE OS DESIGN SYSTEM
   Theme: High-Performance Glassmorphic Dark Titan
   =================================================================== */

:root {
    --bg-canvas: #07090e;
    --bg-tablet-bezel: #0f131c;
    --bg-surface-1: rgba(18, 23, 34, 0.82);
    --bg-surface-2: rgba(26, 33, 48, 0.65);
    --bg-surface-3: rgba(38, 48, 70, 0.5);
    --bg-surface-hover: rgba(45, 58, 85, 0.75);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    --border-active: rgba(0, 240, 255, 0.55);

    /* Curated Accent Palette */
    --accent-cyan: #00f0ff;
    --accent-cyan-glow: rgba(0, 240, 255, 0.2);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-crimson: #ef4444;

    /* Typography Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #00f0ff;

    /* Fonts */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Shadows & Glass */
    --glass-blur: blur(16px);
    --shadow-tablet: 0 35px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

body {
    background-color: var(--bg-canvas);
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 45%);
}

/* Tablet Container & Hardware Frame */
.tablet-container {
    width: 95vw;
    max-width: 1340px;
    height: 88vh;
    max-height: 860px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: tabletAppear 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tabletAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tablet-device {
    width: 100%;
    height: 100%;
    background: var(--bg-tablet-bezel);
    border-radius: var(--radius-xl);
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-tablet);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
}

/* Hardware Notch */
.tablet-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 100;
}

.camera-lens {
    width: 5px;
    height: 5px;
    background: #111;
    border: 1px solid #333;
    border-radius: 50%;
}

.speaker-grill {
    width: 25px;
    height: 2px;
    background: #222;
    border-radius: 2px;
}

/* Tablet Status Bar */
.tablet-status-bar {
    height: 38px;
    background: rgba(10, 14, 22, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-center {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1.2px;
}

.logo-icon {
    color: var(--accent-cyan);
    font-size: 13px;
}

.version-tag {
    font-size: 9px;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.status-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
}

.preview-tag {
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.35);
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
}

.live-pulse {
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; filter: drop-shadow(0 0 5px var(--accent-emerald)); }
}

.close-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-crimson);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--accent-crimson);
    color: #fff;
    transform: rotate(90deg);
}

/* Tablet Layout Body */
.tablet-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: var(--bg-surface-1);
}

/* Sidebar Navigation */
.sidebar-nav {
    width: 260px;
    background: rgba(12, 16, 25, 0.85);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 20px;
}

.enterprise-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.enterprise-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.enterprise-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.enterprise-type {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-align: left;
}

.nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-item:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.nav-item:hover i {
    color: var(--accent-cyan);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.12), rgba(0, 240, 255, 0.02));
    border-color: var(--border-glow);
    color: var(--accent-cyan);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.nav-item.active i {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.owner-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.owner-icon {
    color: var(--accent-amber);
    font-size: 14px;
}

.owner-pill .label {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.owner-pill .val {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Viewport & Tab Panes */
.viewport {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.02), transparent 50%);
}

.viewport::-webkit-scrollbar {
    width: 6px;
}
.viewport::-webkit-scrollbar-track {
    background: transparent;
}
.viewport::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-out forwards;
}

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

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

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

.page-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Buttons & Inputs */
.action-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #00f0ff, #0099ff);
    color: #050811;
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.35);
}

.action-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.action-btn.secondary {
    background: var(--bg-surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.action-btn.secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-glow);
    color: var(--accent-cyan);
}

.mini-btn {
    padding: 6px 12px;
    font-size: 11px;
}

.large-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 14px;
    margin-top: 16px;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 18px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-subtle);
}

.kpi-card.glow-cyan:hover { border-color: var(--border-glow); box-shadow: 0 8px 30px var(--accent-cyan-glow); }
.kpi-card.glow-cyan::before { background: var(--accent-cyan); }

.kpi-card.glow-emerald:hover { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 8px 30px var(--accent-emerald-glow); }
.kpi-card.glow-emerald::before { background: var(--accent-emerald); }

.kpi-card.glow-amber::before { background: var(--accent-amber); }
.kpi-card.glow-purple::before { background: var(--accent-purple); }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    font-size: 14px;
    color: var(--text-secondary);
}

.kpi-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kpi-trend.positive { color: var(--accent-emerald); }
.kpi-subtext { font-size: 10px; color: var(--text-muted); }

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Dashboard Split Grid */
.dashboard-split {
    display: grid;
    grid-template-columns: 1.6fr 1.1fr;
    gap: 18px;
}

.chart-container-box, .activity-feed-box {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

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

.box-header h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.box-header h3 i { color: var(--accent-cyan); }

.chart-legend {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-item .dot.revenue { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.legend-item .dot.expenses { background: var(--accent-crimson); box-shadow: 0 0 8px var(--accent-crimson); }

.canvas-wrapper {
    width: 100%;
    height: 240px;
}

#overviewChart {
    width: 100% !important;
    height: 100% !important;
}

.live-pill {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(15, 20, 30, 0.6);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    font-size: 11px;
}

.activity-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.activity-icon.revenue { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald); }
.activity-icon.expense { background: rgba(239, 68, 68, 0.18); color: var(--accent-crimson); }
.activity-icon.supplies { background: rgba(139, 92, 246, 0.18); color: var(--accent-purple); }

.activity-title { font-weight: 600; color: var(--text-primary); }
.activity-time { font-size: 10px; color: var(--text-muted); }
.activity-amount { font-family: var(--font-mono); font-weight: 700; }
.activity-amount.positive { color: var(--accent-emerald); }
.activity-amount.negative { color: var(--accent-crimson); }

/* Finances & Ledger Table */
.finance-action-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.currency-symbol {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.input-with-icon input {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px 10px 28px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
    width: 140px;
    transition: border-color 0.2s;
}

.input-with-icon input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.ledger-table-box {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.ledger-table th {
    background: rgba(15, 20, 30, 0.8);
    padding: 14px 16px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-subtle);
}

.ledger-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.ledger-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.text-right { text-align: right; }

.badge-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-tag.deposit { background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); }
.badge-tag.withdrawal { background: rgba(239, 68, 68, 0.15); color: var(--accent-crimson); }
.badge-tag.revenue { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge-tag.supplies { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

/* Logistics & Supplies */
.logistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.supply-order-card, .supply-telemetry-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
}

.supply-order-card h3, .supply-telemetry-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }

.slider-control-group { margin-bottom: 20px; }

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 10px;
}

.qty-callout {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.custom-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
}

.invoice-summary-box {
    background: rgba(12, 16, 25, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.invoice-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.invoice-line.total {
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
    margin-top: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.invoice-line .val.highlight {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 16px;
}

.warehouse-meter-box {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.meter-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 6px solid var(--accent-amber);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.meter-percent {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.meter-sub { font-size: 9px; text-transform: uppercase; color: var(--text-muted); }

.meter-details { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.detail-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }
.detail-row strong { color: var(--text-primary); font-family: var(--font-mono); }

.automation-toggle-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 16, 25, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 14px;
}

.automation-toggle-box strong { font-size: 12px; display: block; color: var(--text-primary); }
.automation-toggle-box p { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Switch Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
}
.slider.round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider.round { background-color: var(--accent-emerald); }
input:checked + .slider.round:before { transform: translateX(20px); }

/* Staff Roster Cards */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.staff-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

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

.staff-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(139, 92, 246, 0.25));
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
}

.staff-meta h4 { font-family: var(--font-heading); font-size: 14px; color: var(--text-primary); }
.staff-rank-tag { font-size: 10px; color: var(--accent-cyan); font-weight: 600; text-transform: uppercase; }

.staff-stats {
    background: rgba(12, 16, 25, 0.5);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 14px;
}

.staff-actions {
    display: flex;
    gap: 8px;
}

/* Upgrades & Tech */
.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.upgrade-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.upgrade-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.upgrade-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.upgrade-badge.installed { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald); }
.upgrade-badge.available { background: rgba(0, 240, 255, 0.18); color: var(--accent-cyan); }
.upgrade-badge.locked { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

.upgrade-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--border-glow);
}

.upgrade-card h3 { font-family: var(--font-heading); font-size: 16px; color: var(--text-primary); margin-bottom: 8px; }
.upgrade-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }

.upgrade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.upgrade-cost { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--accent-cyan); }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(15, 20, 30, 0.95);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 12px;
    animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: var(--accent-emerald); }
.toast.success i { color: var(--accent-emerald); }
.toast.error { border-color: var(--accent-crimson); }
.toast.error i { color: var(--accent-crimson); }
