/* Running Dinner – Organiser Portal Styles */

/* ── Auth page ──────────────────────────────────────────────────────────── */
.rd-org-auth { max-width: 480px; margin: 0 auto; padding: 0 16px 60px; }

.rd-org-auth-hero {
    background: linear-gradient(135deg, #e85d04 0%, #c44b02 50%, #2d6a4f 100%);
    border-radius: 18px;
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 32px;
    color: #fff;
}
.rd-org-logo { font-size: 56px; margin-bottom: 12px; }
.rd-org-auth-hero h1 {
    font-family: var(--rd-font-head);
    font-size: 32px;
    margin: 0 0 6px;
    color: #fff;
}
.rd-org-auth-hero p { margin: 0; opacity: .85; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }

.rd-org-panel {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: var(--rd-radius);
    box-shadow: var(--rd-shadow);
    padding: 32px;
    animation: rd-slide-up .35s ease both;
}
.rd-org-panel h2 {
    font-family: var(--rd-font-head);
    font-size: 22px;
    margin: 0 0 24px;
}
.rd-org-auth-switch { text-align: center; font-size: 14px; margin-top: 20px; color: var(--rd-muted); }
.rd-org-auth-switch a { color: var(--rd-primary); text-decoration: none; font-weight: 600; }

/* ── Portal layout ──────────────────────────────────────────────────────── */
.rd-org-portal {
    max-width: 100%;
    padding: 0;
    font-family: var(--rd-font-body);
}

.rd-org-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--rd-text);
    color: #fff;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 12px 12px 0 0;
}
.rd-org-nav-brand { font-family: var(--rd-font-head); font-size: 18px; font-weight: 700; }
.rd-org-nav-right { display: flex; align-items: center; gap: 14px; }
.rd-org-nav-user { font-size: 13px; opacity: .75; }
.rd-org-nav .rd-btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); font-size: 13px; padding: 6px 14px; }
.rd-org-nav .rd-btn-ghost:hover { border-color: #fff; color: #fff; }

.rd-org-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 600px;
    border: 1px solid var(--rd-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}
@media (max-width: 720px) { .rd-org-body { grid-template-columns: 1fr; } }

/* ── Sidebar ── */
.rd-org-sidebar {
    background: #f7f4f0;
    border-right: 1px solid var(--rd-border);
    padding: 20px 0;
}
.rd-org-sidebar-section { padding: 0 16px 20px; border-bottom: 1px solid var(--rd-border); margin-bottom: 16px; }
.rd-org-sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }
.rd-org-sidebar-heading { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--rd-muted); margin-bottom: 10px; }
.rd-org-sidebar-empty { font-size: 13px; color: var(--rd-muted); }

.rd-org-event-list { list-style: none; padding: 0; margin: 0; }
.rd-org-event-list li { border-radius: 8px; margin-bottom: 4px; }
.rd-org-event-list li.active { background: rgba(232,93,4,.10); }
.rd-org-event-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--rd-text);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s;
}
.rd-org-event-link:hover { background: rgba(232,93,4,.07); }
.rd-org-event-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Main ── */
.rd-org-main { padding: 28px; overflow-y: auto; }

/* ── Event header ── */
.rd-org-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.rd-org-event-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-org-event-header-actions { display: flex; gap: 8px; }
.rd-org-event-title { font-family: var(--rd-font-head); font-size: 26px; margin: 0; }
.rd-org-theme-tag { font-size: 13px; color: var(--rd-muted); }

/* ── Stats ── */
.rd-org-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 600px) { .rd-org-stats { grid-template-columns: repeat(2,1fr); } }
.rd-org-stat {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.rd-org-stat-value { font-size: 28px; font-weight: 700; color: var(--rd-primary); font-family: var(--rd-font-head); }
.rd-org-stat-label { font-size: 12px; color: var(--rd-muted); margin-top: 2px; }

/* ── Reg link box ── */
.rd-org-reg-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8f4;
    border: 1px solid #fcdcc9;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rd-org-reg-link-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.rd-org-reg-link-input {
    flex: 1;
    min-width: 180px;
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--rd-border);
    border-radius: 6px;
    background: #fff;
    color: var(--rd-text);
}

/* ── Tabs ── */
.rd-org-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--rd-border); margin-bottom: 20px; }
.rd-org-tab {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    font-size: 14px;
    color: var(--rd-muted);
    cursor: pointer;
    transition: all .15s;
    font-family: var(--rd-font-body);
}
.rd-org-tab:hover, .rd-org-tab.active { color: var(--rd-primary); border-bottom-color: var(--rd-primary); }
.rd-org-tab-panel { display: none; }
.rd-org-tab-panel.active { display: block; }
.rd-org-tab-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.rd-tab-hint { font-size: 13px; }

/* ── Teams ── */
.rd-org-team-card {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}
.rd-org-team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 18px;
    background: #f7fafc;
    border-bottom: 1px solid var(--rd-border);
    flex-wrap: wrap;
    gap: 8px;
}
.rd-org-team-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-org-team-name { font-weight: 700; font-size: 15px; }
.rd-org-team-address { font-size: 12px; color: var(--rd-muted); margin-top: 2px; }
.rd-org-team-token { font-size: 12px; color: var(--rd-muted); }
.rd-org-team-token code { background: var(--rd-border); padding: 2px 6px; border-radius: 4px; }

.rd-org-participants-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rd-org-participants-table th { padding: 8px 14px; text-align: left; font-weight: 600; color: var(--rd-muted); border-bottom: 1px solid var(--rd-border); }
.rd-org-participants-table td { padding: 8px 14px; border-bottom: 1px solid #f5f0eb; vertical-align: middle; }
.rd-org-participants-table tr:last-child td { border-bottom: none; }
.rd-org-participants-table select { font-size: 12px; padding: 3px 7px; border: 1px solid var(--rd-border); border-radius: 4px; font-family: var(--rd-font-body); }

.rd-org-add-row { padding: 10px 14px; background: #fafafa; }
.rd-org-add-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rd-org-add-fields input { flex: 1; min-width: 120px; padding: 6px 10px; border: 1.5px solid var(--rd-border); border-radius: 6px; font-size: 13px; font-family: var(--rd-font-body); }

.rd-org-loading { color: var(--rd-muted); padding: 20px; text-align: center; font-size: 14px; }

/* ── Schedule ── */
.rd-org-schedule-course { margin-bottom: 24px; }
.rd-org-schedule-course h4 { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.rd-org-schedule-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rd-org-schedule-card { background: var(--rd-surface); border: 1px solid var(--rd-border); border-radius: 10px; padding: 12px 14px; }
.rd-org-schedule-host { font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.rd-org-schedule-addr { font-size: 11px; color: var(--rd-muted); margin-bottom: 6px; }
.rd-org-schedule-guests { font-size: 12px; }

/* ── Send panel ── */
.rd-org-send-panel {
    margin-top: 24px;
    background: #f7fafc;
    border: 1px solid var(--rd-border);
    border-radius: 12px;
    padding: 24px;
}
.rd-org-send-panel h3 { margin: 0 0 8px; font-size: 16px; }
.rd-org-send-panel .rd-field input,
.rd-org-send-panel .rd-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--rd-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--rd-font-body);
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
}
.rd-org-send-panel .rd-field input:focus,
.rd-org-send-panel .rd-field textarea:focus { outline: none; border-color: var(--rd-primary); }
.rd-org-send-panel .rd-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.rd-org-send-panel .rd-field { margin-bottom: 14px; }

/* ── Notifications ── */
.rd-org-notif-list { display: flex; flex-direction: column; gap: 10px; }
.rd-org-notif-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 8px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.rd-org-notif-actions { display: flex; gap: 8px; align-items: center; }
.rd-org-notif-actions input[type=time] { padding: 6px 10px; border: 1.5px solid var(--rd-border); border-radius: 6px; font-size: 14px; font-family: var(--rd-font-body); }

/* ── Modal ── */
.rd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rd-modal {
    background: var(--rd-surface);
    border-radius: 16px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: rd-slide-up .25s ease;
}
.rd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--rd-border);
    position: sticky;
    top: 0;
    background: var(--rd-surface);
    z-index: 1;
}
.rd-modal-header h3 { margin: 0; font-family: var(--rd-font-head); font-size: 20px; }
.rd-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--rd-muted); line-height: 1; padding: 4px 8px; }
.rd-modal-close:hover { color: var(--rd-text); }
.rd-modal-body { padding: 28px; }

/* ── Event form inside modal ── */
.rd-org-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 600px) { .rd-org-form-grid { grid-template-columns: 1fr; } }
.rd-org-form-grid .rd-field input,
.rd-org-form-grid .rd-field textarea,
.rd-org-form-grid .rd-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--rd-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--rd-font-body);
    background: var(--rd-bg);
    transition: border-color .15s;
    box-sizing: border-box;
}
.rd-org-form-grid .rd-field input:focus,
.rd-org-form-grid .rd-field textarea:focus,
.rd-org-form-grid .rd-field select:focus { outline: none; border-color: var(--rd-primary); background: #fff; }
.rd-org-form-grid .rd-field { margin-bottom: 14px; }
.rd-org-form-grid .rd-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.rd-org-form-grid .rd-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rd-org-form-grid .rd-field-row .rd-field { margin-bottom: 0; }

.rd-org-courses-section { margin-bottom: 20px; }
.rd-org-courses-section h4 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.rd-org-courses-section .rd-course-row input { padding: 7px 10px; border: 1.5px solid var(--rd-border); border-radius: 6px; font-size: 13px; font-family: var(--rd-font-body); }
.rd-org-form-actions { display: flex; gap: 10px; padding-top: 8px; }

/* ── Utilities ── */
.rd-hidden { display: none !important; }
.rd-org-welcome { display: flex; align-items: center; justify-content: center; min-height: 400px; }
.rd-org-empty-schedule { padding: 30px 0; }
