/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    transition: background-color 0.3s ease;
}

/* Main Content Area */

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #bb86fc; /* Light Purple for dark theme */
}

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

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    background-color: #7b1fa2; /* Medium Purple */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #4a148c; /* Dark Purple */
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Forms */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    background-color: #252525;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

th {
    background-color: #1f1f1f;
    font-weight: bold;
    color: #bb86fc;
}

tbody tr:hover {
    background-color: #2a2a2a;
}

/* Stat Cards */
.stat-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #aaa;
}

.stat-card .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0 0 0;
    color: #bb86fc;
}

/* Auth Page Styles */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #121212;
}

.auth-card {
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 20px;
}

.auth-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #bbb;
}

.auth-card .btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
}

.auth-card .error {
    color: #ffacac; /* Lighter red for text */
    background-color: #5c1f1f; /* Dark red background */
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #a83a3a;
}

/* Ticket List Styles */
.ticket-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto; /* 'auto' for horizontal centering */
    max-width: 900px; /* Adjust as needed */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ticket-card header h2 {
    margin-top: 0;
}

.ticket-card header p {
    color: #aaa;
    font-size: 0.9em;
}

.ticket-card .ticket-user {
    font-weight: bold;
    color: #ddd;
}

.ticket-card details {
    margin-top: 15px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.ticket-card summary {
    cursor: pointer;
    font-weight: bold;
    color: #bb86fc;
}

.ticket-transcript {
    background-color: #101010; /* Even darker for contrast */
    border: 1px solid #2c2c2c;
    border-radius: 5px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #ccc;
    margin-top: 10px;
    max-height: 400px; /* Limit height and make it scrollable */
    overflow-y: auto;
}

/* Ticket Filter Form */
.ticket-filter {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-filter .filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ticket-filter input[type="text"] {
    margin: 0;
    flex-grow: 1;
}

/* Page-specific heading styles */
.centered-heading {
    text-align: center;
}