/* Haunted Inventory - Dark Theme Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: #0f0f1a;
    color: #eaeaea;
}

/* Links */
a {
    color: #ff6b81;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid #e94560;
    outline-offset: 2px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #ff6b81;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* Paragraphs and lists */
p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* WCAG AA Contrast - Additional utilities */
.text-high-contrast {
    color: #ffffff;
}

.bg-dark {
    background-color: #1a1a2e;
}

/* Buttons: white on #c0304a is 5.58:1 (white on #e94560 was only 3.83:1) */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #c0304a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #a3253d;
}

.btn:focus-visible {
    outline: 2px solid #e94560;
    outline-offset: 2px;
}

/* Form elements */
input, textarea, select {
    background-color: #1a1a2e;
    color: #eaeaea;
    border: 1px solid #8890aa;
    padding: 0.5rem;
    border-radius: 4px;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid #e94560;
    outline-offset: 1px;
}

/* Code blocks */
code {
    background-color: #1a1a2e;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    font-family: 'Consolas', 'Monaco', monospace;
}

pre {
    background-color: #1a1a2e;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}
/* Items List Page */
.filter-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #1a1a2e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-form .form-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b81;
}

.filter-form label {
    margin: 0;
}

/* Items Table */
.items-table,
.movements-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.items-table th,
.items-table td,
.movements-table th,
.movements-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #1a1a2e;
}

.items-table th,
.movements-table th {
    background-color: #1a1a2e;
    color: #eaeaea;
    font-weight: 600;
}

.items-table tbody tr:hover,
.movements-table tbody tr:hover {
    background-color: rgba(26, 26, 46, 0.5);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-low {
    background-color: #c0304a;
    color: #ffffff;
}

.btn-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #c0304a;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
}

.btn-link:hover {
    background-color: #a3253d;
    text-decoration: none;
}

.btn-link:focus-visible {
    outline: 2px solid #e94560;
    outline-offset: 2px;
}

/* Item Details Page */
.item-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #1a1a2e;
    border-radius: 4px;
}

.item-header h2 {
    margin-bottom: 0.5rem;
}

.item-header code {
    font-size: 1.1rem;
}

.quantity-display {
    margin: 1rem 0;
    font-size: 1.25rem;
}

.quantity-display .label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.quantity-display .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b81;
}

.quantity-display.low-stock .value {
    color: #ff6b81;
}

.quantity-display .badge {
    margin-left: 1rem;
}

.item-header .description {
    margin-top: 1rem;
    color: #b0b0b0;
}

/* Movement History Section */
.movements-section {
    margin-bottom: 2rem;
}

.delta-positive {
    color: #51cf66;
}

.delta-negative {
    color: #ff6b6b;
}

/* Record Movement Form */
.record-movement-section {
    padding: 1.5rem;
    background-color: #1a1a2e;
    border-radius: 4px;
}

.movement-form {
    max-width: 500px;
}

.movement-form .form-group {
    margin-bottom: 1rem;
}

.movement-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #eaeaea;
}

.movement-form input[type="number"],
.movement-form select,
.movement-form textarea {
    width: 100%;
}

.movement-form textarea {
    resize: vertical;
}

/* Form validation and messages */
.error-message,
.success-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message {
    background-color: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

.success-message {
    background-color: rgba(81, 207, 102, 0.2);
    border: 1px solid #51cf66;
    color: #51cf66;
}

/* Loading and empty states */
.loading,
.empty {
    padding: 2rem;
    text-align: center;
    color: #b0b0b0;
    font-style: italic;
}

/* Error state */
.error {
    padding: 2rem;
    text-align: center;
    background-color: #1a1a2e;
    border-radius: 4px;
    border-left: 4px solid #ff6b6b;
}

.error h2 {
    color: #ff6b6b;
}

/* Table responsive */
@media (max-width: 768px) {
    .items-table,
    .movements-table {
        display: block;
        overflow-x: auto;
    }
}