:root {
    /* Dark Theme Palette */
    --primary-color: #c084fc;
    /* Purple-400 */
    --primary-hover: #a855f7;
    /* Purple-500 */
    --background-color: #111827;
    /* Gray-900 */
    --card-bg: #1f2937;
    /* Gray-800 */
    --text-color: #f3f4f6;
    /* Gray-100 */
    --text-muted: #9ca3af;
    /* Gray-400 */
    --border-color: #374151;
    /* Gray-700 */
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);

    --error-color: #ef4444;
    --error-bg: #450a0a;
    --success-color: #34d399;
    --success-bg: #064e3b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top center, #1f2937 0%, #111827 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Utilities */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* Navbar */
.navbar {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

/* Components */
.card {
    background: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(16px);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-container .card {
    max-width: 400px;
    text-align: center;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(17, 24, 39, 0.5);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2);
    background-color: rgba(17, 24, 39, 0.8);
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #111827;
    /* Dark text on bright button for contrast */
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(168, 85, 247, 0.2);
}

.primary-btn:hover {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.secondary-btn {
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Messages */
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.message.error {
    background-color: rgba(69, 10, 10, 0.5);
    color: #fca5a5;
    border: 1px solid var(--error-color);
}

.message.success {
    background-color: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
    border: 1px solid var(--success-color);
}

.hidden {
    display: none !important;
}

/* Links */
a {
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

.admin-link {
    margin-top: 2rem;
    text-align: center;
}

.admin-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.admin-link a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Slots Grid */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.slot {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    cursor: pointer;
    background: rgba(31, 41, 55, 0.4);
    color: var(--text-color);
    transition: all 0.2s;
}

.slot:hover:not(.disabled) {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: rgba(45, 55, 72, 0.6);
}

.slot.disabled {
    cursor: not-allowed;
    background-color: rgba(31, 41, 55, 0.2);
    color: #4b5563;
    border-color: #374151;
    /* Darker border */
    opacity: 0.7;
}

.slot.booked {
    background-color: rgba(69, 10, 10, 0.3);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    cursor: default;
}

.slot.user-booked {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(192, 132, 252, 0.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal-content {
    max-width: 500px;
    text-align: left;
    background: #1f2937;
    border: 1px solid var(--border-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-actions button {
    flex: 1;
}

/* Admin Specific Styles */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.booking-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(31, 41, 55, 0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: var(--text-color);
}

.booking-table th,
.booking-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.booking-table th {
    background-color: rgba(255, 255, 255, 0.05);
    /* Slight highlight */
    font-weight: 600;
    color: var(--primary-color);
}

.booking-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.action-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    margin-right: 0.25rem;
    font-weight: 500;
}

.btn-delete {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.4);
}

.btn-block {
    background-color: var(--border-color);
    color: var(--text-color);
}

.btn-block:hover {
    background-color: #4b5563;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(31, 41, 55, 0.5);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.controls label {
    font-weight: 600;
}

.controls input {
    margin-bottom: 0;
    width: auto;
    background-color: rgba(17, 24, 39, 0.5);
}

/* Scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Reason Text in Slots */
.reason-text {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-credit {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}