* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --text-main: #333;
    --text-light: #555;
    --bg-light: #ffffff;
    --bg-body: #f7f7f7;
    --border-color: #eee;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.08);
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --success-bg: #d4edda;
    --success-text: #155724;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-subtle);
    width: 100%;
    padding: 2.5rem;
}

.auth-container {
    max-width: 400px;
}

.dashboard-container {
    max-width: 700px;
}

/* --- Headings & Typography --- */
.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
    font-size: 1.75rem;
    font-weight: 600;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* --- Buttons --- */
.submit-button {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-bottom: 1rem;
}

.submit-button:hover {
    background-color: var(--primary-dark);
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.toggle-button {
    width: 100%;
    padding: 0.5rem;
    background-color: transparent;
    color: var(--primary);
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.toggle-button:hover {
    text-decoration: underline;
}

/* --- Dashboard --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.logout-button {
    padding: 0.6rem 1.2rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background: #c82333;
}

/* --- Session List (Appealing & Clean) --- */
.sessions-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.session-item {
    padding: 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.session-details {
    flex-grow: 1;
    margin-right: 20px;
}

.session-details strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.session-details small {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.revoke-btn {
    background: #f8f9fa;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.revoke-btn:hover {
    background: #dc3545;
    color: white;
}

.revoke-btn:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #6c757d;
    cursor: not-allowed;
}

/* --- Messages & Loading --- */
.error-message {
    background-color: var(--error-bg);
    color: var(--error-text);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: var(--success-bg);
    color: var(--success-text);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.loading-text {
    font-style: italic;
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
}