/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #f5f5f5; color: #333; }

/* Nav */
.admin-nav { display: flex; align-items: center; gap: 2rem; padding: 0.75rem 1.5rem; background: #1a1a2e; color: #fff; }
.nav-brand { font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.nav-links { display: flex; gap: 1rem; }
.nav-links a { color: #ccc; text-decoration: none; }
.nav-links a:hover { color: #fff; }
.admin-main { padding: 1.5rem; max-width: 1200px; margin: 0 auto; }

/* Login */
.login-container { max-width: 320px; margin: 120px auto; text-align: center; }
.login-container h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.login-input { display: block; width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.login-button { width: 100%; padding: 0.75rem; background: #1a1a2e; color: #fff; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; }
.login-button:hover { background: #2a2a4e; }
.login-error { color: #c0392b; margin-bottom: 1rem; }

/* Modal */
dialog { border: 1px solid #ddd; border-radius: 8px; padding: 1.5rem; max-width: 480px; width: 90%; }
dialog::backdrop { background: rgba(0,0,0,0.4); }
dialog h2 { margin-bottom: 1rem; }
dialog form { display: flex; flex-direction: column; gap: 0.75rem; }
dialog label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; font-weight: 500; }
dialog input, dialog select, dialog textarea { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; }
dialog .btn-row { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }

/* Buttons */
.btn { padding: 0.5rem 1rem; border: none; border-radius: 4px; cursor: pointer; font-size: 0.9rem; }
.btn-primary { background: #1a1a2e; color: #fff; }
.btn-primary:hover { background: #2a2a4e; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #e74c3c; }
.btn-secondary { background: #eee; color: #333; }
.btn-secondary:hover { background: #ddd; }

/* Calendar page layout */
.calendar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; }
.calendar-container { min-height: 600px; }
.sidebar { background: #fff; border-radius: 8px; padding: 1rem; border: 1px solid #ddd; }
.sidebar h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.recurring-list { list-style: none; }
.recurring-item { padding: 0.5rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.recurring-item:last-child { border-bottom: none; }

/* Messages page */
.messages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.phase-section { background: #fff; border-radius: 8px; padding: 1rem; border: 1px solid #ddd; }
.phase-section h2 { font-size: 1rem; margin-bottom: 0.75rem; text-transform: capitalize; }
.message-item { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.message-item input { flex: 1; padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; }

/* Skip list */
.skip-list { list-style: none; max-height: 300px; overflow-y: auto; }
.skip-item { padding: 0.4rem 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }

@media (max-width: 768px) {
    .calendar-layout { grid-template-columns: 1fr; }
    .messages-grid { grid-template-columns: 1fr; }
}
