:root {
--primary-color: #4f46e5; /* Indigo 600 */
--primary-hover: #4338ca; /* Indigo 700 */
--secondary-color: #10b981; /* Emerald 500 */
--secondary-hover: #059669; /* Emerald 600 */
--bg-color: #f3f4f6; /* Gray 100 */
--card-bg: #ffffff;
--text-main: #111827; /* Gray 900 */
--text-muted: #6b7280; /* Gray 500 */
--danger-color: #ef4444; /* Red 500 */
--border-radius: 12px;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
font-family: var(--font-family);
background-color: var(--bg-color);
color: var(--text-main);
margin: 0;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 {
color: var(--text-main);
margin-top: 0;
font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }

a {
color: var(--primary-color);
text-decoration: none;
transition: color 0.2s;
}

a:hover {
color: var(--primary-hover);
}

/* Layout & Components */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}

.center-screen {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 1rem;
}

.card {
background: var(--card-bg);
border-radius: var(--border-radius);
padding: 2.5rem;
box-shadow: var(--shadow);
width: 100%;
max-width: 450px;
position: relative;
border: 1px solid rgba(0,0,0,0.05);
}

.card-lg {
max-width: 900px;
}

/* Forms */
.form-group {
margin-bottom: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"] {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 1rem;
color: var(--text-main);
background-color: #fff;
transition: border-color 0.2s, box-shadow 0.2s;
box-sizing: border-box;
margin-bottom: 1rem;
}

input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
display: inline-flex;
justify-content: center;
align-items: center;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
font-size: 1rem;
text-decoration: none;
width: 100%;
box-sizing: border-box;
margin-bottom: 0.75rem;
gap: 0.5rem;
}

.btn-primary {
background-color: var(--primary-color);
color: white;
}
.btn-primary:hover {
background-color: var(--primary-hover);
transform: translateY(-1px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-secondary {
background-color: var(--secondary-color);
color: white;
}
.btn-secondary:hover {
background-color: var(--secondary-hover);
transform: translateY(-1px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-danger {
background-color: white;
color: var(--danger-color);
border: 1px solid var(--danger-color);
width: auto;
padding: 0.5rem 1rem;
font-size: 0.875rem;
}

.btn-danger:hover {
background-color: #fef2f2;
}

/* Tables */
.table-responsive {
overflow-x: auto;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
}

table {
width: 100%;
border-collapse: collapse;
background: white;
text-align: left;
}

th, td {
padding: 1rem;
border-bottom: 1px solid #e5e7eb;
}

th {
background-color: #f9fafb;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.05em;
}

tr:last-child td {
border-bottom: none;
}

tr:hover td {
background-color: #f9fafb;
}

/* Utility */
.error {
color: var(--danger-color);
background-color: #fef2f2;
padding: 0.75rem;
border-radius: 6px;
margin-bottom: 1rem;
font-size: 0.9rem;
text-align: center;
}

.logout-link {
position: absolute;
top: 1.5rem;
right: 2rem;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-muted);
}
.logout-link:hover {
color: var(--danger-color);
}

.back-link {
display: inline-block;
margin-bottom: 1.5rem;
font-weight: 500;
}

/* Accordion */
details {
background: white;
margin-bottom: 1rem;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
overflow: hidden;
border: 1px solid #e5e7eb;
}

summary {
padding: 1rem 1.5rem;
cursor: pointer;
font-weight: 600;
color: var(--text-main);
background-color: #f9fafb;
list-style: none; /* Remove default marker */
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.2s;
}

summary::-webkit-details-marker {
display: none; /* Remove default marker Chrome/Safari */
}

summary:hover {
background-color: #f3f4f6;
}

summary::after {
content: '❯'; /* Chevron icon */
font-size: 0.8rem;
transition: transform 0.2s;
color: var(--text-muted);
}

details[open] summary {
border-bottom: 1px solid #e5e7eb;
}

details[open] summary::after {
transform: rotate(90deg);
}

details .content {
padding: 0; /* content is usually a table, padding handled there */
}

details table tr:last-child td {
border-bottom: none;
}