/* =============================================
   Training Reservation — minimal clean styling
   ============================================= */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin:0; padding:0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222;
    background: #f5f7fa;
    line-height: 1.55;
}
.container { max-width: 1080px; margin: 0 auto; padding: 24px; }
.container.narrow { max-width: 640px; }

/* Header */
.site-header {
    background: linear-gradient(135deg, #1a4a7a 0%, #2b6cb0 100%);
    color: #fff;
    padding: 32px 0 24px;
}
.site-header h1 { margin: 0; font-size: 28px; font-weight: 700; }
.site-header .tagline { margin: 8px 0 0; opacity: .9; }

.admin-header { background: #1a202c; padding: 14px 0; }
.admin-header h1 { font-size: 18px; }
.admin-header-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-nav { display: flex; align-items: center; gap: 4px; }
.admin-nav a {
    color: #cbd5e0; text-decoration: none; padding: 6px 12px; border-radius: 6px;
    font-size: 14px; transition: background .15s, color .15s;
}
.admin-nav a:hover  { background: #2d3748; color: #fff; }
.admin-nav a.active { background: #2b6cb0; color: #fff; }
.admin-nav-user { color: #a0aec0; font-size: 13px; margin-left: 16px; border-left: 1px solid #4a5568; padding-left: 16px; }
.admin-nav-user a { color: #cbd5e0; text-decoration: none; }
.admin-nav-user a:hover { color: #fff; text-decoration: underline; }

.site-footer { padding: 32px 0; color: #666; font-size: 13px; text-align: center; }

/* Events grid (public) */
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 16px; }
.event-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); display: flex; flex-direction: column;
}
.event-card--full { margin-bottom: 24px; }
.event-card header { margin-bottom: 12px; }
.event-card h2, .event-card h3 { margin: 8px 0; color: #1a202c; }
.event-desc { color: #4a5568; margin: 12px 0; flex: 1; }

.event-meta { margin: 0; padding: 0; font-size: 14px; display: grid; grid-template-columns: 90px 1fr; row-gap: 4px; }
.event-meta dt { color: #718096; }
.event-meta dd { margin: 0; color: #2d3748; }

/* Badge */
.badge {
    display: inline-block; background: #e6f0fa; color: #1a4a7a;
    border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
    letter-spacing: .3px; text-transform: uppercase;
}
.badge-past { background: #edf2f7; color: #718096; }
.badge-off  { background: #fed7d7; color: #c53030; }

/* Buttons */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 8px;
    background: #e2e8f0; color: #2d3748; text-decoration: none; border: 0;
    font: inherit; font-weight: 500; cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: #cbd5e0; }
.btn-primary { background: #2b6cb0; color: #fff; }
.btn-primary:hover { background: #1a4a7a; }

/* Forms */
.form { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; margin-top: 16px; }
.form label { display: block; margin-bottom: 16px; font-weight: 500; color: #2d3748; }
.form label.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=url],
.form input[type=password], .form input[type=date], .form input[type=time], .form input[type=number],
.form textarea, .form select {
    display: block; width: 100%; padding: 9px 12px; margin-top: 6px;
    border: 1px solid #cbd5e0; border-radius: 6px; font: inherit; background: #fff;
}
.form input:focus, .form textarea:focus { outline: 2px solid #2b6cb0; outline-offset: -1px; border-color: transparent; }
.form .optional { color: #a0aec0; font-weight: 400; font-size: 13px; }
.form .required { color: #e53e3e; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }
.row-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* Alerts */
.alert { border-radius: 8px; padding: 14px 18px; margin: 16px 0; }
.alert ul { margin: 0; padding-left: 20px; }
.alert-success { background: #c6f6d5; color: #22543d; border-left: 4px solid #38a169; }
.alert-error   { background: #fed7d7; color: #742a2a; border-left: 4px solid #e53e3e; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; margin-top: 12px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 14px; }
.table th { background: #edf2f7; color: #4a5568; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.row-past { opacity: .55; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 8px; }
.muted { color: #718096; }

.link-danger { background: none; border: 0; color: #c53030; font: inherit; padding: 0; cursor: pointer; text-decoration: underline; }

.empty-state { text-align: center; padding: 48px 24px; background: #fff; border-radius: 12px; }

/* Card (used for Add registration / Add admin panels) */
.card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 20px; margin: 16px 0;
}
.card h3 { margin-top: 0; color: #2d3748; font-size: 16px; }

/* Inline forms (add registration, change password) */
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font: inherit; }
.form-inline button { white-space: nowrap; }

/* Fieldset groups in settings */
.form fieldset { border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px 20px; margin-bottom: 16px; }
.form legend    { padding: 0 8px; font-weight: 600; color: #1a4a7a; font-size: 14px; letter-spacing: .3px; text-transform: uppercase; }

.small { font-size: 13px; }

/* Floating Admin link in public footer */
.admin-link { color: #a0aec0; font-size: 12px; margin-left: 12px; text-decoration: none; }
.admin-link:hover { color: #4a5568; text-decoration: underline; }

details summary { cursor: pointer; color: #2b6cb0; font-size: 13px; }

@media (max-width: 600px) {
    .row-grid { grid-template-columns: 1fr; }
    .admin-header-row { flex-direction: column; align-items: flex-start; }
}
