/* Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; /* Dark Gray */
    color: #f3f4f6; /* Light Gray */
}
.card {
    background-color: #1f2937; /* Darker Gray */
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #374151;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}
.btn-secondary {
    background-color: #4b5563;
    color: white;
    border-color: #4b5563;
}
.btn-secondary:hover:not(:disabled) {
    background-color: #374151;
}
.btn-gemini {
    background: linear-gradient(to right, #4f46e5, #8b5cf6);
    color: white;
}
.btn-gemini:hover:not(:disabled) {
    opacity: 0.9;
}
.btn:active:not(:disabled) {
    transform: scale(0.98);
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="file"], select {
    background-color: #374151;
    border: 1px solid #4b5563;
    color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
}
input[type="file"]::file-selector-button {
    background-color: #4b5563;
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.75rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #374151;
}
th {
    background-color: #1f2937;
    font-weight: 600;
}
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #374151;
    color: #d1d5db;
}
.badge-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.delete-category-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    border: 2px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s, transform 0.2s;
}

.edit-mode .delete-category-btn {
    opacity: 1;
    transform: scale(1);
}
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
#analysis-result h3 { font-size: 1.125rem; font-weight: 600; color: #93c5fd; margin-top: 1rem; }
#analysis-result ul { list-style-type: disc; padding-left: 1.5rem; }
#analysis-result p { margin-bottom: 0.5rem; }
details > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.75rem;
    background-color: #374151;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}
details[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
details > div {
    padding: 0.75rem;
    border: 1px solid #374151;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Categories Overview styles */
#categories-overview-container .category-details {
    margin-bottom: 0.5rem;
}

#categories-overview-container select {
    background-color: #374151;
    border: 1px solid #4b5563;
    color: #f3f4f6;
    border-radius: 0.25rem;
    padding: 0.25rem;
    font-size: 0.75rem;
}

#categories-overview-container select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Chatbox styles */
#chat-messages {
    height: 250px;
    overflow-y: auto;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}
.chat-message {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    max-width: 80%;
}
.chat-user {
    background-color: #3b82f6;
    color: white;
    margin-left: auto;
    text-align: right;
}
.chat-model {
    background-color: #4b5563;
    color: white;
    margin-right: auto;
}
.ignored-row {
    text-decoration: line-through;
    opacity: 0.5;
}
