:root {
    --bg-main: #F8F9FA;
    --bg-panel: #FFFFFF;
    --bg-elevated: #F1F3F5;
    --border: #DEE2E6;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --accent: #1976D2;
    --accent-hover: #1565C0;
    --success: #2E7D32;
    --warning: #ED6C02;
    --danger: #C62828;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin-bottom: 1rem; }

/* Layout */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-nav { padding: 20px 0; display: flex; flex-direction: column; }
.sidebar-nav a {
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--bg-elevated);
    border-left-color: var(--accent);
}

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; }
.top-header {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.content-wrapper { padding: 30px; flex: 1; overflow-y: auto; }

/* Components */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background-color: var(--accent); color: white; }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-secondary { background-color: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-success { background-color: var(--success); color: white; }
.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-container { background: var(--bg-panel); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.table { width: 100%; border-collapse: collapse; background: var(--bg-panel); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background-color: var(--bg-elevated); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }

.badge { padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-confirmed { background: #E8F5E9; color: var(--success); }
.badge-cancelled { background: #FFEBEE; color: var(--danger); }
.badge-completed { background: #E3F2FD; color: var(--accent); }

/* Utilities */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.p-3 { padding: 1rem; }
.flex-1 { flex: 1; }

/* Dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.kpi-card { background: var(--bg-panel); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.kpi-value { font-size: 32px; font-weight: bold; color: var(--accent); margin-top: 10px; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.dashboard-calendar { background: var(--bg-panel); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); min-height: 500px; }
.dashboard-upcoming { background: var(--bg-panel); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.upcoming-list { list-style: none; }
.upcoming-item { padding: 15px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.upcoming-item:last-child { border-bottom: none; }
.upcoming-time { font-weight: bold; color: var(--accent); width: 100px; font-size: 14px;}
.upcoming-details { flex: 1; }

/* Modal */
.modal { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: var(--bg-panel); margin: 10% auto; padding: 20px; border-radius: 8px; max-width: 500px; position: relative; }
.close { color: var(--text-secondary); float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover { color: var(--text-primary); }

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: var(--bg-main); }
.login-box { background: var(--bg-panel); padding: 40px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
.alert { padding: 10px; border-radius: 4px; margin-bottom: 15px; }
.alert-danger { background-color: #FFEBEE; color: var(--danger); border: 1px solid #FFCDD2; }
