/* Unit416 - Intelligence System Theme */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0b10;
    --bg-secondary: #0d0f14;
    --bg-card: rgba(13, 15, 20, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-accent: #ffffff;
    --accent-primary: #ffffff;
    --accent-warning: #ff3e3e;
    --accent-success: #00ff9d;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --badge-bg: rgba(255, 255, 255, 0.1);
    --glow-primary: 0 0 10px rgba(255, 255, 255, 0.2);
    --glow-secondary: 0 0 15px rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(88, 166, 255, 0.03) 2px, rgba(88, 166, 255, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(88, 166, 255, 0.03) 2px, rgba(88, 166, 255, 0.03) 4px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: 6px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
    font-weight: 700;
}

.system-badge {
    display: inline-block;
    background: var(--badge-bg);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Roboto Mono', monospace;
}

/* Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.15), inset 0 0 10px rgba(0, 245, 255, 0.05);
    transform: translateY(-2px);
}

.classified-header {
    background: linear-gradient(90deg, var(--accent-warning), transparent);
    padding: 8px 16px;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-bottom: 2px solid var(--accent-warning);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Buttons */
.btn-primary {
    background: rgba(0, 245, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Roboto Mono', monospace;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: var(--glow-primary);
}

.btn-danger {
    background: var(--accent-warning);
    color: white;
}

.btn-danger:hover {
    background: #da3633;
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.2);
}

/* Forms */
.form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.2s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-family: 'Roboto Mono', monospace;
}

/* Sidebar */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    width: 280px;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
}

.unit-header {
    background: #000000;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #333;
}

.unit-badge {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 3px solid #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.unit-badge i {
    font-size: 2rem;
    color: #000000;
}

.nav-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.nav-link i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

.status-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 12px 16px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-accent);
    text-align: left;
    font-family: 'Roboto Mono', monospace;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(88, 166, 255, 0.05);
}

.table tbody td {
    padding: 14px 16px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--accent-primary);
    background: rgba(88, 166, 255, 0.05);
}

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
    padding-top: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Roboto Mono', monospace;
}

.badge.bg-success {
    background: var(--accent-success);
    color: white;
}

.badge.bg-warning {
    background: #d29922;
    color: white;
}

.badge.bg-danger {
    background: var(--accent-warning);
    color: white;
}

.badge.bg-info {
    background: var(--accent-primary);
    color: white;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    color: var(--accent-success);
    border-color: var(--accent-success);
}

.alert-danger {
    background: rgba(248, 81, 73, 0.1);
    color: var(--accent-warning);
    border-color: var(--accent-warning);
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Stats Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    padding: 1.25rem;
    border-radius: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-family: 'Roboto Mono', monospace;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Roboto Mono', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col-md-4 {
    flex: 0 0 33.333%;
    padding: 0 0.5rem;
}

.col-md-5 {
    flex: 0 0 41.666%;
    padding: 0 0.5rem;
}

.col-md-6 {
    flex: 0 0 50%;
    padding: 0 0.5rem;
}

.col-md-8 {
    flex: 0 0 66.666%;
    padding: 0 0.5rem;
}

.col-md-10 {
    flex: 0 0 83.333%;
    padding: 0 0.5rem;
}

.col-md-2 {
    flex: 0 0 16.666%;
    padding: 0 0.5rem;
}

.col-md-12 {
    flex: 0 0 100%;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {

    .col-md-2,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-8,
    .col-md-10,
    .col-md-12 {
        flex: 0 0 100%;
    }
}

/* Classification Markers */
.classification {
    background: var(--accent-warning);
    color: white;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
}

/* Intelligence Report Styles */
.report-container {
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    padding: 0;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.report-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-id {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.report-body {
    padding: 1.5rem;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.data-block {
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.data-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.data-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* Scan Animation */
.scanning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 50%,
            rgba(88, 166, 255, 0.1) 50%,
            rgba(88, 166, 255, 0.1) 52%,
            transparent 52%);
    background-size: 100% 4px;
    pointer-events: none;
    animation: scanLine 4s linear infinite;
    z-index: 5;
}

@keyframes scanLine {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100%;
    }
}

.scan-bar {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
    top: 0;
    left: 0;
    z-index: 10;
    animation: scanBarMove 3s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scanBarMove {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

/* Metadata Footer */
.report-footer {
    background: var(--bg-secondary);
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
    display: flex;
    justify-content: space-between;
}

/* Photo Display */
.photo-container {
    width: 150px;
    height: 180px;
    background: #000;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    flex-direction: column;
    text-align: center;
    padding: 10px;
}

.photo-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: #ff00ff;
    z-index: -1;
    animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

.glitch-text::after {
    color: #00ffff;
    z-index: -2;
    animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Micro-interactions */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 245, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
    }
}