/* Sydney Preaching Campaign - Volunteer Management System */

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --accent: #fbbf24;
    --accent-dark: #f59e0b;
    --accent-light: #fef3c7;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.logo-subtitle {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Main Content */
.main {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Page Title */
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }

.stat-change {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Calendar */
.calendar-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

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

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 100px;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: var(--gray-50);
}

.calendar-day.other-month {
    background: var(--gray-50);
    opacity: 0.5;
}

.calendar-day.today {
    background: var(--primary-light);
}

.calendar-day.selected {
    background: var(--primary);
}

.calendar-day.selected .day-number {
    color: white;
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.day-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.day-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-badge.overseer {
    background: var(--primary-light);
    color: var(--primary);
}

.day-badge.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.day-badge.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.day-badge.needs-help {
    background: var(--danger-light);
    color: var(--danger);
}

/* Day Detail Panel */
.day-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.day-panel.open {
    transform: translateX(0);
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

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

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
}

.panel-close:hover {
    background: var(--gray-200);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Volunteer List */
.volunteer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.volunteer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.volunteer-item:hover {
    background: var(--gray-100);
}

.volunteer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.volunteer-avatar.local {
    background: #e0f2fe;
    color: #0369a1;
}

.volunteer-avatar.delegate {
    background: #fef9c3;
    color: #a16207;
}

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

.volunteer-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 14px;
}

.volunteer-role {
    font-size: 12px;
    color: var(--gray-500);
}

.volunteer-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.volunteer-status.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.volunteer-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.volunteer-status.declined {
    background: var(--danger-light);
    color: var(--danger);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    background: white;
    cursor: pointer;
}

/* Table */
.table-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

tr:hover td {
    background: var(--gray-50);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Day Summary Modal */
.daysummary-preview-header {
    margin-bottom: 20px;
}

.daysummary-date {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.recipient-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.recipient-card.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.recipient-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipient-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipient-name {
    font-weight: 600;
    color: var(--gray-900);
}

.recipient-email {
    font-size: 13px;
    color: var(--gray-500);
}

.daysummary-includes {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
}

.includes-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.includes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.includes-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-700);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 20px;
    background: var(--gray-800);
    color: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--gray-300);
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-top: 12px;
    }

    .main {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }

    .day-badge {
        font-size: 9px;
    }

    .day-panel {
        max-width: 100%;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #fbbf24 100%);
}

.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 32px;
}

/* Quick Response Page (for email links) */
.response-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--gray-50);
}

.response-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.response-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.response-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.response-icon.declined {
    background: var(--danger-light);
    color: var(--danger);
}

.response-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.response-text {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.response-details {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: left;
    margin-bottom: 24px;
}

.response-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.response-detail-row:last-child {
    border-bottom: none;
}

.response-detail-label {
    color: var(--gray-500);
    font-size: 14px;
}

.response-detail-value {
    color: var(--gray-800);
    font-weight: 500;
    font-size: 14px;
}

/* Week Tabs */
.week-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius);
    width: fit-content;
}

.week-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-tab:hover {
    color: var(--gray-800);
}

.week-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.week-count {
    padding: 2px 8px;
    background: var(--gray-200);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.week-tab.active .week-count {
    background: var(--primary-light);
    color: var(--primary);
}

/* Week Badges (inline) */
.weeks-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.week-badge {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Approval Badges */
.approval-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.approval-badge.approved {
    background: var(--success-light);
    color: var(--success);
}

.approval-badge.not-approved {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* Roles List */
.roles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-item {
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gray-300);
}

.role-item.filled {
    border-left-color: var(--success);
}

.role-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.role-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-person {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-empty {
    font-size: 13px;
    color: var(--gray-400);
    font-style: italic;
}

/* Small Avatar */
.volunteer-avatar.small {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

/* Groups List */
.groups-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-card {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--primary-light);
}

.group-number {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
}

.group-size {
    font-size: 12px;
    color: var(--primary);
}

.group-overseer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.group-overseer > div:not(.volunteer-avatar) {
    flex: 1;
}

.group-members {
    padding: 8px;
}

.group-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
}

.group-member > div:not(.volunteer-avatar) {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-type {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.member-type.local {
    background: #e0f2fe;
    color: #0369a1;
}

.member-type.delegate {
    background: #fef9c3;
    color: #a16207;
}

/* Pairings Grid */
.pairings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pairings-column {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.column-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.pairings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pairing-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.pairing-person {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pairing-arrow {
    flex-shrink: 0;
}

.unpaired-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unpaired-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.unpaired-card > div {
    flex: 1;
}

/* New Pairings Page Styles */
.pairings-header {
    margin-bottom: 24px;
}

.pairings-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.date-selector {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.date-selector .form-label {
    margin-bottom: 6px;
}

.pairing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pairings-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.summary-stat {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.color-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--gray-600);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-dot.local {
    background: #e0f2fe;
    border: 2px solid #0369a1;
}

.legend-dot.delegate {
    background: #fef9c3;
    border: 2px solid #a16207;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
    text-align: center;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.column-header .column-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* New pairing card design */
.pairing-card-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.pairing-card-new:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pairing-number {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    flex-shrink: 0;
}

.pairing-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pairing-person-new {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.person-avatar.local {
    background: #e0f2fe;
    color: #0369a1;
}

.person-avatar.delegate {
    background: #fef9c3;
    color: #a16207;
}

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

.person-name {
    font-weight: 500;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-detail {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pairing-link {
    flex-shrink: 0;
    color: var(--gray-400);
}

.pairing-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s;
    flex-shrink: 0;
}

.pairing-remove:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.empty-state-pairings {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state-pairings svg {
    margin-bottom: 16px;
}

.empty-state-pairings p {
    margin-bottom: 16px;
}

.empty-state-pairings.success {
    color: var(--success);
}

/* New unpaired list */
.unpaired-list-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unpaired-card-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.unpaired-card-new:hover {
    border-color: var(--gray-300);
}

.unpaired-card-new .person-info {
    flex: 1;
}

.unpaired-card-new .btn {
    flex-shrink: 0;
}

/* Form Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Gender Badge */
.gender-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.gender-badge.male {
    background: #dbeafe;
    color: #1d4ed8;
}

.gender-badge.female {
    background: #fce7f3;
    color: #be185d;
}

/* Congregation Badges - Color coded */
.congregation-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.congregation-badge.sydney-city {
    background: #dbeafe;
    color: #1d4ed8;
}

.congregation-badge.bondi {
    background: #dcfce7;
    color: #15803d;
}

.congregation-badge.randwick {
    background: #fef3c7;
    color: #b45309;
}

.congregation-badge.matraville {
    background: #fce7f3;
    color: #be185d;
}

.congregation-badge.other {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Role Badges (table) */
.roles-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.role-badge {
    padding: 2px 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.role-badge.more {
    background: var(--gray-200);
    color: var(--gray-500);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 24px;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.form-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 500px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Pairings */
@media (max-width: 768px) {
    .pairings-grid {
        grid-template-columns: 1fr;
    }

    .pairings-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .date-selector {
        max-width: 100%;
    }

    .pairing-actions {
        justify-content: flex-end;
    }

    .pairings-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pairing-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .pairing-link {
        align-self: center;
        transform: rotate(90deg);
    }
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-sidebar > * {
        flex: 1;
        min-width: 300px;
    }
}

@media (max-width: 700px) {
    .dashboard-sidebar {
        flex-direction: column;
    }

    .dashboard-sidebar > * {
        min-width: 100%;
    }
}

/* Staffing Snapshot */
.staffing-snapshot {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.snapshot-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.snapshot-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.snapshot-date {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.snapshot-day-select {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 6px 28px 6px 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s, background-color 0.2s;
}

.snapshot-day-select:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
}

.snapshot-day-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.snapshot-group-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.snapshot-group-control .snapshot-count {
    border-radius: 4px 0 0 4px;
    padding-right: 4px;
}

/* Daily Settings Section */
.daily-settings-section {
    background: var(--primary-light);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.daily-setting-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.daily-setting-select,
.daily-setting-input {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: white;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    text-align: center;
    width: 70px;
}

.daily-setting-select {
    padding-right: 30px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.daily-setting-input {
    -moz-appearance: textfield;
}

.daily-setting-input::-webkit-outer-spin-button,
.daily-setting-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.daily-setting-select:hover,
.daily-setting-input:hover {
    background-color: var(--gray-50);
}

.daily-setting-select:focus,
.daily-setting-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.daily-setting-value {
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.snapshot-items {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.snapshot-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.snapshot-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.snapshot-label span:first-child {
    color: var(--gray-600);
}

.snapshot-count {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.snapshot-count.complete {
    background: var(--success-light);
    color: var(--success);
}

.snapshot-count.partial {
    background: var(--warning-light);
    color: #b45309;
}

.snapshot-count.empty {
    background: var(--danger-light);
    color: var(--danger);
}

.snapshot-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.snapshot-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.snapshot-bar-fill.complete {
    background: var(--success);
}

.snapshot-bar-fill.partial {
    background: var(--warning);
}

.snapshot-bar-fill.empty {
    background: var(--gray-300);
}

.snapshot-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

.snapshot-footer .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Alerts Panel */
.alerts-panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.alerts-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerts-header svg {
    color: var(--gray-500);
}

.alerts-header.has-urgent svg {
    color: var(--danger);
}

.alerts-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.alerts-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.alert-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-item.urgent {
    background: var(--danger-light);
    border-left: 3px solid var(--danger);
}

.alert-item.warning {
    background: var(--warning-light);
    border-left: 3px solid var(--warning);
}

.alert-item.success {
    background: var(--success-light);
    border-left: 3px solid var(--success);
    justify-content: center;
    color: var(--success);
    font-size: 14px;
}

.alert-time {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.alert-item.urgent .alert-time {
    background: var(--danger);
    color: white;
}

.alert-item.warning .alert-time {
    background: var(--warning);
    color: white;
}

.alert-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.alert-details strong {
    font-size: 14px;
    color: var(--gray-800);
}

.alert-shortage {
    font-size: 12px;
    color: var(--gray-600);
}

/* Alert Toggle Settings */
.alert-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.alert-toggle:hover {
    background: var(--gray-100);
}

.alert-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.alert-toggle .toggle-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-toggle .toggle-content strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.alert-toggle .toggle-content span {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Job Cards Page */
.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.job-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.job-card-header {
    padding: 20px;
    border-left: 4px solid var(--primary);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    gap: 16px;
}

.job-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.job-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.job-card-body {
    padding: 20px;
}

.job-card-section {
    margin-bottom: 20px;
}

.job-card-section:last-of-type {
    margin-bottom: 16px;
}

.job-card-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.job-card-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job-card-section li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
}

.job-card-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.job-card-timing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-dark);
}

.job-card-timing svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .job-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Filter Buttons */
.filter-bar {
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.filter-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-btn svg {
    margin-right: 4px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    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: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success);
}

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

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px var(--primary-light);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Availability Matrix */
.avail-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.avail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px;
}

.avail-table thead th {
    position: sticky;
    top: 0;
    background: var(--gray-50);
    z-index: 2;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.avail-sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: white;
    min-width: 160px;
    max-width: 200px;
    border-right: 2px solid var(--gray-200);
    padding: 8px 12px !important;
}

thead .avail-sticky-col {
    background: var(--gray-50);
    z-index: 4;
}

.avail-table tbody tr:hover .avail-sticky-col {
    background: var(--gray-50);
}

.avail-cell {
    text-align: center;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
    min-width: 65px;
    max-width: 110px;
    line-height: 1.4;
    transition: all 0.15s;
    border-bottom: 1px solid var(--gray-100);
}

.avail-cell:hover {
    filter: brightness(0.92);
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.avail-cell.avail-available {
    background: #dcfce7;
    color: #15803d;
}

.avail-cell.avail-partial {
    background: #fef9c3;
    color: #a16207;
}

.avail-cell.avail-unavailable {
    background: #fee2e2;
    color: #dc2626;
}

.avail-table tbody tr:hover td {
    background: inherit;
    filter: brightness(0.97);
}

.avail-table tbody tr:hover .avail-cell.avail-available {
    background: #bbf7d0;
}

.avail-table tbody tr:hover .avail-cell.avail-partial {
    background: #fef08a;
}

.avail-table tbody tr:hover .avail-cell.avail-unavailable {
    background: #fecaca;
}

@media (max-width: 768px) {
    .avail-sticky-col {
        min-width: 120px;
    }
    .avail-cell {
        min-width: 55px;
        font-size: 10px;
        padding: 4px 2px;
    }
}
