/* ═══════════════════════════════════════════════════════════════════════════
   OUROBOROS FOUNDATION — Project Registry System
   Imperial Institute for Anomalous Research
   Classification: BLACK SERIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* === CSS VARIABLES === */
:root {
    /* Core Dark Theme */
    --bg-void: #0a0a0b;
    --bg-dark: #0d0d0f;
    --bg-panel: #111114;
    --bg-card: #151518;
    --bg-elevated: #1a1a1e;
    --bg-input: #0c0c0e;

    /* Borders & Lines */
    --border-dark: #1f1f24;
    --border-medium: #2a2a30;
    --border-light: #3a3a42;
    --border-glow: #4a4a55;

    /* Text Colors */
    --text-primary: #e8e8ec;
    --text-secondary: #a0a0a8;
    --text-muted: #606068;
    --text-dim: #404048;

    /* Accent Colors - Occult Theme */
    --accent-gold: #c9a227;
    --accent-gold-dim: #8a7019;
    --accent-gold-glow: rgba(201, 162, 39, 0.3);

    --accent-red: #8b1a1a;
    --accent-red-bright: #c42b2b;
    --accent-red-glow: rgba(196, 43, 43, 0.3);

    --accent-amber: #b87333;
    --accent-purple: #6b3fa0;
    --accent-cyan: #2a8a8a;
    --accent-green: #2d5a2d;

    /* Status Colors */
    --status-critical: #c42b2b;
    --status-high: #c9a227;
    --status-medium: #2a8a8a;
    --status-low: #4a5568;

    --status-active: #3d8b3d;
    --status-review: #b87333;
    --status-suspended: #8b1a1a;

    /* Typography */
    --font-mono: 'Courier Prime', 'Courier New', monospace;
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Crimson Text', Georgia, serif;

    /* Effects */
    --glow-gold: 0 0 20px rgba(201, 162, 39, 0.4);
    --glow-red: 0 0 20px rgba(196, 43, 43, 0.4);
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.8);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === SCANLINES OVERLAY === */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    opacity: 0.3;
}

/* === VIGNETTE EFFECT === */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

/* === CORNER DECORATIONS === */
.corner-decoration {
    position: fixed;
    font-size: 2rem;
    color: var(--accent-gold-dim);
    opacity: 0.3;
    z-index: 998;
}

.top-left { top: 15px; left: 15px; }
.top-right { top: 15px; right: 15px; }
.bottom-left { bottom: 15px; left: 15px; }
.bottom-right { bottom: 15px; right: 15px; }

/* === MAIN CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.main-header {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    align-items: center;
    padding: 30px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    border-bottom: 2px solid var(--accent-gold-dim);
    position: relative;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-gold) 20%,
        var(--accent-gold) 80%,
        transparent
    );
}

/* Header Left - Classification */
.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.classification-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clearance-level {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent-red-bright);
    padding: 5px 10px;
    border: 1px solid var(--accent-red);
    background: rgba(139, 26, 26, 0.1);
}

.document-class {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Header Center - Logo & Title */
.header-center {
    text-align: center;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.main-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(201, 162, 39, 0.3));
    transition: filter 0.3s ease;
}

.main-logo:hover {
    filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.5));
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.foundation-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(201, 162, 39, 0.3);
    margin-bottom: 5px;
}

.foundation-subtitle {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.motto-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.divider {
    color: var(--border-medium);
    font-size: 0.8rem;
}

.motto {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Header Right - Session Info */
.header-right {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 15px;
}

.session-info {
    display: grid;
    grid-template-columns: auto minmax(80px, 150px);
    gap: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-align: right;
}

.session-label {
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.session-value {
    color: var(--accent-gold);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === NAVIGATION === */
.main-nav {
    position: relative;
    margin-top: 20px;
}

.nav-border-top,
.nav-border-bottom {
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--border-medium) 10%,
        var(--border-medium) 90%,
        transparent
    );
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    background: var(--bg-dark);
    border-left: 1px solid var(--border-dark);
    border-right: 1px solid var(--border-dark);
}

.nav-links li {
    border-right: 1px solid var(--border-dark);
}

.nav-links li:last-child {
    border-right: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-links a:hover::before {
    transform: scaleX(1);
}

.nav-links a.active {
    color: var(--accent-gold);
    background: var(--bg-elevated);
}

.nav-links a.active::before {
    transform: scaleX(1);
}

.nav-icon {
    font-size: 0.6rem;
    opacity: 0.5;
}

/* === MAIN CONTENT === */
.content {
    margin-top: 30px;
}

/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header-decoration {
    color: var(--accent-gold-dim);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
}

.header-content {
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* === STATS BAR === */
.stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 15px 30px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 40px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 5px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-medium);
}

/* === PROJECT GRID === */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* === PROJECT CARDS === */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

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

/* Threat Level Colors */
.threat-level-critical::before { background: var(--status-critical); }
.threat-level-high::before { background: var(--status-high); }
.threat-level-medium::before { background: var(--status-medium); }
.threat-level-low::before { background: var(--status-low); }

.threat-level-critical:hover { box-shadow: 0 0 30px rgba(196, 43, 43, 0.2); }
.threat-level-high:hover { box-shadow: 0 0 30px rgba(201, 162, 39, 0.2); }

/* Card Classification */
.card-classification {
    display: flex;
    align-items: center;
    gap: 6px;
}

.threat-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.threat-level-critical .threat-indicator { background: var(--status-critical); }
.threat-level-high .threat-indicator { background: var(--status-high); }
.threat-level-medium .threat-indicator { background: var(--status-medium); }
.threat-level-low .threat-indicator { background: var(--status-low); }

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

.threat-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border: 1px solid currentColor;
}

.threat-level-critical .threat-text { color: var(--status-critical); }
.threat-level-high .threat-text { color: var(--status-high); }
.threat-level-medium .threat-text { color: var(--status-medium); }
.threat-level-low .threat-text { color: var(--status-low); }

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px 10px;
    border-bottom: 1px solid var(--border-dark);
}

.card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-id {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.object-class {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}

/* Project Name */
.project-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    padding: 15px;
    text-align: center;
}

.project-codename {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0 15px 15px;
    border-bottom: 1px dashed var(--border-dark);
}

/* Project Info */
.project-info {
    padding: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted var(--border-dark);
}

.info-row:last-child {
    border-bottom: none;
}

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

.info-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Status Indicators */
.status-active { color: var(--status-active) !important; }
.status-review { color: var(--status-review) !important; }
.status-suspended { color: var(--status-suspended) !important; }

/* Progress Section */
.progress-section {
    padding: 15px;
    border-top: 1px solid var(--border-dark);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.progress-percent {
    color: var(--accent-gold);
}

.progress-track {
    height: 6px;
    background: var(--bg-void);
    border: 1px solid var(--border-dark);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold-dim), var(--accent-gold));
    transition: width 0.5s ease;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.5));
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
}

.last-update {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
}

.btn-access {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--accent-gold-dim);
    color: var(--accent-gold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-access:hover {
    background: var(--accent-gold);
    color: var(--bg-void);
}

/* Classified Stamp */
.card-redacted-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: rgba(196, 43, 43, 0.15);
    pointer-events: none;
    white-space: nowrap;
}

/* Suspended Overlay */
.card-suspended-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.card-suspended-overlay span {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    color: var(--status-suspended);
    border: 2px solid var(--status-suspended);
    padding: 10px 25px;
    transform: rotate(-5deg);
}

/* === FORM SECTION === */
.form-section {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 1px solid var(--border-dark);
}

.registration-form {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    padding: 30px;
    position: relative;
}

.registration-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-gold-dim) 20%,
        var(--accent-gold-dim) 80%,
        transparent
    );
}

/* Form Warning */
.form-warning {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(139, 26, 26, 0.1);
    border: 1px solid var(--accent-red);
    margin-bottom: 30px;
}

.warning-icon {
    font-size: 1.5rem;
    color: var(--accent-red-bright);
}

.form-warning p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Form Fieldset */
.form-fieldset {
    border: 1px solid var(--border-dark);
    padding: 25px 20px 20px;
    background: var(--bg-card);
}

.form-fieldset legend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    background: var(--bg-panel);
}

.legend-number {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-gold);
}

.legend-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

/* Field Groups */
.field-group {
    margin-bottom: 15px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.field-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

/* Form Inputs */
.field-input,
.field-select,
.field-textarea {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    outline: none;
    border-color: var(--accent-gold-dim);
    box-shadow: 0 0 0 1px var(--accent-gold-dim);
}

.field-input.readonly {
    background: var(--bg-dark);
    color: var(--text-muted);
    font-style: italic;
}

.field-textarea {
    resize: vertical;
    min-height: 80px;
}

.field-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23606068' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-dark);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-mark {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-item input:checked + .checkbox-mark {
    background: var(--accent-gold-dim);
    border-color: var(--accent-gold);
}

.checkbox-item input:checked + .checkbox-mark::after {
    content: '✓';
    color: var(--bg-void);
    font-size: 0.7rem;
    font-weight: bold;
}

.checkbox-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Declaration Block */
.declaration-block {
    margin-top: 20px;
    padding: 15px;
    background: rgba(139, 26, 26, 0.05);
    border: 1px solid var(--accent-red);
}

.declaration {
    align-items: flex-start;
}

.declaration .checkbox-mark {
    margin-top: 2px;
}

.declaration-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-dark);
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    padding: 12px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.btn-icon {
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--accent-gold-dim);
    border-color: var(--accent-gold);
    color: var(--bg-void);
}

.btn-primary:hover {
    background: var(--accent-gold);
    box-shadow: var(--glow-gold);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Form Signatures */
.form-signatures {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-dark);
}

.signature-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.signature-line {
    width: 180px;
    height: 1px;
    background: var(--border-medium);
}

.signature-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.seal-circle {
    width: 70px;
    height: 70px;
    border: 2px dashed var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-circle span {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.05em;
}

/* === FOOTER === */
.main-footer {
    margin-top: 50px;
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-top: 2px solid var(--accent-gold-dim);
}

.footer-top {
    display: grid;
    grid-template-columns: 100px 1fr 200px;
    gap: 30px;
    align-items: center;
    padding: 30px;
}

.footer-logo-section {
    display: flex;
    justify-content: center;
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(30%);
}

.footer-info {
    text-align: center;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.footer-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-gold-dim);
    letter-spacing: 0.1em;
}

.footer-address {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-warning-block {
    display: flex;
    justify-content: center;
}

.warning-border {
    padding: 12px 15px;
    border: 1px solid var(--accent-red);
    background: rgba(139, 26, 26, 0.1);
    text-align: center;
}

.warning-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent-red-bright);
    margin-bottom: 5px;
}

.warning-border .warning-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.footer-bottom {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border-dark);
    background: var(--bg-void);
}

.footer-quote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .main-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .header-left,
    .header-right {
        justify-content: center;
    }

    .classification-banner {
        align-items: center;
    }

    .session-info {
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 12px 15px;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 700px) {
    .container {
        padding: 10px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .field-row,
    .field-row.three-col {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .form-signatures {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .corner-decoration {
        display: none;
    }
}

/* === PRINT STYLES === */
@media print {
    .scanlines,
    .vignette,
    .corner-decoration {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .main-nav,
    .btn-access,
    .form-actions {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE STYLES — The Gateway to the Unknown
   ═══════════════════════════════════════════════════════════════════════════ */

/* === LOGIN PAGE BASE === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-void);
    overflow: hidden;
}

/* === FLOATING SYMBOLS === */
.floating-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-symbols .symbol {
    position: absolute;
    font-size: 2rem;
    color: var(--accent-gold);
    opacity: 0;
    left: var(--x, 50%);
    animation: floatSymbol var(--duration, 25s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    text-shadow: 0 0 10px var(--accent-gold-glow);
}

@keyframes floatSymbol {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    50% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* === LOGIN CONTAINER === */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-deep), 0 0 60px rgba(201, 162, 39, 0.1);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-gold) 20%,
        var(--accent-gold) 80%,
        transparent
    );
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-gold-dim) 20%,
        var(--accent-gold-dim) 80%,
        transparent
    );
}

/* === LOGIN WARNING BANNER === */
.login-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    background: rgba(139, 26, 26, 0.15);
    border: 1px solid var(--accent-red);
    margin-bottom: 30px;
    animation: warningPulse 3s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        border-color: var(--accent-red);
        box-shadow: 0 0 10px rgba(196, 43, 43, 0.2);
    }
    50% {
        border-color: var(--accent-red-bright);
        box-shadow: 0 0 20px rgba(196, 43, 43, 0.4);
    }
}

.warning-sigil {
    font-size: 1.2rem;
    color: var(--accent-red-bright);
    animation: sigilGlow 2s ease-in-out infinite alternate;
}

@keyframes sigilGlow {
    0% { text-shadow: 0 0 5px var(--accent-red-glow); }
    100% { text-shadow: 0 0 15px var(--accent-red-glow), 0 0 25px var(--accent-red-glow); }
}

.warning-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--accent-red-bright);
    font-weight: 700;
}

/* === LOGIN LOGO SECTION === */
.login-logo-section {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo-section .logo-container {
    margin-bottom: 20px;
}

.login-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(201, 162, 39, 0.4));
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(201, 162, 39, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(201, 162, 39, 0.6));
    }
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(201, 162, 39, 0.3);
    margin-bottom: 8px;
}

.login-subtitle {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    text-transform: uppercase;
}

/* === SECURITY NOTICE === */
.security-notice {
    text-align: center;
    padding: 15px;
    margin-bottom: 25px;
    border-top: 1px dashed var(--border-dark);
    border-bottom: 1px dashed var(--border-dark);
}

.security-notice p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.security-notice .notice-emphasis {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
}

/* === LOGIN FORM === */
.login-form {
    margin-bottom: 25px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 14px 16px;
    background: var(--bg-void);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.login-input::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-gold-dim);
    box-shadow: 0 0 0 1px var(--accent-gold-dim), inset 0 0 20px rgba(201, 162, 39, 0.05);
    animation: inputFlicker 0.1s ease-in-out;
}

@keyframes inputFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* === LOGIN ERROR === */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(139, 26, 26, 0.15);
    border: 1px solid var(--accent-red);
    margin-bottom: 20px;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.error-icon {
    font-size: 1.2rem;
    color: var(--accent-red-bright);
}

.error-message {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-red-bright);
}

/* === LOGIN BUTTON === */
.login-button {
    width: 100%;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-gold-dim);
    color: var(--accent-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(201, 162, 39, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.login-button:hover {
    background: var(--accent-gold-dim);
    color: var(--bg-void);
    box-shadow: var(--glow-gold);
}

.login-button:hover::before {
    left: 100%;
}

.login-button:active {
    transform: scale(0.98);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-sigil {
    animation: spinSigil 2s linear infinite;
}

@keyframes spinSigil {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === LOGIN FOOTER === */
.login-footer {
    text-align: center;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.divider-line {
    width: 60px;
    height: 1px;
    background: var(--border-medium);
}

.divider-symbol {
    color: var(--accent-gold-dim);
    font-size: 0.7rem;
}

.login-footer .footer-quote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.login-footer .footer-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* === LOGIN PAGE RESPONSIVE === */
@media (max-width: 500px) {
    .login-container {
        margin: 20px;
        padding: 30px 25px;
    }

    .login-title {
        font-size: 1.4rem;
        letter-spacing: 0.15em;
    }

    .login-logo {
        width: 100px;
        height: 100px;
    }

    .floating-symbols .symbol {
        font-size: 1.5rem;
    }
}

/* === INVITE/REGISTRATION PAGE ADJUSTMENTS === */

/* Wider container for invite page */
.invite-container {
    max-width: 650px;
}

/* Two-column layout for invite page */
.invite-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.invite-info-panel {
    display: flex;
    flex-direction: column;
}

.invite-form-panel {
    display: flex;
    flex-direction: column;
}

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Invite info display */
.invite-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
    padding: 15px;
    flex: 1;
}

.invite-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
}

.invite-info .info-row:last-child {
    border-bottom: none;
}

.invite-info .info-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.invite-info .info-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-align: right;
}

/* Compact security notice */
.security-notice-compact {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-red);
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: rgba(139, 26, 26, 0.1);
    border: 1px solid rgba(196, 43, 43, 0.3);
}

/* Invite loading/invalid states */
.invite-loading,
.invite-invalid {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.invite-loading .loading-sigil,
.invite-invalid .invalid-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.invite-invalid .invalid-icon {
    color: var(--accent-red);
}

.invite-invalid h3 {
    font-family: var(--font-display);
    color: var(--accent-red);
    margin-bottom: 10px;
}

.invite-invalid .invalid-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Responsive: stack on small screens */
@media (max-width: 600px) {
    .invite-container {
        max-width: 450px;
    }

    .invite-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — Ritual Completion Messages
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-card);
    min-width: 300px;
    max-width: 450px;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-success {
    border-left: 3px solid var(--status-active);
}

.toast-error {
    border-left: 3px solid var(--accent-red-bright);
}

.toast-warning {
    border-left: 3px solid var(--status-high);
}

.toast-info {
    border-left: 3px solid var(--accent-cyan);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--status-active); }
.toast-error .toast-icon { color: var(--accent-red-bright); }
.toast-warning .toast-icon { color: var(--status-high); }
.toast-info .toast-icon { color: var(--accent-cyan); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATES — Consulting the Archives
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 11, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-ritual {
    text-align: center;
}

.sigil-spinner {
    font-size: 3rem;
    color: var(--accent-gold);
    animation: spinSigil 3s linear infinite;
    text-shadow: 0 0 20px var(--accent-gold-glow);
    margin-bottom: 20px;
}

.loading-ritual span:last-child {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLEARANCE BADGES — Degrees of Initiation
   ═══════════════════════════════════════════════════════════════════════════ */

.clearance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    border: 1px solid;
}

.clearance-0 {
    background: rgba(74, 85, 104, 0.2);
    border-color: var(--status-low);
    color: var(--status-low);
}

.clearance-1 {
    background: rgba(184, 115, 51, 0.15);
    border-color: #cd7f32;
    color: #cd7f32;
}

.clearance-2 {
    background: rgba(192, 192, 192, 0.15);
    border-color: #c0c0c0;
    color: #c0c0c0;
}

.clearance-3 {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.clearance-4 {
    background: rgba(139, 26, 26, 0.15);
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
}

.clearance-5 {
    background: var(--bg-void);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: inset 0 0 10px rgba(201, 162, 39, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECURITY CLASS BADGES — Document Classification
   ═══════════════════════════════════════════════════════════════════════════ */

.security-class {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.security-green {
    background: rgba(45, 90, 45, 0.3);
    border: 1px solid var(--accent-green);
    color: #4ade4a;
}

.security-amber {
    background: rgba(184, 115, 51, 0.3);
    border: 1px solid var(--accent-amber);
    color: var(--accent-amber);
}

.security-red {
    background: rgba(139, 26, 26, 0.3);
    border: 1px solid var(--accent-red);
    color: var(--accent-red-bright);
}

.security-black {
    background: var(--bg-void);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-shadow: 0 0 5px var(--accent-gold-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL DIALOGS — Ritual Confirmation
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 11, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    animation: fadeIn 0.2s ease-out;
}

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

.modal {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    text-align: center;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
}

.modal-body {
    padding: 25px 20px;
}

.modal-body p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid var(--border-dark);
    justify-content: center;
}

.modal-btn {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.modal-btn-cancel {
    background: transparent;
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.modal-btn-cancel:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.modal-btn-confirm {
    background: var(--accent-gold-dim);
    border-color: var(--accent-gold);
    color: var(--bg-void);
}

.modal-btn-confirm:hover {
    background: var(--accent-gold);
    box-shadow: var(--glow-gold);
}

.modal-btn-danger {
    background: var(--accent-red);
    border-color: var(--accent-red-bright);
    color: var(--text-primary);
}

.modal-btn-danger:hover {
    background: var(--accent-red-bright);
    box-shadow: var(--glow-red);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATES — The Void Stares Back
   ═══════════════════════════════════════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    animation: slowRotate 20s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* === LOGOUT BUTTON === */
.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 15px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red-bright);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--accent-red);
    color: var(--text-primary);
}

/* === ACTION BAR === */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 10px 40px 10px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold-dim);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* === DETAIL VIEW === */
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.detail-badges {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border: 1px solid;
}

.status-badge.status-active {
    border-color: var(--status-active);
    color: var(--status-active);
}

.status-badge.status-review {
    border-color: var(--status-review);
    color: var(--status-review);
}

.status-badge.status-suspended,
.status-badge.status-archived {
    border-color: var(--status-suspended);
    color: var(--status-suspended);
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    padding: 20px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-dark);
}

.panel-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -10px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-dark);
}

.detail-row:last-child {
    border-bottom: none;
}

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

.detail-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.detail-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-dark);
}

.detail-section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold-dim);
    margin-bottom: 10px;
}

.detail-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === TEAM MEMBERS === */
.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dark);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.member-role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.empty-text {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.75rem;
    margin-top: 15px;
}

/* === LOGBOOK === */
.logbook-section {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    padding: 25px;
}

.logbook-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-dark);
}

.logbook-form {
    background: var(--bg-elevated);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px dashed var(--border-medium);
}

.logbook-entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.logbook-entry {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    border-left: 3px solid var(--accent-gold-dim);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-dark);
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.entry-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
}

.entry-type-observation { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.entry-type-experiment { border-color: var(--accent-purple); color: var(--accent-purple); }
.entry-type-incident { border-color: var(--accent-red); color: var(--accent-red-bright); }
.entry-type-note { border-color: var(--text-muted); color: var(--text-muted); }

.entry-icon {
    font-size: 0.9rem;
}

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

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

.author-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.entry-content {
    padding: 15px;
}

.entry-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 15px;
}

.entry-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.entry-image-container {
    border: 1px solid var(--border-dark);
    overflow: hidden;
}

.entry-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.entry-image:hover {
    transform: scale(1.05);
}

.entry-footer {
    padding: 10px 15px;
    border-top: 1px dashed var(--border-dark);
}

.entry-edited {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-style: italic;
    color: var(--text-dim);
}

/* === PERSONNEL GRID === */
.personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.personnel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    padding: 20px;
    transition: all 0.3s ease;
}

.personnel-card:hover {
    border-color: var(--border-light);
}

.personnel-header {
    margin-bottom: 15px;
}

.personnel-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.personnel-username {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-gold-dim);
    margin-bottom: 15px;
}

.personnel-info {
    border-top: 1px solid var(--border-dark);
    padding-top: 15px;
}

/* === ADMIN PANEL === */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.admin-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    padding: 25px;
}

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.admin-user-list {
    max-height: 500px;
    overflow-y: auto;
}

.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-dark);
}

.admin-user-item:last-child {
    border-bottom: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 3px 8px;
}

.user-status.active {
    color: var(--status-active);
}

.user-status.inactive {
    color: var(--status-suspended);
}

/* Invitation Link Section */
.invite-link-section {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
}

.invite-link-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.invite-icon {
    color: var(--accent-gold);
}

.invite-instructions {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.invite-link-container {
    display: flex;
    gap: 10px;
}

.invite-link-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg-dark);
}

/* Invite Page Styles */
.invite-loading {
    text-align: center;
    padding: 40px;
}

.invite-loading .loading-sigil {
    font-size: 3rem;
    color: var(--accent-gold);
    animation: spin 2s linear infinite;
}

.invite-loading p {
    margin-top: 15px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.invite-invalid {
    text-align: center;
    padding: 40px;
}

.invite-invalid .invalid-icon {
    font-size: 3rem;
    color: var(--accent-red);
    animation: pulse 2s infinite;
}

.invite-invalid h3 {
    margin-top: 15px;
    font-family: var(--font-display);
    color: var(--accent-red);
    letter-spacing: 0.1em;
}

.invite-invalid .invalid-message {
    margin: 15px 0 25px;
    font-family: var(--font-body);
    color: var(--text-secondary);
}

.invite-info {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
}

.invite-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-dark);
}

.invite-info .info-row:last-child {
    border-bottom: none;
}

.invite-info .info-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.invite-info .info-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-gold);
}

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

/* === LARGE MODAL === */
.modal-large {
    max-width: 700px;
}

.modal-large .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-large .form-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-large .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* === IMAGE MODAL === */
.image-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 900px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }
}

@media (max-width: 700px) {
    .detail-nav {
        flex-direction: column;
        gap: 15px;
    }

    .entry-header {
        flex-direction: column;
        gap: 10px;
    }

    .entry-meta {
        flex-wrap: wrap;
    }

    .modal-large .form-row {
        grid-template-columns: 1fr;
    }

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }
}
