/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
    --content-bg: #f4f7f6;
    --main-bg: #fff;
    --header-text: #34495e;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f0ad4e;
    --primary-color: #3498db;
    --light-text: #7f8c8d;
    --border-color: #ddd;
    --disabled-bg: #e0e0e0;
    --disabled-text: #9e9e9e;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--content-bg);
    color: #333;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* --- ADMIN APP LAYOUT --- */
.app-layout { display: flex; height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 20px; font-size: 1.5rem; font-weight: bold; text-align: center; color: #fff; }
.sidebar ul { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.sidebar .nav-link { display: flex; align-items: center; padding: 15px 20px; color: var(--sidebar-text); text-decoration: none; transition: background 0.2s, color 0.2s; }
.sidebar .nav-link i { font-size: 1.2rem; margin-right: 15px; width: 20px; text-align: center; }
.sidebar .nav-link.active, .sidebar .nav-link:hover { background: var(--sidebar-active); color: #fff; }
.sidebar-footer { padding: 20px; border-top: 1px solid #4a627a; }
.sidebar-footer a { color: var(--sidebar-text); text-decoration: none; display: flex; align-items: center; }
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; }
.content-header { border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; }
.content-header h1 { margin: 0; color: var(--header-text); }
.content-header p { margin: 5px 0 0; color: var(--light-text); }

/* --- PUBLIC BOOKING & LOGIN PAGES --- */
.container.public-page { max-width: 700px; margin: 40px auto; padding: 25px; background-color: var(--main-bg); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
#time-slots-container { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.time-slot { padding: 12px; border-radius: 5px; text-align: center; font-weight: bold; color: white; transition: all 0.2s ease; }
.time-slot.available { background-color: var(--success-color); cursor: pointer; }
.time-slot.available:hover { background-color: #27ae60; transform: translateY(-2px); }
.time-slot.booked { background-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; opacity: 0.8; }
.info-message { padding: 20px; background-color: #e7f3fe; border-left: 6px solid var(--primary-color); color: #333; text-align: center; font-weight: bold; border-radius: 5px; grid-column: 1 / -1; }
.loader { border: 4px solid #f3f3f3; border-radius: 50%; border-top: 4px solid var(--primary-color); width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- MODAL STYLES --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: #fefefe; margin: 10% auto; padding: 25px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 8px; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.close-button { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

/* --- FORMS & BUTTONS --- */
input[type="date"], input[type="text"], input[type="email"], input[type="password"], textarea, input[type="datetime-local"] { width: 100%; padding: 10px; margin: 8px 0 16px 0; border: 1px solid var(--border-color); border-radius: 4px; font-size: 1rem; }
button, .button { padding: 12px 18px; border: none; border-radius: 5px; cursor: pointer; background-color: var(--primary-color); color: white; font-weight: bold; font-size: 1rem; width: 100%; margin-bottom: 10px; }
.button-group { display: flex; gap: 10px; } .button-group button { width: 100%; }
.btn-confirm { background-color: var(--success-color); }
.btn-cancel { background-color: var(--danger-color); }
.btn-propose { background-color: var(--warning-color); }
.btn-join { display: flex; align-items: center; justify-content: center; text-decoration: none; } .btn-join i { margin-right: 8px; }
.hidden { display: none; }
.copy-container { display: flex; }
#copy-link-btn { width: auto; margin-left: 10px; }