/* Base styles */
:root {
    --primary-color: #14cd14;
    --accent-color: #14cd14;
    --primary-glow: rgba(0, 242, 93, 0.3);
    --background-dark: #171717;
    --background-darker: #000000;
    --text-color: #ffffff;
    --bg-elevated: #002104;
    --bg-hover: #00cd07;
}

body {
    font-family: "Courier New", Courier, monospace;
    margin: 0;
    padding: 0;
    background-color: var(--background-darker);
    color: var(--text-color);
    min-height: 100vh;
}

/* Common container styles */
.container {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px var(--primary-glow),
                inset 0 0 15px rgba(0, 242, 93, 0.1);
    padding: 2rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 2rem auto;
    position: relative;
    z-index: 1;
    max-width: 1400px;
}


#primary-container {
    padding: 10px 20px 20px 20px;
    background: transparent;
}

/* Headings */
h1, h2, h3 {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 242, 93, 0.5);
}

/* Header styles */


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    position: relative;
    z-index: 2;
}

.header h1 {
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Search container optimization */
.search-container {
    position: relative;
    display: flex;
    flex: 1;
    max-width: 400px;
    margin: 0 1.5rem;
    align-items: center;
}

.search-box {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 242, 93, 0.1);
}



.search-box::placeholder {
    color: rgba(0, 242, 93, 0.5);
    font-style: italic;
}


.search-box:focus + .search-icon {
    color: #fff;
}

/* Search icon positioning */
.search-icon {
    position: absolute;
    left: -1.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.7;
    width: 16px;
    height: 16px;
}

.search-box:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
}

.search-box:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.75);
}



/* Form elements */
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 12px;
    font-family: monospace;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border-radius: 4px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 242, 93, 0.3);
    background: rgba(0, 242, 93, 0.1);
}

/* Buttons */
.action-button,
button {
    background: rgba(0, 242, 93, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.action-button:hover,
button:hover {
    background: rgba(0, 242, 93, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 93, 0.4);
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    background-color: rgba(21, 255, 0, 0.1);
    box-shadow: 0 0 10px rgba(127, 129, 0, 0.502);
    color: var(--accent-color);
    border-radius: 4px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: rgba(21, 255, 0, 0.4);
    box-shadow: 0 0 10px rgba(251, 255, 0, 0.77);

}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-darker);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 242, 93, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(0, 242, 93, 0.1);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 242, 93, 0.2);
}

.btn-danger {
    background-color: rgba(255, 0, 0, 0.8) !important;
    border: 1px solid #ff0000;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: rgba(255, 0, 0, 1) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.6);
}

th {
    background: rgba(0, 242, 93, 0.1);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px;
    border-bottom: 2px solid var(--primary-color);
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 242, 93, 0.2);
}

tr:hover {
    background: rgba(0, 242, 93, 0.05);
}

/* Branding footer */
.branding {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    color: rgba(0, 242, 93, 0.7);
    font-size: 0.9em;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 242, 93, 0.3);
}

.branding-content {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 242, 93, 0.3);
    box-shadow: 0 0 20px rgba(0, 242, 93, 0.1);
}

.social-links {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.social-link {
    color: rgba(0, 242, 93, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 242, 93, 0.5);
}

.separator {
    color: rgba(0, 242, 93, 0.4);
}

/* Messages */
.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 1rem;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.success-message {
    color: var(--primary-color);
    text-align: center;
    margin-top: 1rem;
    text-shadow: 0 0 10px rgba(0, 242, 93, 0.5);
}

/* Animations */
@keyframes glow {
    from {
        box-shadow: 0 0 30px rgba(0, 242, 93, 0.3),
                   inset 0 0 15px rgba(0, 242, 93, 0.1);
    }
    to {
        box-shadow: 0 0 40px rgba(0, 242, 93, 0.4),
                   inset 0 0 20px rgba(0, 242, 93, 0.2);
    }
}

.glow-effect {
    animation: glow 2s infinite alternate;
}

/* Audit page specific styles */
.audit-container {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.audit-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.audit-table th {
    background: rgba(0, 242, 93, 0.1);
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--primary-color);
}

.audit-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 242, 93, 0.1);
}

.audit-table td pre.details {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.filters {
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-color);
}

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


.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.filter-group input {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    width: 100%;
}

.filter-group input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.content-header h1 {
    margin: 0;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Flatpickr customization */
.flatpickr-calendar {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(0, 242, 93, 0.2) !important;
}

.flatpickr-day {
    color: var(--text-color) !important;
}

.flatpickr-day.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--background-darker) !important;
}

.flatpickr-day:hover {
    background: rgba(0, 242, 93, 0.1) !important;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

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

    .audit-table td {
        padding: 0.75rem;
    }
}

/* Matrix background should be below everything */
#matrix-bg {
    z-index: -1;
}
