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

:root {
    --bg-primary: #0c0c0c;
    --bg-secondary: #111111;
    --panel-bg: rgba(20, 20, 20, 0.95);
    --panel-bg-hover: rgba(30, 30, 30, 0.98);
    --border-color: #2a2a2a;
    --border-color-hover: #4a4a4a;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --accent-error: #ff4d4d;
    --accent-success: #4caf50;
    --accent-warning: #ff9800;
    --classification-red: #c62828;
    --glow-blue: rgba(100, 100, 100, 0.2);
    --glow-blue-intense: rgba(150, 150, 150, 0.3);
    --glow-green: rgba(76, 175, 80, 0.2);
    --glow-red: rgba(255, 77, 77, 0.2);
    --glass-blur: 6px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: cubic-bezier(0.2, 0, 0.1, 1);
}

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Menlo', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    will-change: auto;
}

/* Allow selection for copy buttons and their containers */
.copy-btn,
.copy-btn *,
.bind-command,
.bind-command *,
.bind-card,
.bind-card * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Boot sequence overlay */
.boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: bootFadeOut 0.5s ease 2s forwards;
}

.boot-text {
    color: var(--accent-success);
    font-size: 13px;
    margin: 4px 0;
    opacity: 0;
    animation: bootLine 0.1s ease forwards;
}

.boot-logo {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: 8px;
    font-weight: bold;
}

@keyframes bootFadeOut {
    to { opacity: 0; pointer-events: none; }
}

@keyframes bootLine {
    to { opacity: 1; }
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Subtle scan lines effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Vignette effect */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 9997;
}

/* Glassmorphism panel with professional aesthetic */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 24px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.2s var(--transition-smooth);
}

.panel:hover {
    border-color: var(--border-color-hover);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 0 24px rgba(0, 0, 0, 0.25);
}

/* Button styles with professional aesthetic */
.btn {
    font-family: inherit;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: rgba(30, 30, 30, 0.95);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.btn:hover {
    background: rgba(40, 40, 40, 0.98);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    border-color: var(--accent-error);
    color: var(--accent-error);
}

.btn-danger:hover {
    background: rgba(255, 77, 77, 0.15);
}

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

.btn-success:hover {
    background: rgba(76, 175, 80, 0.15);
}

/* Input styles with professional aesthetic */
input, select, textarea {
    font-family: inherit;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 3px;
    width: 100%;
    font-size: 13px;
    transition: all 0.2s var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-color-hover);
    background: rgba(20, 20, 20, 0.98);
}

/* Login page with spy movie boot sequence */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.login-panel {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(25, 25, 25, 0.99) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.6s var(--transition-smooth);
}

.login-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color-hover), transparent);
    opacity: 0.5;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-60px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

@keyframes panelGlow {
    0%, 100% { 
        box-shadow: 
            0 0 60px rgba(88, 166, 255, 0.15),
            0 0 120px rgba(88, 166, 255, 0.08),
            inset 0 0 60px rgba(0, 0, 0, 0.5),
            0 25px 50px rgba(0, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 
            0 0 80px rgba(88, 166, 255, 0.25),
            0 0 160px rgba(88, 166, 255, 0.12),
            inset 0 0 80px rgba(0, 0, 0, 0.6),
            0 30px 60px rgba(0, 0, 0, 0.4);
    }
}

.login-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: 12px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 16px;
}

.login-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
    opacity: 0.5;
}

.key-input {
    margin-bottom: 24px;
}

.key-input input {
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: inputPulse 2s ease-in-out infinite;
}

@keyframes inputPulse {
    0%, 100% { border-color: var(--border-color); }
    50% { border-color: rgba(88, 166, 255, 0.5); }
}

/* Progress bar with matrix-style animation */
.progress-container {
    margin-top: 24px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(13, 17, 23, 0.8);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--text-primary), rgba(88, 166, 255, 0.8));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--glow-blue), 0 0 20px var(--glow-blue);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
    animation: progressShine 0.5s infinite;
}

@keyframes progressShine {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.scan-text {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 12px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scanTextBlink 1s ease-in-out infinite;
}

@keyframes scanTextBlink {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Result display with dramatic effects */
.result-container {
    margin-top: 24px;
    display: none;
    text-align: center;
}

.result-text {
    font-size: 11px;
    margin-bottom: 16px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Glitch effect for access result */
.access-result {
    font-size: 42px;
    font-weight: bold;
    letter-spacing: 8px;
    text-transform: uppercase;
    animation: glitch 0.2s ease, pulse 0.8s ease-in-out infinite;
    text-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor;
    padding: 24px;
    border: 2px solid currentColor;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.access-result::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.access-result.success {
    color: var(--accent-success);
    border-color: var(--accent-success);
    box-shadow: 0 0 30px rgba(63, 185, 80, 0.6), inset 0 0 30px rgba(63, 185, 80, 0.15), 0 0 60px rgba(63, 185, 80, 0.3);
}

.access-result.error {
    color: var(--accent-error);
    border-color: var(--accent-error);
    box-shadow: 0 0 30px rgba(248, 81, 73, 0.6), inset 0 0 30px rgba(248, 81, 73, 0.15), 0 0 60px rgba(248, 81, 73, 0.3);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); filter: hue-rotate(0deg); }
    10% { transform: translate(-3px, 2px); filter: hue-rotate(10deg); }
    20% { transform: translate(3px, -2px); filter: hue-rotate(-10deg); }
    30% { transform: translate(-3px, -2px); }
    40% { transform: translate(3px, 2px); }
    50% { transform: translate(0); }
    60% { transform: translate(-2px, 1px); }
    70% { transform: translate(2px, -1px); }
    80% { transform: translate(-2px, -1px); }
    90% { transform: translate(2px, 1px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

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

/* Dashboard with spy interface */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px;
    animation: dashboardFadeIn 0.8s var(--transition-smooth);
}

@keyframes dashboardFadeIn {
    from { 
        opacity: 0;
        transform: translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, var(--text-primary), transparent);
    animation: headerLineExpand 2s ease-out forwards;
}

@keyframes headerLineExpand {
    from { width: 0; }
    to { width: 200px; }
}

.dashboard-title {
    font-size: 32px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-primary);
}

.user-panel {
    display: flex;
    gap: 32px;
    font-size: 11px;
}

.user-info {
    display: flex;
    gap: 20px;
}

.user-info span {
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.user-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: rgba(13, 17, 23, 0.8);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.15), transparent);
    transition: left 0.4s var(--transition-smooth);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: var(--panel-bg-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(60, 60, 60, 0.5);
    border-color: var(--border-color-hover);
}

/* Content area */
.content-area {
    margin-top: 32px;
    animation: contentSlideIn 0.8s var(--transition-smooth);
}

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

/* Info blocks grid with spy aesthetic */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.info-block {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 28px;
    box-shadow: 
        0 0 20px rgba(88, 166, 255, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.3),
        0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.info-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.info-block:hover {
    transform: translateY(-8px);
    border-color: var(--border-color-hover);
    box-shadow: 
        0 0 30px rgba(88, 166, 255, 0.3),
        0 0 60px rgba(88, 166, 255, 0.15),
        inset 0 0 40px rgba(0, 0, 0, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

.info-block:hover::before {
    opacity: 0.8;
}

.info-block-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 5px var(--glow-blue);
}

.info-block-url {
    font-size: 10px;
    color: var(--text-secondary);
    word-break: break-all;
    letter-spacing: 1px;
}

/* Loading overlay with matrix effect */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: loadingBlink 1s ease-in-out infinite;
}

@keyframes loadingBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Orders page - A4 paper effect */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.order-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-paper {
    background: linear-gradient(to bottom, #f8f8f0 0%, #f0f0e8 100%);
    color: #1a1a1a;
    padding: 50px 60px;
    font-family: 'Times New Roman', 'Georgia', serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    box-sizing: border-box;
    page-break-after: always;
    border: 1px solid #d0d0c8;
}

.order-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    pointer-events: none;
}

.order-paper:last-child {
    page-break-after: auto;
}

.order-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 20px;
}

.order-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.order-subtitle {
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
}

.order-number {
    font-size: 16px;
    margin-top: 12px;
    font-weight: bold;
}

.classification {
    color: #8b0000;
    font-weight: bold;
    font-size: 18px;
    margin: 30px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #8b0000;
    padding: 10px;
    background: rgba(139, 0, 0, 0.05);
}

.order-body {
    font-size: 14px;
    line-height: 2;
    margin: 30px 0;
    text-align: justify;
}

.order-body p {
    margin-bottom: 16px;
    text-indent: 1.5em;
}

.order-body p:first-child {
    text-indent: 0;
}

.order-signer {
    margin-top: 60px;
    text-align: right;
    padding-top: 20px;
    border-top: 1px solid #ccc;
}

.order-signer-position {
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
}

.order-signer-name {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.order-signature {
    max-width: 200px;
    margin-left: auto;
    border-bottom: 1px solid #ccc;
}

/* Redacted block */
.redacted-block {
    background: var(--accent-error);
    color: white;
    padding: 20px;
    text-align: center;
    font-family: 'Consolas', 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 2px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Agents table with spy aesthetic */
.agents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.agents-table th,
.agents-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.agents-table th {
    background: rgba(13, 17, 23, 0.9);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 10px;
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--glow-blue);
}

.agents-table tr {
    transition: all 0.2s ease;
}

.agents-table tr:hover {
    background: rgba(88, 166, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(88, 166, 255, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

.status-verification {
    background: rgba(245, 124, 0, 0.2);
    color: var(--accent-warning);
    border: 1px solid var(--accent-warning);
}

.status-trusted {
    background: rgba(46, 125, 50, 0.2);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.status-critical {
    background: rgba(198, 40, 40, 0.2);
    color: var(--accent-error);
    border: 1px solid var(--accent-error);
}

/* Admin panel */
.admin-section {
    margin-bottom: 32px;
}

.admin-section-title {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 16px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(40, 45, 55, 0.8);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

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

/* Form styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    font-weight: bold;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Canvas signature */
.signature-canvas {
    border: 1px solid var(--border-color);
    background: rgba(20, 25, 30, 0.8);
    cursor: crosshair;
    touch-action: none;
}

.canvas-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Mute button */
.mute-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    font-size: 11px;
    z-index: 10001;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 2px;
}

/* Modal with spy aesthetic */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s var(--transition-smooth);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 32px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    box-shadow: 
        0 0 40px rgba(88, 166, 255, 0.2),
        inset 0 0 40px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s var(--transition-smooth);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--glow-blue);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-error);
    text-shadow: 0 0 10px var(--glow-red);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .user-panel {
        flex-direction: column;
        gap: 16px;
    }
    
    .navigation {
        justify-content: center;
    }
}

/* Classified watermark */
.classified-watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 10px;
    color: var(--accent-error);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.3;
    pointer-events: none;
    z-index: 9996;
    animation: watermarkPulse 3s ease-in-out infinite;
}

@keyframes watermarkPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Matrix rain effect container */
.matrix-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
}

/* Page flip animation */
.order-paper {
    animation: pageFlipIn 0.6s ease-out;
}

@keyframes pageFlipIn {
    0% {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.9);
        transform-origin: left center;
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
        transform-origin: left center;
    }
}

.order-wrapper .order-paper:nth-child(1) {
    animation-delay: 0s;
}

.order-wrapper .order-paper:nth-child(2) {
    animation-delay: 0.3s;
}

.order-wrapper .order-paper:nth-child(3) {
    animation-delay: 0.6s;
}

.order-wrapper .order-paper:nth-child(4) {
    animation-delay: 0.9s;
}

.order-wrapper .order-paper:nth-child(5) {
    animation-delay: 1.2s;
}

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
    }

    .user-panel {
        width: 100%;
       flex-direction: column;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .navigation {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }

    .dashboard-title {
        font-size: 20px;
    }

    .content-area {
        padding: 16px;
    }

    .panel {
        padding: 16px;
    }

    /* Login page */
    .login-container {
        padding: 16px;
    }

    .login-panel {
        padding: 24px;
        max-width: 100%;
    }

    .login-title {
        font-size: 24px;
    }

    /* Tables */
    .agents-table,
    .orders-table,
    .suspects-table {
        font-size: 12px;
    }

    .agents-table th,
    .orders-table th,
    .suspects-table th {
        padding: 8px 4px;
    }

    .agents-table td,
    .orders-table td,
    .suspects-table td {
        padding: 8px 4px;
    }

    /* Forms */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
    }

    /* Uniform grid */
    .uniform-grid {
        grid-template-columns: 1fr;
    }

    .uniform-card {
        padding: 20px;
    }

    /* Info blocks */
    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Search and filters */
    #search-input,
    #status-filter,
    #curator-filter {
        width: 100%;
        margin-bottom: 8px;
    }

    /* Admin panel */
    .admin-section {
        margin-bottom: 24px;
    }

    /* User profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    /* Orders */
    .order-paper {
        padding: 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nav-link {
        font-size: 11px;
        padding: 6px 10px;
    }

    .dashboard-title {
        font-size: 16px;
    }

    .login-title {
        font-size: 20px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Hide less important columns on very small screens */
    .agents-table th:nth-child(n+7),
    .agents-table td:nth-child(n+7) {
        display: none;
    }
}
