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

body {
    font-family: Arial, sans-serif;
    font-size: 13px;
    background-color: #f9f9f9;
    color: #333;
}

.admin-console {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.console-header {
    margin-bottom: 30px;
}

.console-header h1 {
    color: #00008B;
    font-size: 28px;
    font-weight: bold;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    background-color: #f9f9f9;
    z-index: 100;
    padding-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
}

/* Sub-tab Navigation */
.subtab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 60px;
    background-color: #f9f9f9;
    z-index: 99;
    padding-top: 10px;
}

.subtab-btn {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.subtab-btn:hover {
    background-color: #e0e0e0;
}

.subtab-btn.active {
    background-color: #fff;
    color: #00008B;
    border-bottom-color: #00008B;
}

.tab-btn {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #e0e0e0;
}

.tab-btn.active {
    background-color: #fff;
    color: #00008B;
    border-bottom-color: #00008B;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.subtab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Buttons */
.btn {
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.btn-primary {
    background-color: #00008B;
    color: white;
    height: 32px;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    background-color: #0000cd;
}

.btn-primary:active {
    background-color: #000080;
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #cc0000;
    color: white;
    padding: 6px 12px;
}

.btn-danger:hover {
    background-color: #aa0000;
}

.btn-danger:active {
    background-color: #880000;
    transform: scale(0.98);
}

.btn-danger:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.sp-trans-row:hover {
    background-color: #f0f4ff;
}

.btn-secondary {
    background-color: #555;
    color: white;
    padding: 6px 12px;
}

.btn-secondary:hover {
    background-color: #444;
}

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

/* Stripe Console */
.stripe-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#stripe-status {
    margin-bottom: 10px;
    color: #555;
    font-style: italic;
    font-size: 12px;
}

#stripe-tx-table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#stripe-tx-table-container::-webkit-scrollbar {
    width: 8px;
}

#stripe-tx-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#stripe-tx-table-container::-webkit-scrollbar-thumb {
    background: #00008B;
    border-radius: 4px;
}

#stripe-tx-table-container::-webkit-scrollbar-thumb:hover {
    background: #0000cd;
}

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

th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 8px;
    white-space: nowrap;
}

td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

tr:nth-child(even) {
    background-color: #f5f5f5;
}

.refund-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.refund-btn:hover {
    background-color: #0052a3;
}

.refund-btn:active {
    background-color: #003d82;
    transform: scale(0.98);
}

.refund-btn:disabled {
    background-color: #aaa;
    cursor: default;
}

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

.modal.active {
    display: flex;
}

.modal-box {
    background: white;
    padding: 24px;
    width: 420px;
    border: 2px solid #00008B;
    border-radius: 4px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h3 {
    color: #00008B;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #00008B;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #0000cd;
}

.modal-info {
    background: #f5f5f5;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 4px;
    font-size: 12px;
}

.modal-info div {
    margin-bottom: 8px;
}

.modal-info strong {
    display: inline-block;
    min-width: 140px;
}

.modal-option {
    margin-bottom: 12px;
}

.modal-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.modal-option input[type="radio"] {
    margin-right: 8px;
}

#stripe-partial-amount {
    width: 120px;
    border: 1px solid #ccc;
    padding: 4px;
    margin-left: 8px;
    border-radius: 3px;
}

#stripe-partial-amount:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    color: #999;
}

.confirm-message {
    margin-top: 14px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

.confirm-message strong {
    color: #000;
}

.confirm-message #stripe-confirm-details {
    margin-top: 6px;
    font-size: 11px;
}

#stripe-modal-buttons {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

.modal-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.modal-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.modal-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Member Charge */
.member-charge {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#mc-menu-container {
    display: flex;
    flex-direction: column;
}

.mc-form-section {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.mc-form-section label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.form-input {
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 3px;
    font-size: 13px;
}

.form-input:focus {
    outline: none;
    border-color: #00008B;
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
}

.mc-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mc-radio-group input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
}

.mc-radio-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

#mc-guest-info {
    display: flex;
    flex-direction: column;
}

#mc-guest-info > div {
    display: flex;
    flex-direction: column;
}

#mc-guest-info input {
    max-width: 300px;
}

#mc-rows-container {
    padding: 10px 0;
}

.mc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
}

.mc-row > input,
.mc-row > select {
    border: 1px solid #ccc;
    padding: 6px;
    border-radius: 3px;
    font-size: 13px;
}

.mc-description {
    flex: 1;
    min-width: 250px;
}

.mc-category-selector {
    min-width: 150px;
}

.mc-quantity,
.mc-unitprice,
.mc-amount {
    width: 90px;
}

.mc-amount {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.mc-delete-row-btn {
    white-space: nowrap;
}

#mc-total {
    color: #00008B;
    margin: 20px 0;
    font-size: 16px;
}

.mc-checkboxes {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mc-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.mc-checkboxes input[type="checkbox"] {
    cursor: pointer;
}

.mc-button-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.mc-button-container .btn {
    flex: 0 0 auto;
}

/* Shabbat Console */
.shabbat-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#shabbat-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

#shabbat-table-container::-webkit-scrollbar {
    width: 8px;
}

#shabbat-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#shabbat-table-container::-webkit-scrollbar-thumb {
    background: #00008B;
    border-radius: 4px;
}

#shabbat-table-container::-webkit-scrollbar-thumb:hover {
    background: #0000cd;
}

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

#shabbat-table th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 8px;
    white-space: nowrap;
}

#shabbat-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

#shabbat-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Zendesk Console */
.zendesk-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Zendesk tab navigation */
.zd-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #ddd;
    overflow-x: auto;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.zd-tab-btn {
    padding: 10px 16px;
    border: none;
    background: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.zd-tab-btn:hover {
    color: #00008B;
    background-color: #f5f5f5;
}

.zd-tab-btn.active {
    color: #00008B;
    border-bottom-color: #00008B;
}

.zd-tab-content {
    display: none;
}

.zd-tab-content.show {
    display: block;
}

.zd-view-section {
    margin-bottom: 30px;
}

.zd-view-title {
    color: #00008B;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.zd-ticket-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.zd-ticket-table-container::-webkit-scrollbar {
    width: 8px;
}

.zd-ticket-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.zd-ticket-table-container::-webkit-scrollbar-thumb {
    background: #00008B;
    border-radius: 4px;
}

.zd-ticket-table-container::-webkit-scrollbar-thumb:hover {
    background: #0000cd;
}

.zd-ticket-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

.zd-ticket-table th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 8px;
    position: sticky;
    top: 0;
    z-index: 1;
    word-break: break-word;
    white-space: normal;
}

.zd-ticket-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.zd-ticket-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.zd-ticket-row:hover {
    background-color: #e8f0fe !important;
}

/* Column widths */
.zd-col-ticket-id { width: 78px; }
.zd-col-subject { width: 400px; }
.zd-col-requester { width: 100px; }
.zd-col-assignee { width: 100px; }
.zd-col-created { width: 100px; text-align: center; }
.zd-col-age { width: 90px; text-align: center; }
.zd-col-action { width: 160px; text-align: center; }

.zd-summary-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.zd-summary-table {
    border-collapse: collapse;
    width: 100%;
}

.zd-summary-table th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 8px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.zd-summary-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: middle;
}

.zd-summary-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Age color badges */
.zd-age-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.zd-age-green  { background-color: #28a745; }
.zd-age-yellow { background-color: #d4ac0d; color: #333; }
.zd-age-orange { background-color: #e67e22; }
.zd-age-red    { background-color: #cc0000; }
.zd-age-unknown { background-color: #999; }

/* Comment thread */
.zd-comment {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.zd-comment:last-child {
    border-bottom: none;
}

.zd-comment-meta {
    font-size: 12px;
    margin-bottom: 6px;
    color: #555;
}

.zd-comment-body {
    font-size: 13px;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* Unallocated Transactions Table */
.unalloc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.unalloc-table th {
    background-color: #00008B;
    color: white;
    font-weight: 600;
    padding: 8px;
    text-align: left;
    position: sticky;
    top: 0;
}

.unalloc-table td {
    border-bottom: 1px solid #ddd;
    padding: 8px;
    font-size: 13px;
}

.unalloc-table tr:hover {
    background-color: #f9f9f9;
}

.unalloc-table a {
    color: #00008B;
    text-decoration: none;
}

.unalloc-table a:hover {
    text-decoration: underline;
}

.unalloc-member-select {
    padding: 6px 8px;
    border: 1px solid #00008B;
    border-radius: 3px;
    font-size: 13px;
    background-color: white;
    color: #333;
    cursor: pointer;
    min-width: 200px;
}

.unalloc-member-select:hover {
    background-color: #f0f0f0;
}

.unalloc-member-select:focus {
    outline: none;
    box-shadow: 0 0 3px #00008B;
}

.unalloc-allocate-btn {
    padding: 6px 12px;
    background-color: #00008B;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.unalloc-allocate-btn:hover {
    background-color: #00006b;
}

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

/* Background Check */
.background-check-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bg-check-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bg-check-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.bg-check-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 200px;
}

.bg-check-field label {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

#bg-result-container {
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#bg-result-container p {
    margin: 0;
    color: #333;
    font-size: 13px;
}

/* Send Events by Email */
.send-events-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.se-form-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.se-form-section label {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.se-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.se-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}

.se-checkboxes input[type="checkbox"] {
    cursor: pointer;
}

#se-status {
    font-size: 13px;
}

#se-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#se-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Event Registration */
.event-registration-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#er-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

#er-table-container::-webkit-scrollbar {
    width: 8px;
}

#er-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#er-table-container::-webkit-scrollbar-thumb {
    background: #00008B;
    border-radius: 4px;
}

#er-table-container::-webkit-scrollbar-thumb:hover {
    background: #0000cd;
}

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

#er-table th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 8px;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

#er-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

#er-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

#er-table input[type="checkbox"] {
    cursor: pointer;
}

#er-form-status {
    font-size: 13px;
}

#er-form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#er-form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Calendar Management (Events) */
.cm-events-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
}

.cm-events-table th {
    background-color: #00008B;
    color: white;
    text-align: left;
    padding: 10px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    font-weight: 600;
}

.cm-events-table td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: middle;
}

.cm-events-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.cm-events-table tbody tr:hover {
    background-color: #e8f0ff;
}

.cm-form-panel {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

#cm-form-message {
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}

#cm-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#cm-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Directory */
.directory-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Religious School Class List */
.religiousschool-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Member Lookup */
.memberlookup-console {
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.memberlookup-card { display: flex; flex-direction: column; gap: 20px; }
.memberlookup-section { border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
.memberlookup-section-title { background: #00008B; color: white; padding: 8px 14px; font-weight: 600; font-size: 13px; }
.memberlookup-section-body { padding: 14px; }
.memberlookup-field { display: flex; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.memberlookup-label { color: #888; min-width: 160px; }
.memberlookup-value { color: #222; }
.memberlookup-people-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.memberlookup-people-table th { background: #f5f5f5; text-align: left; padding: 6px 10px; color: #555; }
.memberlookup-people-table td { padding: 6px 10px; border-top: 1px solid #eee; }

/* Authentication */
body.unauthorized .tab-navigation,
body.unauthorized .subtab-navigation {
    display: none !important;
}

body.unauthorized .tab-content {
    display: none !important;
}

body.unauthorized #welcome-tab {
    display: block !important;
}

body.unauthorized .airtable-embed {
    display: none !important;
}

body.unauthorized .addtomailinglist-console,
body.unauthorized .addtocalendar-console,
body.unauthorized .generalinquiries-console,
body.unauthorized .allformsubmissions-console,
body.unauthorized .boardminutes-console,
body.unauthorized .emailworkflow-console,
body.unauthorized .send-events-console,
body.unauthorized .wordpresslogins-console,
body.unauthorized .stripecardstatus-console,
body.unauthorized .statementpreview-console,
body.unauthorized .cafhistory-console,
body.unauthorized .upcomingcampaigns-console,
body.unauthorized .calendarmgmt-console,
body.unauthorized .shabbatreservations-console,
body.unauthorized .security-console,
body.unauthorized .zendesk-console,
body.unauthorized .unallocated-console,
body.unauthorized .memberlookup-console {
    position: relative;
}

body.unauthorized .addtomailinglist-console > *,
body.unauthorized .addtocalendar-console > *,
body.unauthorized .generalinquiries-console > *,
body.unauthorized .allformsubmissions-console > *,
body.unauthorized .boardminutes-console > *,
body.unauthorized .emailworkflow-console > *,
body.unauthorized .send-events-console > *,
body.unauthorized .wordpresslogins-console > *,
body.unauthorized .stripecardstatus-console > *,
body.unauthorized .statementpreview-console > *,
body.unauthorized .cafhistory-console > *,
body.unauthorized .upcomingcampaigns-console > *,
body.unauthorized .calendarmgmt-console > *,
body.unauthorized .shabbatreservations-console > *,
body.unauthorized .security-console > *,
body.unauthorized .zendesk-console > *,
body.unauthorized .unallocated-console > *,
body.unauthorized .memberlookup-console > * {
    display: none !important;
}

body.unauthorized .directory-console::before,
body.unauthorized .religiousschool-console::before,
body.unauthorized .yahrzeits-console::before,
body.unauthorized .seatpurchases-console::before,
body.unauthorized .seatassignments-console::before,
body.unauthorized .meals-console::before,
body.unauthorized .orders-console::before,
body.unauthorized .seders-console::before,
body.unauthorized .passover-orders-console::before,
body.unauthorized .tracking-console::before,
body.unauthorized .hametz-console::before,
body.unauthorized .shabbatreservations-console::before,
body.unauthorized .generalinquiries-console::before,
body.unauthorized .allformsubmissions-console::before,
body.unauthorized .addtocalendar-console::before,
body.unauthorized .addtomailinglist-console::before,
body.unauthorized .boardminutes-console::before,
body.unauthorized .emailworkflow-console::before,
body.unauthorized .send-events-console::before,
body.unauthorized .wordpresslogins-console::before,
body.unauthorized .stripecardstatus-console::before,
body.unauthorized .statementpreview-console::before,
body.unauthorized .cafhistory-console::before,
body.unauthorized .upcomingcampaigns-console::before,
body.unauthorized .calendarmgmt-console::before,
body.unauthorized .security-console::before,
body.unauthorized .zendesk-console::before,
body.unauthorized .unallocated-console::before,
body.unauthorized .memberlookup-console::before,
body.unauthorized .errordashboard-console::before {
    content: "Access denied. Please access this page through WordPress.";
    display: block;
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-weight: 500;
}

/* Calendar Styling */
.calendar-console {
    min-height: 1300px;
}

/* Airtable Embed Loading Indicator */
.airtable-embed-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.airtable-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f9f9f9;
    padding: 20px 40px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    z-index: 10;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.airtable-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Campaign Creation Form Styles */
.campaign-progress {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    justify-content: space-between;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.cp-step {
    padding: 8px 12px;
    background-color: #ddd;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    flex: 1;
    cursor: default;
    transition: all 0.2s ease;
}

.cp-step.active {
    background-color: #00008B;
    color: white;
}

.cp-step.clickable {
    background-color: #b3b3b3;
    color: white;
    cursor: pointer;
}

.cp-step.clickable:hover {
    background-color: #999;
}

.cp-step.disabled {
    background-color: #e8e8e8;
    color: #999;
    cursor: not-allowed;
}

.sendemail-console {
    min-height: 1200px;
}

.campaign-step {
    display: none;
}

.campaign-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.campaign-section {
    background-color: white;
    padding: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.campaign-section h3 {
    color: #00008B;
    margin-bottom: 20px;
    font-size: 18px;
}

.campaign-section label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 13px;
}

.campaign-section .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.campaign-section .form-input:focus {
    outline: none;
    border-color: #00008B;
    box-shadow: 0 0 0 2px rgba(0, 0, 139, 0.1);
}

/* Quill Editor Overrides */
.ql-container {
    font-size: 13px;
    font-family: inherit;
}

.ql-editor {
    min-height: 250px;
    background-color: white;
    border: 1px solid #ccc;
}

.ql-editor:focus {
    outline: none;
    border-color: #00008B;
    box-shadow: 0 0 0 2px rgba(0, 0, 139, 0.1);
}

.ql-toolbar {
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background-color: #f9f9f9;
}

.ql-snow .ql-stroke {
    stroke: #666;
}

.ql-snow .ql-fill {
    fill: #666;
}

.ql-snow .ql-picker-label {
    color: #666;
}

/* Email Preview - Hide table borders and dividers */
#cc-html-preview table {
    border: none !important;
}

#cc-html-preview table, #cc-html-preview td, #cc-html-preview tr {
    border: none !important;
    border-collapse: collapse;
}

#cc-html-preview .mld-block-divider {
    display: none !important;
}

/* Category P&L Styling */
#pl-categories-content {
    padding: 0;
}

/* Add spacing between category tables and improve alignment */
#pl-categories-content p {
    margin: 24px 0 12px 0;
    font-weight: bold;
    font-size: 13px;
    color: #333;
}

#pl-categories-content p:first-child {
    margin-top: 0;
}

/* Ensure consistent table styling across all categories */
#pl-categories-content table {
    margin-bottom: 24px;
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

#pl-categories-content table thead tr {
    background-color: #385494;
}

#pl-categories-content table th,
#pl-categories-content table td {
    padding: 8px 4px;
    border: 1px solid #e0e0e0;
}

#pl-categories-content table th {
    font-weight: bold;
    color: #FFFFFF;
    white-space: nowrap;
}

#pl-categories-content table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

#pl-categories-content table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Accounts Table Styling */
.accounts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.accounts-table th {
    background-color: #00008B;
    color: #fff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ddd;
}

.accounts-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    color: #333;
}

.accounts-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.accounts-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.accounts-table tbody tr.account-header {
    background-color: #fff3cd;
    font-weight: 600;
}

.accounts-table .account-name {
    font-weight: 500;
}

.accounts-table .account-number {
    font-family: 'Courier New', monospace;
    text-align: center;
}

.accounts-table .use-case {
    color: #555;
    max-width: 400px;
}

.accounts-table .flag-column {
    text-align: center;
    font-weight: 500;
    width: 80px;
}

.accounts-table .editable {
    background-color: #fffacd;
    cursor: text;
}

.accounts-table .editable:focus {
    background-color: #ffeb99;
    outline: 2px solid #00008B;
    outline-offset: -1px;
}

.accounts-table .revenue-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.accounts-table .action-column {
    text-align: center;
    width: 70px;
    padding: 10px 12px !important;
}

/* Background Checks History Table */
.backgroundchecks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.backgroundchecks-table th {
    background-color: #00008B;
    color: #fff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ddd;
}

.backgroundchecks-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    color: #333;
}

.backgroundchecks-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.backgroundchecks-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.backgroundchecks-table .date-cell {
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.backgroundchecks-table .name-cell {
    font-weight: 500;
}

.backgroundchecks-table .source-cell {
    color: #555;
    font-size: 12px;
}

.backgroundchecks-table .result-cell {
    color: #555;
    max-width: 300px;
    word-wrap: break-word;
}

/* Board Minutes Form */
.bm-section-heading {
    margin: 24px 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #00008B;
    color: #00008B;
    font-size: 16px;
    font-weight: 600;
}

.bm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.bm-rte-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.bm-rte-btn {
    padding: 6px 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.bm-rte-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.bm-rte-btn:active {
    background: #d0d0d0;
}

.bm-rte-body {
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    padding: 12px;
    min-height: 200px;
    font-size: 13px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    outline: none;
}

.bm-rte-body:focus {
    border-color: #00008B;
    box-shadow: 0 0 0 2px rgba(0, 0, 139, 0.1);
}

.bm-status {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}

.bm-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bm-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

body.unauthorized .boardminutes-console::before {
    content: 'Access denied. Please access this page through WordPress.';
    display: block;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Highlight empty paragraphs in editors */
/* Good blank lines (interior, no spaces) - blue */
.ql-editor p.blank-good {
    background-color: #cce5ff;
    min-height: 1.5em;
    border-left: 3px solid #0066cc;
}

/* Edge blank lines (leading/trailing) - yellow */
.ql-editor p.blank-edge {
    background-color: #fff3cd;
    min-height: 1.5em;
    border-left: 3px solid #ffc107;
}

/* Bad blank lines (with spaces) - light red */
.ql-editor p.blank-bad {
    background-color: #ffcccc;
    min-height: 1.5em;
    border-left: 3px solid #ff6666;
}

/* Sidebar menu buttons - allow text wrapping */
.memberaccounts-menu-btn,
.stripe-menu-btn {
    white-space: normal !important;
    word-break: break-word;
    overflow: visible !important;
    height: auto !important;
    line-height: 1.3 !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    width: 180px !important;
    min-width: 180px !important;
    text-align: left !important;
}

.memberaccounts-menu-btn.active,
.stripe-menu-btn.active {
    background-color: #00008B !important;
    color: #fff !important;
    font-weight: 700 !important;
}
