/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Base branding colors - Black & White */
    --primary: #1a1a1a;
    --primary-light: #333333;
    --primary-dark: #000000;
    --secondary: #ffffff;
    
    /* Agoura region - Red */
    --agoura-primary: #C62828;
    --agoura-light-bg: #FFEBEE;
    --agoura-dark: #B71C1C;
    
    /* Pali region - Gold */
    --pali-primary: #F9A825;
    --pali-light-bg: #FFF8E1;
    --pali-dark: #F57F17;
    
    /* Neutral/Default */
    --neutral: #333333;
    
    /* Text and UI */
    --text-primary: #212121;
    --text-secondary: #757575;
    --background: #FAFAFA;
    --card-bg: #ffffff;
    --border: #E0E0E0;
    --error: #d32f2f;
    --success: #4CAF50;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

/* Region-based color system */
[data-region="agoura"] {
    --region-color: var(--agoura-primary);
    --region-bg: var(--agoura-light-bg);
    --region-dark: var(--agoura-dark);
}

[data-region="pali"] {
    --region-color: var(--pali-primary);
    --region-bg: var(--pali-light-bg);
    --region-dark: var(--pali-dark);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Auth Screen */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    color: #1a1a1a;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.logo p {
    color: var(--text-secondary);
}

.auth-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #1a1a1a;
}

#google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

#google-signin-btn:hover {
    background: var(--background);
    box-shadow: var(--shadow);
}

.google-icon {
    width: 20px;
    height: 20px;
}

#display-name-form {
    margin-top: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    background: #333333;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

/* App Layout */
#app-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    background: white;
    color: var(--text-primary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Content Area */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Home View */
.home-section {
    margin-bottom: 1.5rem;
}

.home-section h2 {
    padding: 1rem 1rem 0.5rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.notice-card {
    background: #f5f5f5;
    border-left: 4px solid #1a1a1a;
    margin: 0 1rem 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.875rem;
}

.notice-content {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.quick-link-card {
    background: var(--card-bg);
    margin: 0 1rem 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.quick-link-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.quick-link-title {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-link-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-card {
    background: var(--card-bg);
    margin: 0 1rem 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 2rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Posts (Feed) */
.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 1rem 1rem;
    box-shadow: var(--shadow);
}

.post-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.post-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.post-content {
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
    line-height: 1.5;
}

.post-content.collapsed {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.view-more {
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.post-media {
    margin-bottom: 0.75rem;
}

.post-media img {
    width: 100%;
    border-radius: 8px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.post-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--background);
    color: #1a1a1a;
}

.action-btn.active {
    color: #1a1a1a;
}

.post-comments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.comment {
    padding: 0.5rem 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.comment-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 100;
}

.fab:hover {
    background: #333333;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.fab:active {
    transform: scale(0.95);
}

/* Calendar View */
.calendar-container {
    padding: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-month {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-grid {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
}

.calendar-day.other-month {
    color: var(--text-secondary);
    opacity: 0.5;
}

.calendar-day.today {
    background: #1a1a1a;
    color: white;
    font-weight: 600;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #333333;
}

.calendar-day.has-event.event-agoura::after {
    background: var(--agoura-primary);
}

.calendar-day.has-event.event-pali::after {
    background: var(--pali-primary);
}

.calendar-day.today.has-event::after {
    background: white;
}

.events-list-section h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 1.5rem 0 0.75rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.event-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-location {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-location a {
    color: var(--primary);
    text-decoration: none;
}

.event-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.event-tag {
    background: var(--background);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Region-colored event tags */
.event-tag[data-region="agoura"],
.event-tag.region-agoura {
    background: var(--agoura-light-bg);
    color: var(--agoura-dark);
    border: 1px solid var(--agoura-primary);
}

.event-tag[data-region="pali"],
.event-tag.region-pali {
    background: var(--pali-light-bg);
    color: var(--pali-dark);
    border: 1px solid var(--pali-primary);
}

.rsvp-section {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
}

.rsvp-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rsvp-btn {
    flex: 1;
    padding: 0.625rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.rsvp-btn:hover {
    background: var(--background);
}

.rsvp-btn.active {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

.rsvp-details {
    font-size: 0.875rem;
}

.rsvp-group {
    margin-bottom: 0.5rem;
}

.rsvp-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rsvp-names {
    color: var(--text-secondary);
    line-height: 1.4;
}

.not-responded {
    color: var(--text-secondary);
    font-style: italic;
}

.event-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.btn-calendar {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Profile */
.profile-content {
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.profile-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #333333;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profile-role {
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.profile-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.profile-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-option:last-child {
    border-bottom: none;
}

.profile-option label {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.profile-option input[type="checkbox"] {
    width: 48px;
    height: 24px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-item.active {
    color: #1a1a1a;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal.hidden {
    display: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 1rem;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.modal-body textarea {
    min-height: 100px;
    resize: vertical;
}

/* Utility */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (min-width: 768px) {
    .app-content {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .calendar-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #1a1a1a;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Schedule View */
.schedule-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.week-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.week-nav-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.week-nav-btn:hover {
    background: #333333;
}

#week-display {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.schedule-content {
    padding: 1rem;
}

/* Schedule Day Card */
.schedule-day-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.schedule-day-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.schedule-shift {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid #333333;
}

/* Region-colored schedule shifts */
.schedule-shift[data-region="agoura"] {
    border-left-color: var(--agoura-primary);
    background: var(--agoura-light-bg);
}

.schedule-shift[data-region="pali"] {
    border-left-color: var(--pali-primary);
    background: var(--pali-light-bg);
}

.schedule-shift:last-child {
    margin-bottom: 0;
}

.shift-time {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.shift-field {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.shift-notes {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.shift-notes.highlighted {
    color: var(--error);
    font-weight: 600;
    font-style: normal;
}

/* Full Schedule View */
.schedule-region {
    margin-bottom: 1.5rem;
}

.region-header {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    color: white;
    border-radius: 6px;
}

.region-header.agoura {
    background: var(--agoura-primary);
}

.region-header.pali {
    background: var(--pali-primary);
}

.full-schedule-shift {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.coach-name {
    font-weight: 700;
    color: var(--text-primary);
}

.shift-details {
    color: var(--text-secondary);
}

.empty-schedule {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-schedule-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Admin Schedule Builder */
#admin-schedule-builder {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    background: var(--background);
    z-index: 1000;
    overflow-y: auto;
    padding: 1rem;
}

.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.builder-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
}

.builder-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.builder-actions button {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9rem;
}

#schedule-builder-content {
    margin-top: 1rem;
}

.builder-day-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.builder-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.builder-day-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.add-shift-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.add-shift-btn:hover {
    background: #333333;
}

.builder-shift {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid #333333;
    cursor: pointer;
    transition: background 0.2s;
}

.builder-shift:hover {
    background: #f0f0f0;
}

.builder-shift:last-child {
    margin-bottom: 0;
}

.builder-shift-summary {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Modal enhancements for schedule */
#shift-modal label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

#shift-modal select,
#shift-modal input[type="time"],
#shift-modal input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

#shift-modal select:focus,
#shift-modal input:focus {
    outline: none;
    border-color: #1a1a1a;
}

/* ========================================
   DETAILED SCHEDULE TABLE STYLES
   ======================================== */

/* Group shift table - the real spreadsheet view */
.group-shift-table {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.group-shift-row {
    display: grid;
    grid-template-columns: 90px 1fr 32px;
    gap: 0;
    align-items: center;
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border);
}

/* 4-column row (with coach column) for full schedule */
.group-shift-row.has-coach,
#demo-full-schedule .group-shift-row {
    grid-template-columns: 90px 1fr 32px 60px;
}

.group-shift-row:last-child {
    border-bottom: none;
}

.group-shift-row.header-row {
    background: #f5f5f5;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.group-shift-row[data-region="agoura"] {
    background: #fffaf9;
    border-left: 3px solid var(--agoura-primary);
}

.group-shift-row[data-region="pali"] {
    background: #fffdf4;
    border-left: 3px solid var(--pali-primary);
}

/* Alternating subtle shading for rows */
.group-shift-row:not(.header-row):nth-child(even) {
    background: #fafafa;
}
.group-shift-row[data-region="agoura"]:not(.header-row):nth-child(even) {
    background: var(--agoura-light-bg);
}
.group-shift-row[data-region="pali"]:not(.header-row):nth-child(even) {
    background: var(--pali-light-bg);
}

.group-shift-row.highlighted-row {
    background: #fff5f5;
    padding: 0.4rem 0.625rem;
}

.gsr-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.group-shift-row.header-row .gsr-time {
    color: var(--text-secondary);
}

.gsr-group {
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.gsr-players {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.gsr-coach {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

/* Birth years label */
.birth-years {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
}

/* Sub-field badge */
.sub-field-badge {
    display: inline-block;
    background: #e8e8e8;
    color: #555;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Region block (colored header + table) */
.region-block {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.region-block-header {
    padding: 0.5rem 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.region-block-header.agoura {
    background: var(--agoura-primary);
    color: white;
}

.region-block-header.pali {
    background: var(--pali-primary);
    color: #1a1a1a;
}

.region-block .group-shift-table {
    border: none;
    border-radius: 0;
    margin-top: 0;
}

/* My Schedule banner */
.my-schedule-banner {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Bottom nav adjustment for 5 tabs */
.bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.nav-item {
    padding: 0.5rem;
}

.nav-label {
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 800px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ========================================
   CHANNELS FEATURE
   ======================================== */

/* Posts sub-toggle (Feed | Channels) */
.posts-sub-toggle {
    display: flex;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sub-toggle-btn {
    flex: 1;
    padding: 0.625rem;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-toggle-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.sub-toggle-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.sub-toggle-btn.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

/* Channel List */
.channels-list {
    padding: 1rem;
}

.channel-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 0.5rem 0 0.4rem;
    margin-top: 0.25rem;
}

.channel-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.625rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #1a1a1a;
}

.channel-card.region-agoura { border-left-color: var(--agoura-primary); }
.channel-card.region-pali   { border-left-color: var(--pali-primary); }

.channel-card.region-staff {
    background: #1a1a1a;
    border-left-color: #444;
}

.channel-card.region-staff .channel-card-name    { color: white; }
.channel-card.region-staff .channel-card-preview,
.channel-card.region-staff .channel-card-time    { color: rgba(255,255,255,0.6); }

.channel-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.channel-card-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.channel-card-info {
    flex: 1;
    min-width: 0;
}

.channel-card-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.channel-card-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.channel-card-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.unread-badge {
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
}

/* Channel Detail Header */
.channel-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-bottom: 3px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.channel-detail-header.region-agoura { border-bottom-color: var(--agoura-primary); }
.channel-detail-header.region-pali   { border-bottom-color: var(--pali-primary); }
.channel-detail-header.region-staff  { border-bottom-color: #333; }

.channel-back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.channel-header-info { flex: 1; }

.channel-header-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.channel-header-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Channel Messages (chat-style, oldest at top → newest at bottom) */
.channel-messages-list {
    padding: 1rem 1rem 90px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.channel-message {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.channel-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #555;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.channel-message-avatar.admin { background: var(--agoura-primary); }

.channel-message-body {
    flex: 1;
    background: var(--card-bg);
    border-radius: 0 10px 10px 10px;
    padding: 0.625rem 0.75rem;
    box-shadow: var(--shadow);
}

.channel-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.channel-message-author {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.channel-message-author.admin { color: var(--agoura-dark); }

.channel-message-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.channel-message-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.channel-message-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    max-height: 200px;
    object-fit: cover;
}

.channel-message-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.channel-message-views {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.channel-shout-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.channel-shout-btn.active {
    background: #fff3e0;
    border-color: var(--pali-primary);
    color: var(--pali-dark);
}

.channel-comment-toggle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Comments thread */
.channel-message-comments {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.channel-comment {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

.channel-comment:last-of-type { border-bottom: none; }

.channel-comment-author {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-primary);
}

.channel-comment-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.channel-comment-input {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.channel-comment-input input {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 0.83rem;
    background: var(--background);
    font-family: inherit;
}

.channel-comment-input button {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.83rem;
    cursor: pointer;
}

/* Fixed Compose Bar (shown inside channel) */
.channel-compose {
    position: fixed;
    bottom: 68px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 0.625rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 50;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.channel-compose-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.95rem;
    background: var(--background);
    outline: none;
    font-family: inherit;
}

.channel-compose-input:focus { border-color: #1a1a1a; }

.channel-compose-attach {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    line-height: 1;
}

.channel-compose-send {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Admin: Multi-Channel Post Modal (bottom sheet) */
.multi-channel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
    display: none;
}

.multi-channel-overlay.open { display: block; }

.multi-channel-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 20px 20px 0 0;
    padding: 1.25rem;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.multi-channel-modal.open { transform: translateY(0); }

.multi-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.multi-channel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.channel-quick-select {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.channel-quick-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: white;
    transition: all 0.15s;
}

.channel-quick-btn:hover { background: var(--background); }
.channel-quick-btn.agoura { border-color: var(--agoura-primary); color: var(--agoura-dark); }
.channel-quick-btn.pali   { border-color: var(--pali-primary); color: var(--pali-dark); }
.channel-quick-btn.all    { border-color: #444; color: #333; }

.channel-check-group { margin-bottom: 0.75rem; }

.channel-check-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    display: block;
}

.channel-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.channel-checkbox-item:hover { background: var(--background); }

.channel-checkbox-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #1a1a1a;
    flex-shrink: 0;
}

.channel-checkbox-name { font-size: 0.88rem; color: var(--text-primary); }

.multi-channel-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    min-height: 80px;
    resize: none;
    font-family: inherit;
    margin: 0.75rem 0;
}

.multi-channel-send-btn {
    width: 100%;
    padding: 0.875rem;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   RESOURCES - SESSION PLANS FOLDER TREE
   ======================================== */

.folder-tree {
    margin: 0 1rem 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

/* Region group (Agoura / Pali) */
.folder-region {
    overflow: hidden;
}

.folder-region + .folder-region {
    border-top: 2px solid var(--border);
}

.folder-region-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s;
    border: none;
    width: 100%;
    text-align: left;
}

.folder-region-header.agoura {
    background: var(--agoura-primary);
    color: white;
}

.folder-region-header.pali {
    background: var(--pali-primary);
    color: #1a1a1a;
}

.folder-region-header:active {
    opacity: 0.85;
}

.folder-region-header .region-chevron {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.75rem;
}

.folder-region.open .folder-region-header .region-chevron {
    transform: rotate(90deg);
}

.folder-region-children {
    display: none;
    background: var(--card-bg);
}

.folder-region.open .folder-region-children {
    display: block;
}

/* Individual folder item */
.folder-item {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.folder-item:last-child {
    border-bottom: none;
}

.folder-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.folder-item-header:hover {
    background: var(--background);
}

.folder-item-header .folder-icon {
    font-size: 1.05rem;
}

.folder-item-header .folder-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.folder-item-header .folder-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--background);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.folder-item-header .folder-chevron {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
    margin-left: 0.25rem;
}

.folder-item.open .folder-item-header .folder-chevron {
    transform: rotate(90deg);
}

.folder-item-children {
    display: none;
    background: #fafafa;
    border-top: 1px solid var(--border);
}

.folder-item.open .folder-item-children {
    display: block;
}

/* Resource link inside a folder */
.resource-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.resource-link:last-child {
    border-bottom: none;
}

.resource-link:hover {
    background: var(--background);
}

.resource-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.resource-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.resource-ext {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--border);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.resource-arrow {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========================================
   DRILL LIBRARY
   ======================================== */

.drill-library-card {
    margin: 0 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: var(--card-bg);
    overflow: hidden;
}

.drill-library-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.drill-library-trigger:hover {
    background: var(--background);
}

.drill-trigger-icon {
    font-size: 2rem;
}

.drill-trigger-text {
    flex: 1;
}

.drill-trigger-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.drill-trigger-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.drill-trigger-arrow {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.drill-library-card.open .drill-trigger-arrow {
    transform: rotate(90deg);
}

/* Drill Search Panel */
.drill-search-panel {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.drill-search-panel.open {
    display: block;
}

.drill-step-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.15s;
    gap: 0.3rem;
    text-align: center;
}

.topic-card:hover {
    border-color: #555;
    background: var(--background);
}

.topic-card.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

.topic-emoji {
    font-size: 1.4rem;
    line-height: 1;
}

.topic-name {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Age Group Buttons */
.age-group-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.age-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.age-btn:hover {
    border-color: #555;
}

.age-btn.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

/* No-results message */
.drill-no-results {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Drill Results */
.drill-results {
    display: none;
}

.drill-results.visible {
    display: block;
}

.drill-results-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.drill-card {
    background: var(--background);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.drill-card:last-child {
    margin-bottom: 0;
}

.drill-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.drill-topic-badge {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 0.1rem;
}

.drill-card-info {
    flex: 1;
}

.drill-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.drill-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.drill-duration,
.drill-age-tag {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
}

.drill-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    line-height: 1.5;
}

.drill-coaching-points {
    margin-bottom: 0.625rem;
}

.drill-coaching-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.04em;
}

.drill-coaching-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drill-coaching-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.15rem 0 0.15rem 1.1rem;
    position: relative;
    line-height: 1.4;
}

.drill-coaching-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 0.75rem;
}

.drill-links {
    display: flex;
    gap: 0.5rem;
}

.drill-link-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
    text-align: center;
    display: block;
    transition: all 0.15s;
}

.drill-link-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* Drill search reset link */
.drill-reset {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
}

.drill-reset:hover {
    color: var(--text-primary);
}

/* ========================================
   STAFF RESOURCES
   ======================================== */

.staff-resources-list {
    margin: 0 1rem 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

.staff-resource-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}

.staff-resource-item:last-child {
    border-bottom: none;
}

.staff-resource-item:hover {
    background: var(--background);
}

.staff-resource-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.staff-resource-info {
    flex: 1;
}

.staff-resource-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.staff-resource-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.staff-resource-arrow {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =============================================
   INVITE LINK & AUTH ADDITIONS
   ============================================= */

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Phone auth forms */
#phone-signin-form input,
#phone-signup-form input {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
#phone-signin-form input:focus,
#phone-signup-form input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.auth-switch-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}
.auth-switch-link a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Age group picker */
#age-group-picker {
    margin-top: 1.5rem;
}
.age-picker-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}
#age-picker-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}
.age-picker-sub {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.age-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.age-group-btn {
    padding: 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--region-color, #1a1a1a);
    color: white;
}
.age-group-btn:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
}

/* Region-colored age picker */
[data-region="agoura"] .age-group-btn {
    background: var(--agoura-primary);
}
[data-region="pali"] .age-group-btn {
    background: var(--pali-primary);
    color: #1a1a1a;
}

/* Admin users list */
.admin-user-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.admin-user-row:hover {
    background: var(--background);
}
.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.admin-user-info {
    flex: 1;
    min-width: 0;
}
.admin-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-user-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}
.admin-user-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    background: #eee;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}
.admin-user-badge.role-admin { background: #1a1a1a; color: white; }
.admin-user-badge.role-staff { background: #2196F3; color: white; }
.admin-user-badge.role-parent { background: #4CAF50; color: white; }
