* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1a73e8; --primary-dark: #1557b0; --success: #0f9d58;
  --warning: #f4b400; --danger: #db4437; --bg: #f0f2f5; --card: #fff;
  --text: #202124; --text-secondary: #5f6368; --border: #dadce0;
  --shadow: 0 1px 3px rgba(0,0,0,0.12);
}
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { text-decoration: none; color: var(--primary); }
button { cursor: pointer; border: none; padding: 8px 20px; border-radius: 6px; font-size: 14px; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
input, select, textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; width: 100%; outline: none; transition: border 0.2s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.card { background: var(--card); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; gap: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-success { background: #e6f4ea; color: var(--success); }
.badge-warning { background: #fef7e0; color: var(--warning); }
.badge-danger { background: #fce8e6; color: var(--danger); }
.badge-info { background: #e8f0fe; color: var(--primary); }
.badge-secondary { background: #f1f3f4; color: var(--text-secondary); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8f9fa; font-weight: 600; color: var(--text-secondary); font-size: 13px; text-transform: uppercase; }
tr:hover { background: #f8f9fa; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 32px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toast { position: fixed; bottom: 24px; right: 24px; padding: 16px 24px; border-radius: 8px; color: #fff; font-weight: 500; z-index: 2000; animation: slideIn 0.3s ease; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state h3 { margin-bottom: 8px; }
.hidden { display: none !important; }
/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--card); border-right: 1px solid var(--border); padding: 20px; flex-shrink: 0; overflow-y: auto; }
.sidebar .logo { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 30px; display: flex; align-items: center; gap: 10px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { padding: 10px 14px; border-radius: 8px; color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.sidebar nav a:hover, .sidebar nav a.active { background: #e8f0fe; color: var(--primary); }
.sidebar nav a .icon { width: 20px; text-align: center; font-size: 16px; }
.main-content { flex: 1; padding: 24px; overflow-y: auto; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.main-header h1 { font-size: 24px; }
.user-info { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
/* Stats cards */
.stat-card { padding: 20px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { color: var(--text-secondary); font-size: 14px; }
/* Auth */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%); }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 420px; max-width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-card h1 { text-align: center; color: var(--primary); margin-bottom: 8px; }
.auth-card p.text-center { color: var(--text-secondary); margin-bottom: 24px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .btn-primary { width: 100%; padding: 12px; font-size: 16px; margin-top: 8px; }
.auth-card .auth-footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 60px; padding: 12px; }
  .sidebar .logo span { display: none; }
  .sidebar nav a span { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main-content { padding: 16px; }
}
/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--text-secondary); font-weight: 500; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
/* Calendar grid */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-header { text-align: center; padding: 8px; font-weight: 600; background: #f8f9fa; border-radius: 6px; }
.calendar-day { text-align: center; padding: 12px 4px; border-radius: 6px; cursor: pointer; min-height: 80px; background: #fff; border: 1px solid var(--border); }
.calendar-day:hover { background: #e8f0fe; }
.calendar-day .day-number { font-weight: 600; margin-bottom: 4px; }
.calendar-day .booking-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin: 2px auto; }
.calendar-day.today { border-color: var(--primary); background: #e8f0fe; }
/* Forum */
.forum-post { padding: 16px; border-bottom: 1px solid var(--border); }
.forum-post:last-child { border-bottom: none; }
.forum-post h3 { margin-bottom: 4px; }
.forum-post .meta { font-size: 12px; color: var(--text-secondary); }
.forum-post .actions { margin-top: 8px; display: flex; gap: 12px; }
/* Chat */
.chat-container { display: flex; flex-direction: column; height: 500px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.chat-message.sent { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-message.received { align-self: flex-start; background: #f1f3f4; border-bottom-left-radius: 4px; }
.chat-message .sender { font-size: 11px; font-weight: 600; margin-bottom: 2px; opacity: 0.8; }
.chat-message .time { font-size: 10px; opacity: 0.7; margin-top: 4px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; }
/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }
