/* USAYESS Event Registration System - Scholarship System Styling */
/* Professional design inspired by USAYESS Scholarship Portal */

:root {
    --primary-color: #003366;
    --secondary-color: #0066cc;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
}

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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

main,
body > .wrap {
    flex: 1;
}

/* ============= HEADER & NAVIGATION ============= */

.header,
.admin-topbar {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0;
}

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

.admin-topbar {
    justify-content: space-between;
    padding: 12px 20px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    flex: 0 1 auto;
}

.logo,
.admin-logo {
    height: 60px;
    display: flex;
    align-items: center;
}

.logo img,
.admin-logo img {
    height: 60px;
    width: auto;
}

.site-title,
.title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    margin: 0;
    letter-spacing: 0.02em;
}

.admin-title {
    font-size: 18px;
}

.header-nav,
.admin-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-nav a,
.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-nav a:hover,
.admin-nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-header {
    background-color: var(--success-color);
    color: white;
    padding: 8px 20px;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-header:hover {
    background-color: #218838;
}

/* Hamburger Menu Button */
.hamburger-menu,
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.hamburger-menu span,
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1),
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2),
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3),
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Admin header specific styles */
.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.admin-user-pill {
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
    color: white;
}

.admin-logout-form {
    margin: 0;
}

.admin-logout-form button {
    border: none;
    background: #e11d48;
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-logout-form button:hover {
    background: #be123c;
}

@media (max-width: 768px) {
    .header-content,
    .admin-topbar-left {
        padding: 0 15px;
    }
    
    .logo,
    .admin-logo {
        height: 45px;
    }

    .logo img,
    .admin-logo img {
        height: 45px;
    }
    
    .site-title,
    .title {
        font-size: 18px;
    }

    .admin-title {
        font-size: 16px;
    }
    
    .hamburger-menu,
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-nav,
    .admin-nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--primary-color);
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .header-nav.active,
    .admin-nav.active {
        max-height: 500px;
    }
    
    .header-nav a,
    .admin-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-radius: 0;
    }
    
    .header-nav a:last-child,
    .admin-nav a:last-child {
        border-bottom: none;
    }
    
    .btn-header {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    /* Admin header mobile navigation */
    .admin-topbar-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .admin-topbar-right.mobile-nav-open {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 20px;
        flex-direction: column !important;
        align-items: stretch !important;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        z-index: 99;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .admin-topbar-right.mobile-nav-open .admin-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0 0 16px 0 !important;
        gap: 0 !important;
        position: static;
        background: none;
        box-shadow: none;
        max-height: none;
        overflow: visible;
        border: none;
        top: auto;
    }

    .admin-topbar-right.mobile-nav-open .admin-nav a {
        width: 100%;
        text-align: left;
        padding: 14px 16px;
        margin: 0;
        border-radius: 8px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        position: static;
        background: none;
    }

    .admin-topbar-right.mobile-nav-open .admin-user-pill,
    .admin-topbar-right.mobile-nav-open .admin-logout-form {
        width: 100%;
    }

    .admin-topbar-right.mobile-nav-open .admin-logout-form button {
        width: 100%;
        padding: 14px 16px;
        margin: 4px 0;
        border-radius: 8px;
        font-size: 15px;
        justify-content: center;
    }

    .admin-topbar-right.mobile-nav-open .admin-user-pill {
        padding: 14px 16px;
        margin: 4px 0;
        border-radius: 8px;
        text-align: center;
        background: rgba(255,255,255,0.2);
    }

    .admin-topbar-right:not(.mobile-nav-open) {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo,
    .admin-logo {
        height: 40px;
    }

    .logo img,
    .admin-logo img {
        height: 40px;
    }
    
    .site-title,
    .title {
        font-size: 16px;
    }

    .admin-title {
        font-size: 14px;
    }
}

/* ============= MAIN CONTAINER & LAYOUT ============= */

.container,
.wrap {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    width: calc(100% - 60px);
}

.wrap {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-title,
h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 20px;
    text-align: left;
}

.page-subtitle,
.sub {
    font-size: 16px;
    color: var(--medium-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

/* ============= CARDS & GRIDS ============= */

.grid,
.scholarship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card,
.scholarship-card,
.content-section {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.scholarship-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    border-color: var(--secondary-color);
}

.card h2,
.scholarship-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 12px;
}

.card p,
.scholarship-description {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 14px;
}

.scholarship-status,
.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
}

.status-open {
    background-color: #d4edda;
    color: #155724;
}

.status-closed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-soon {
    background-color: #fff3cd;
    color: #856404;
}

.scholarship-card.open {
    border-color: var(--success-color);
}

.scholarship-card.closed {
    opacity: 0.7;
}

/* Table "card" wrapper */
.table-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

details.section {
    padding: 0;
}

details.section summary {
    padding: 20px;
    cursor: pointer;
    user-select: none;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    transition: background 0.2s ease;
}

details.section summary:hover {
    background: #e9ecef;
}

details.section summary h2 {
    border-bottom: none;
    margin: 0;
    padding: 0;
}

details.section[open] summary {
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

details.section > p,
details.section > div {
    padding: 20px;
}

details.section > p:first-of-type {
    padding: 0 20px 15px 20px;
    margin-bottom: 0;
}

.section-title,
h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--medium-gray);
    margin-bottom: 15px;
}

/* ============= BUTTONS ============= */

.btn,
button,
input[type="submit"],
input[type="button"] {
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    line-height: 1.4;
    background-color: var(--primary-color);
    color: white;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #002244;
}

a.btn {
    color: white;
    text-decoration: none;
}

a.btn:hover {
    text-decoration: none;
}

.btn-primary,
button.btn-primary,
input[type="submit"],
a.btn {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover,
button.btn-primary:hover,
input[type="submit"]:hover,
a.btn:hover {
    background-color: #002244;
    color: white;
}

.btn-secondary {
    background-color: var(--medium-gray);
    color: white;
}

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

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

.btn-success:hover {
    background-color: #218838;
}

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

.btn-danger:hover,
button.btn-danger:hover {
    background-color: #c82333;
}

/* Delete/danger button styling */
.danger-btn,
button.danger-btn {
    background-color: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.danger-btn:hover,
button.danger-btn:hover {
    background-color: #c82333;
    color: white;
}

.no-border-button {
    border: none;
    background: none;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.no-border-button.danger-btn {
    background-color: #dc3545;
    color: white;
    border-radius: 5px;
}

.no-border-button.danger-btn:hover {
    background-color: #c82333;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 15px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

a.btn {
    color: white;
    text-decoration: none;
}

/* ============= FORMS ============= */

.form-group {
    margin-bottom: 20px;
}

.form-label,
label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.form-label .required {
    color: var(--danger-color);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    background: white;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.error,
input.error {
    border-color: var(--danger-color);
}

.form-help {
    font-size: 14px;
    color: var(--medium-gray);
    margin-top: 5px;
}

.form-error {
    font-size: 14px;
    color: var(--danger-color);
    margin-top: 5px;
}

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

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1;
    min-width: 200px;
}

/* ============= ALERTS & MESSAGES ============= */

.alert,
.message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.alert-success,
.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error,
.alert-danger,
.error,
.err,
.error-box {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.err-list {
    padding: 0;
}

.err-item {
    padding: 10px 15px;
    margin: 5px 0;
    border-left: 4px solid #f5c6cb;
    background-color: #fbf0f1;
    line-height: 1.5;
    word-break: break-word;
}

.err-item:first-child {
    margin-top: 0;
    border-radius: 4px 4px 0 0;
}

.err-item:last-child {
    margin-bottom: 0;
    border-radius: 0 0 4px 4px;
}

.err-item strong {
    color: #721c24;
    font-weight: 600;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert .close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
}

.alert .close:hover {
    opacity: 1;
}

/* ============= BADGES ============= */

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
}

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

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

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

.badge-warning {
    background-color: var(--warning-color);
    color: #333;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-secondary {
    background-color: var(--medium-gray);
    color: white;
}

/* ============= TABLES ============= */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

/* Events Table Specific Styles */
.events-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.events-table thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.events-table thead th.text-center {
    text-align: center;
}

.events-table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.events-table tbody tr {
    transition: background-color 0.2s ease;
}

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

.events-table tbody tr:last-child td {
    border-bottom: none;
}

/* Event row time-based styling */
.events-table tbody tr.event-soon {
    background-color: #fff3cd;
}

.events-table tbody tr.event-soon:hover {
    background-color: #fff0b3;
}

.events-table tbody tr.event-upcoming {
    background-color: #d1ecf1;
}

.events-table tbody tr.event-upcoming:hover {
    background-color: #bee5eb;
}

/* Event name cell */
.event-name-cell {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 200px;
}

.event-name {
    font-size: 16px;
    margin-bottom: 4px;
}

.event-meta {
    font-size: 13px;
    color: var(--medium-gray);
    font-weight: 400;
    margin-top: 6px;
}

.event-meta .event-location::after {
    content: " • ";
    margin: 0 6px;
}

.event-meta .event-date {
    white-space: nowrap;
}

/* Status badges */
.event-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-soon {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-upcoming {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-past {
    background-color: #e2e3e5;
    color: #6c757d;
    border: 1px solid #d6d8db;
}

/* Registration buttons in table */
.registration-cell {
    text-align: center;
    white-space: nowrap;
    padding: 12px 8px !important;
}

.btn-sm {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 2px solid transparent;
    text-align: center;
}

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

.btn-team:hover {
    background-color: #002244;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.2);
}

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

.btn-individual:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

/* Mobile-specific visibility */
.hide-mobile {
    display: table-cell;
}

.show-mobile {
    display: none;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--dark-gray);
}

.table tbody tr:hover {
    background-color: var(--light-gray);
}

/* Squad list table - add separation between squads */
.squad-list-table tbody tr {
    border-bottom: 2px solid #dee2e6;
}

.squad-list-table tbody tr:last-child {
    border-bottom: 1px solid var(--border-color);
}

.squad-list-table tbody tr td {
    padding: 16px 12px;
}

.squad-list-table tbody tr:not(:last-child) td {
    border-bottom: 2px solid #dee2e6;
}

/* ============= EVENT-SPECIFIC STYLES ============= */

/* Rotation/Squadding */
.rotation-block {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rotation-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 8px;
    flex-wrap: wrap;
}

.rotation-header h2 {
    margin: 0;
    font-size: 1.05rem;
    border: none;
    padding: 0;
}

.rotation-header .small {
    font-size: 0.8rem;
    color: #6b7280;
    border: none;
}

.rotation-layout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 4px;
}

.rotation-main {
    flex: 4;
    min-width: 0;
}

.rotation-side {
    flex: 1;
    min-width: 180px;
    max-width: 240px;
}

.squad-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.squad-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 0.75rem;
}

.squad-table th,
.squad-table td {
    border: 1px solid #e5e7eb;
    padding: 4px 6px;
}

.squad-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.squad-table td.time-cell,
.squad-table td.field-cell {
    text-align: center;
    font-weight: 600;
}

.ath-cell {
    white-space: normal;
    word-wrap: break-word;
}

.ath-cell .bib-tag {
    font-weight: 700;
    font-size: 0.75rem;
}

.ath-cell .name-tag {
    font-weight: 500;
}

.ath-cell .team-tag {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 1px;
}

.unsq-panel {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f3f4f6;
    padding: 6px 8px;
    max-height: 220px;
    overflow-y: auto;
}

.unsq-item {
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

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

.unsq-item .bib-tag {
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 4px;
}

.unsq-item .team-tag {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
}

/* Typeahead search */
.typeahead-wrap {
    position: relative;
    width: 100%;
}

.typeahead-results {
    position: absolute;
    z-index: 50;
    margin-top: 4px;
    max-height: 240px;
    overflow: auto;
    background: white;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    min-width: 280px;
}

.typeahead-item {
    padding: 10px 12px;
    cursor: pointer;
}

.typeahead-item:hover {
    background: rgba(0,0,0,0.05);
}

.typeahead-item.active {
    background: rgba(11, 62, 122, 0.1);
}

.typeahead-status {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Athlete management */
.athlete-slot {
    margin-bottom: 16px;
}

.athlete-member-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.athlete-member-row .athlete-search {
    flex: 1 1 280px;
}

.athlete-display {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.athlete-nonmember-row {
    margin-top: 10px;
}

.athlete-nonmember-row label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.score-input {
    width: 6ch;
    text-align: center;
}

/* Admin management page specific styles */
.admin-edit-inline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
}

.admin-edit-inline .inline-form {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 12px;
    align-items: end;
}

.admin-edit-inline .form-group {
    margin-bottom: 0;
}

.admin-edit-inline label:not(.checkbox-label) {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.admin-edit-inline .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-top: 20px;
}

.admin-edit-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.admin-edit-inline select,
.admin-edit-inline input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
}

.admin-edit-inline button {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

/* Admins manage - update form row spacing */
.admin-page--admins-manage table {
    margin-top: 20px;
}

.admin-page--admins-manage table td {
    vertical-align: middle;
}

.admin-page--admins-manage table td:last-child {
    background: #fafafa;
}

.admin-page--admins-manage .badge {
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

/* Events admin page specific styles */
.event-edit-inline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 8px 0;
}

.event-edit-inline .inline-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-edit-inline .form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.event-edit-inline .form-group {
    margin-bottom: 0;
}

.event-edit-inline .form-group label:not(.checkbox-label) {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.event-edit-inline .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.event-edit-inline input[type="text"],
.event-edit-inline input[type="date"],
.event-edit-inline select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
}

.event-edit-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.event-edit-inline .form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.event-edit-inline .inline-delete-form {
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.admin-page--events-admin table td:last-child {
    background: #fafafa;
    vertical-align: top;
}

.admin-page--events-admin table tbody tr {
    border-bottom: 2px solid #dee2e6;
}

.admin-page--events-admin table tbody tr:last-child {
    border-bottom: 1px solid #dee2e6;
}

.admin-page--events-admin table tbody tr td {
    padding: 14px 12px;
}

/* Squad payments card layout */
.squad-payments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.squad-payment-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Pay-all orders card layout */
.payment-orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.payment-order-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Individual athlete payments */
.athlete-payments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.athlete-payment-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.athlete-id-small {
    font-size: 12px;
    font-weight: normal;
    color: #666;
    margin-left: 8px;
}

.payment-team {
    display: flex;
    align-items: center;
}

.athlete-payment-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    background: white;
}

/* Common payment card styling */
.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.payment-card-info h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
}

.payment-state {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.payment-card-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
}

.payment-date,
.payment-provider {
    display: flex;
    align-items: center;
}

.payment-card-status {
    white-space: nowrap;
}

.squad-payment-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    background: white;
}

.amount-block {
    text-align: center;
}

.amount-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.amount-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.amount-highlight {
    color: #003366;
    font-size: 20px;
}

.squad-payment-details {
    padding: 8px 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.detail-row {
    display: flex;
    gap: 12px;
    font-size: 13px;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.detail-value {
    flex: 1;
    color: #333;
}

.session-id {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    word-break: break-all;
}

.squad-payment-actions {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.refund-form-group {
    flex: 1;
}

.refund-form-group summary {
    outline: none;
}

.refund-form-group summary::-webkit-details-marker {
    display: none;
}

.refund-forms-container {
    margin-top: 12px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.refund-form {
    margin-bottom: 12px;
}

.refund-form h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.refund-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.refund-row input,
.refund-row select {
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.refund-row button {
    padding: 6px 12px;
    font-size: 13px;
    flex-shrink: 0;
}

.refund-note {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* ============= ROTATION CARDS ============= */

.rotations-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rotation-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.rotation-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rotation-card-header {
    padding: 12px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.rotation-info h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.rotation-discipline {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.rotation-card-content {
    padding: 12px 14px;
    background: white;
    flex: 1;
}

.rotation-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.rotation-detail {
    text-align: center;
}

.rotation-detail label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rotation-detail-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fields-badge {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.fields-count {
    font-size: 11px;
    color: #999;
}

.squad-count {
    font-size: 18px;
    font-weight: 600;
}

.squad-count.squadded {
    color: #28a745;
}

.squad-count.unsquadded {
    color: #dc3545;
}

.rotation-card-action {
    padding: 10px 14px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 6px;
}

.rotation-card-action .btn {
    flex: 1;
    margin: 0;
    font-size: 13px;
    padding: 6px 10px;
}

/* ============= SQUAD TABLE ============= */

.squad-grid table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.squad-grid thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
}

.squad-grid th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.squad-grid tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.squad-grid tbody tr:hover {
    background: #f8f9fa;
}

.squad-grid td {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}

.squad-grid td:first-child,
.squad-grid td:nth-child(2) {
    font-weight: 600;
    background: #f8f9fa;
    min-width: 70px;
}

/* Squad slot cells */
.squad-slot-filled {
    background: #f0f8f0;
}

.squad-slot-empty {
    background: #fff5f5;
}

/* Squad slot input styling */
.squad-slot {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 400;
    cursor: grab;
    transition: all 0.2s ease;
    background: white;
    line-height: 1.2;
    height: 24px;
}

.squad-slot:hover {
    border-color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(0, 51, 102, 0.15);
}

.squad-slot:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.squad-slot:active {
    cursor: grabbing;
}

.squad-slot[placeholder]:placeholder-shown {
    color: #999;
    font-style: italic;
}

.slot-info {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    min-height: 14px;
    line-height: 1.3;
}

.slot-info div {
    margin: 1px 0;
}

/* Unsquadded list styling */
.unsquadded-list {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.unsquadded-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: grab;
    transition: all 0.2s ease;
    font-size: 13px;
    user-select: none;
}

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

.unsquadded-item:hover {
    background: #f0f8ff;
    border-color: var(--primary-color);
}

.unsquadded-item:active {
    cursor: grabbing;
    background: #e6f2ff;
}

.unsquadded-item.color-tbd {
    cursor: default;
    color: #999;
    padding: 15px 10px;
    text-align: center;
}

/* ============= REVENUE CARDS ============= */

.revenue-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.revenue-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.revenue-card-header h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.revenue-card-amount {
    font-size: 28px;
    font-weight: 600;
    color: #003366;
    margin-bottom: 10px;
}

.revenue-card-details {
    font-size: 12px;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
}

.revenue-detail {
    margin: 4px 0;
}

.revenue-totals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.revenue-total-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    background: white;
}

.revenue-total-card-negative {
    border-color: #dc3545;
    background: #fff5f5;
}

.revenue-total-card-primary {
    border-color: #28a745;
    background: #f0f8f0;
    border-width: 2px;
}

.revenue-total-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}

.revenue-total-amount {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.revenue-total-card-negative .revenue-total-amount {
    color: #dc3545;
}

.revenue-total-card-primary .revenue-total-amount {
    color: #28a745;
}

/* ============= PARTICIPANT SUMMARY CARDS ============= */

.participant-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.participant-summary-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: white;
    text-align: center;
}

.participant-summary-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}

.participant-summary-value {
    font-size: 36px;
    font-weight: 700;
    color: #003366;
    line-height: 1;
}

.participant-summary-members {
    color: #28a745;
}

/* Rotation capacity bars */
.rotation-capacity-grid {
    display: grid;
    gap: 12px;
}

.rotation-capacity-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 15px;
    background: white;
}

.rotation-capacity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rotation-capacity-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.rotation-capacity-stats {
    font-size: 13px;
    color: #666;
}

.rotation-capacity-bar-container {
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rotation-capacity-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.rotation-capacity-bar.capacity-warning {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.rotation-capacity-bar.capacity-critical {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%);
}

.rotation-capacity-bar.capacity-full {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.rotation-capacity-bar.capacity-over {
    background: linear-gradient(90deg, #8b0000 0%, #dc3545 100%);
}

/* No-show statistics */
.noshow-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.noshow-stat-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    text-align: center;
}

.noshow-stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.noshow-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #dc3545;
    line-height: 1;
}

.noshow-stat-value.stat-rate {
    font-size: 24px;
}

/* Search and filter controls */
.search-filter-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.search-filter-controls input[type="text"],
.search-filter-controls select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.search-filter-controls input[type="text"]:focus,
.search-filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

/* Discipline distribution visual */
.discipline-visual-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.discipline-visual-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 15px;
}

.discipline-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.discipline-visual-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.discipline-visual-count {
    font-size: 13px;
    color: #666;
}

.discipline-visual-bar-container {
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.discipline-visual-bar {
    height: 100%;
    background: linear-gradient(90deg, #003366 0%, #0066cc 100%);
    transition: width 0.3s ease;
}

/* State geographic visual */
.state-visual-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.state-visual-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.state-visual-abbr {
    font-weight: 700;
    font-size: 18px;
    color: #003366;
    min-width: 40px;
}

.state-visual-details {
    flex: 1;
}

.state-visual-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.state-visual-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.state-visual-bar-container {
    flex: 1;
    height: 18px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.state-visual-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.3s ease;
}

.state-visual-count {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    min-width: 60px;
    text-align: right;
}

/* Team details expandable */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 13px;
    text-decoration: underline;
}

.btn-link:hover {
    color: #0066cc;
}

.team-details-content {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.team-detail-item {
    margin: 4px 0;
    font-size: 13px;
}

/* Bulk actions bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.bulk-actions-bar input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.bulk-actions-bar label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

#selectedCount {
    font-weight: 600;
    color: #003366;
}

.bulk-actions-bar button {
    margin-left: auto;
}

.bulk-actions-bar button:first-of-type {
    margin-left: auto;
}

/* Checkbox column */
.col-checkbox {
    width: 40px;
    text-align: center;
    padding: 8px 4px;
}

.col-checkbox input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.participant-checkbox {
    cursor: pointer;
}

/* Targets detail section */
.targets-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.targets-detail-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

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

.targets-detail-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
}

.targets-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #003366;
    margin-bottom: 6px;
}

.targets-detail-value {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 4px;
}

.targets-detail-meta {
    font-size: 11px;
    color: #666;
}

/* Total targets card */
.targets-total-card {
    background: linear-gradient(135deg, #003366 0%, #004d99 100%);
    color: white;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
}

.targets-total-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.targets-total-value {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
}

@media (max-width: 900px) {
    .squad-payment-amounts,
    .athlete-payment-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .rotations-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .rotation-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .payment-card-header {
        flex-direction: column;
    }

    .squad-payment-amounts,
    .athlete-payment-summary {
        grid-template-columns: 1fr 1fr;
    }

    .payment-card-meta {
        flex-direction: column;
        gap: 4px;
    }

    .refund-row {
        flex-direction: column;
    }

    .rotations-cards-grid {
        grid-template-columns: 1fr;
    }

    .rotation-details-grid {
        grid-template-columns: 1fr;
    }

    .refund-row input,
    .refund-row select,
    .refund-row button {
        width: 100%;
    }
}

/* ============= UTILITY CLASSES ============= */

/* Margin utilities */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.ml-6 { margin-left: 6px; }
.ml-8 { margin-left: 8px; }
.ml-auto { margin-left: auto; }
.mr-12 { margin-right: 12px; }

/* Width utilities */
.w-100 { width: 100%; }
.w-130 { width: 130px; }
.w-140 { max-width: 140px; }
.w-160 { width: 160px; }
.w-180 { max-width: 180px; }
.min-w-0 { min-width: 0; }
.min-w-240 { min-width: 240px; }

/* Flexbox utilities */
.flex-display { display: flex; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.flex-end { align-items: flex-end; }
.flex-gap-10 { gap: 10px; }
.flex-gap-12 { gap: 12px; }
.flex-gap-16 { gap: 16px; }
.flex-align-center { align-items: center; }
.flex-space-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-3 { flex: 3; }
.gap-20 { gap: 20px; }

/* Display utilities */
.inline { display: inline; }
.inline-block { display: inline-block; }
.display-none { display: none; }
.hidden { display: none !important; }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.nowrap { white-space: nowrap; }
.font-mono { font-family: monospace; }
.small { font-size: 13px; }
.tiny { font-size: 11px; }

/* Color utilities */
.color-muted { color: #6b7280; }
.muted { color: #6b7280; }

/* Component styles */
.ok {
    background: #e5f7e8;
    border: 1px solid #b5e4bd;
    padding: 10px 12px;
    border-radius: 8px;
    color: #216131;
    font-size: 13px;
}

.hint {
    color: #666;
}

/* ============= FOOTER ============= */

.footer {
    background-color: var(--dark-gray);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.footer-social-links a:hover {
    opacity: 1;
    transform: scale(1.2);
}

.footer-social-links svg {
    width: 100%;
    height: 100%;
}

.footer-text {
    font-size: 14px;
    color: #aaa;
}

/* ============= RESPONSIVE DESIGN ============= */

/* Mobile-optimized participant table */
@media (max-width: 768px) {
    /* Hide bulk actions bar on mobile */
    .bulk-actions-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .bulk-actions-bar button {
        margin-left: 0;
        width: 100%;
    }

    /* Convert participant table to cards */
    .section table {
        border: 0;
    }

    .section table thead {
        display: none;
    }

    .section table tbody {
        display: block;
    }

    .section table tbody tr.participant-row {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 12px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .section table tbody tr.participant-row td {
        display: block;
        text-align: left;
        padding: 6px 0;
        border: none;
    }

    .section table tbody tr.participant-row td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 100px;
        color: var(--primary-color);
    }

    /* Hide checkbox column label on mobile, show inline */
    .section table tbody tr.participant-row td.col-checkbox {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 0;
    }

    .section table tbody tr.participant-row td.col-checkbox::before {
        display: none;
    }

    /* Hide index column on mobile */
    .section table tbody tr.participant-row td.col-index {
        display: none;
    }

    /* Keep other tables normal (summary tables, team tables, etc.) */
    .table-card table:not(.section table) thead,
    .admin-card table:not(.section table) thead {
        display: table-header-group;
    }

    .table-card table:not(.section table) tbody,
    .admin-card table:not(.section table) tbody {
        display: table-row-group;
    }

    .table-card table:not(.section table) tbody tr,
    .admin-card table:not(.section table) tbody tr {
        display: table-row;
    }

    .table-card table:not(.section table) td,
    .admin-card table:not(.section table) td {
        display: table-cell;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container,
    .wrap {
        margin: 20px auto;
        padding: 20px;
        width: calc(100% - 40px);
        border-radius: 0;
    }

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

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

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

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

    h1,
    .page-title {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    .grid,
    .scholarship-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card,
    .scholarship-card {
        padding: 18px;
    }

    .card ul,
    .scholarship-card ul {
        padding-left: 28px;
        margin-left: 4px;
    }

    .card li,
    .scholarship-card li {
        margin-bottom: 8px;
    }

    .form-row {
        flex-direction: column;
        gap: 4px;
    }

    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions button,
    .form-actions input[type="submit"],
    .form-actions .btn {
        width: 100%;
    }

    button,
    input[type="submit"] {
        padding: 10px 16px;
        font-size: 14px;
    }

    table {
        font-size: 12px;
    }

    /* Events table mobile responsive */
    .events-table .hide-mobile {
        display: none !important;
    }

    .events-table .show-mobile {
        display: block !important;
    }

    .events-table thead th:first-child {
        width: 40%;
    }

    .events-table thead th[colspan="2"] {
        width: 60%;
    }

    .events-table tbody td {
        padding: 12px 8px;
    }

    .event-name-cell {
        min-width: 150px;
    }

    .registration-cell {
        padding: 12px 6px !important;
    }

    .btn-sm {
        padding: 7px 12px;
        font-size: 13px;
        display: block;
        margin: 4px auto;
    }

    .event-status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .rotation-layout {
        flex-direction: column;
        gap: 12px;
    }

    .rotation-side {
        min-width: 100%;
    }

    .squad-table {
        min-width: 500px;
        font-size: 0.7rem;
    }

    .squad-table th,
    .squad-table td {
        padding: 3px 4px;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .container,
    .wrap {
        margin: 10px auto;
        padding: 12px;
        width: calc(100% - 24px);
    }

    .revenue-cards-grid,
    .revenue-totals-grid {
        grid-template-columns: 1fr;
    }

    .participant-summary-grid,
    .noshow-stats-grid {
        grid-template-columns: 1fr;
    }

    h1,
    .page-title {
        font-size: 18px;
    }

    h2 {
        font-size: 16px;
    }

    h3 {
        font-size: 14px;
    }

    .card,
    .scholarship-card {
        padding: 14px;
    }

    button,
    input[type="submit"] {
        padding: 8px 12px;
        font-size: 13px;
    }

    table {
        font-size: 11px;
    }

    .table th,
    .table td {
        padding: 6px 4px;
    }

    .squad-table {
        min-width: 450px;
        font-size: 0.65rem;
    }

    .squad-table th,
    .squad-table td {
        padding: 2px 3px;
    }
}

/* Print styles */
@media print {
    .no-print,
    .search-filter-controls,
    .quick-nav-controls,
    .page-actions,
    header,
    nav,
    .admin-nav,
    button:not(.participant-row button) {
        display: none !important;
    }

    body {
        background: white;
        font-size: 10pt;
    }

    .wrap,
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    h1 {
        font-size: 18pt;
        page-break-after: avoid;
        margin-bottom: 10pt;
    }

    h2 {
        font-size: 14pt;
        page-break-after: avoid;
        margin-top: 15pt;
        margin-bottom: 8pt;
    }

    h3 {
        font-size: 12pt;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
        page-break-inside: avoid;
    }

    table thead {
        display: table-header-group;
    }

    table tr {
        page-break-inside: avoid;
    }

    table th,
    table td {
        border: 1px solid #000;
        padding: 4pt;
    }

    .section {
        page-break-inside: avoid;
        margin-bottom: 15pt;
    }

    .participant-summary-grid,
    .rotation-capacity-grid,
    .noshow-stats-grid {
        page-break-inside: avoid;
    }

    .card,
    .admin-card {
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }
}
/* ============================================================
   MOBILE RESPONSIVENESS ENHANCEMENTS
   ============================================================ */

/* Tablets and smaller (768px and below) */
@media (max-width: 768px) {
    /* Form rows stack vertically */
    .form-row {
        flex-direction: column;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .form-row label {
        margin-bottom: 5px;
        width: 100%;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100% !important;
    }
    
    /* Admin filters wrap and stack */
    .admin-filters,
    .filter-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .admin-filters > div,
    .filter-row > div {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    /* Tables become more condensed */
    table.squad-table,
    table.leaderboard-table,
    table.admin-table {
        font-size: 13px;
    }
    
    table.squad-table th,
    table.squad-table td,
    table.leaderboard-table th,
    table.leaderboard-table td {
        padding: 8px 4px;
    }
    
    /* Button groups stack vertically */
    .btn-group,
    .button-group,
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn,
    .btn-group button,
    .btn-group a,
    .button-group .btn,
    .button-group button,
    .action-buttons .btn,
    .action-buttons button {
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    
    /* Cards stack */
    .card-grid,
    .admin-card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Navigation stacks */
    .header-nav,
    .admin-nav-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-nav a,
    .admin-nav-links a {
        padding: 12px 15px;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Stats grids become single column */
    .stats-grid,
    .summary-grid,
    .participant-summary-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reduce padding in containers */
    .wrap,
    .container {
        padding: 15px;
    }
    
    .card,
    .admin-card {
        padding: 15px;
    }
    
    /* Make touch targets larger (min 44px) */
    button,
    .btn,
    a.btn,
    input[type="submit"],
    input[type="button"],
    select,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Checkboxes and radios need touch spacing */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin: 12px;
    }
    
    /* Admin header adjustments */
    .admin-topbar {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .admin-topbar h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    /* Pagination stacks */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination a,
    .pagination span {
        margin: 2px;
        padding: 8px 12px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    /* Even smaller tables */
    table.squad-table,
    table.leaderboard-table,
    table.admin-table {
        font-size: 12px;
    }
    
    /* Hide less important columns on very small screens */
    .hide-mobile {
        display: none !important;
    }
    
    /* Headings scale down */
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    
    /* Buttons full width */
    .btn,
    button,
    input[type="submit"],
    input[type="button"] {
        width: 100%;
        margin: 5px 0;
    }
    
    /* Reduce card margins */
    .card,
    .admin-card {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    /* Stats cards more compact */
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px !important;
    }
    
    .stat-label {
        font-size: 11px !important;
    }
    
    /* Search boxes full width */
    .search-box input,
    input[type="search"],
    input[type="text"] {
        width: 100% !important;
    }
    
    /* Modal dialogs take full screen on mobile */
    .modal-content {
        width: 95vw;
        max-width: 95vw;
        margin: 10px auto;
    }
}

/* Landscape orientation specific fixes */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .card,
    .admin-card {
        padding: 10px 15px;
        margin-bottom: 10px;
    }
    
    .form-row {
        margin-bottom: 10px;
    }
    
    /* Tables can be slightly wider in landscape */
    table.squad-table,
    table.leaderboard-table {
        font-size: 12px;
    }
}

/* Print-specific mobile adjustments */
@media print and (max-width: 768px) {
    /* Ensure tables print readably on mobile */
    table {
        font-size: 10pt;
    }
    
    /* Remove mobile-specific hiding for print */
    .hide-mobile {
        display: table-cell !important;
    }
}

/* High DPI screens (Retina displays) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure icons and images look sharp */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==========================================================================
   HELP WIDGET - Green Floating Button Style
   ========================================================================== */

/* Help Toggle Button - Bottom Right Floating */
.help-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: fixed;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: fixed;
    overflow: hidden;
}

.help-toggle-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    display: block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") no-repeat center / 24px 24px;
}

.help-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.6);
}

.help-toggle-btn svg {
    display: none;
}

/* Admin Help Widget */
.admin-help-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.admin-help-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.admin-help-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.6);
}

.admin-help-toggle-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    display: block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") no-repeat center / 24px 24px;
}

.admin-help-toggle-btn svg {
    display: none;
}

.admin-help-drawer {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 420px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-help-drawer.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.admin-help-drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-help-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.admin-help-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.admin-help-close-btn:hover {
    opacity: 0.8;
}

.admin-help-close-btn svg {
    width: 20px;
    height: 20px;
}

.admin-help-search-container {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.admin-help-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.admin-help-search-input:focus {
    outline: none;
    border-color: #28a745;
}

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

.admin-help-topic h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.admin-help-summary-text {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.admin-help-bullets h5,
.admin-help-faq h5 {
    margin: 16px 0 10px 0;
    color: #444;
    font-size: 14px;
    font-weight: 600;
}

.admin-help-bullets ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.admin-help-bullets li {
    margin-bottom: 8px;
}

.admin-help-bullets-html,
.admin-help-bullets-html p,
.admin-help-bullets-html ul,
.admin-help-bullets-html ol,
.admin-help-bullets-html li {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.admin-help-faq-items {
    margin-top: 10px;
}

.admin-help-faq-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.admin-help-faq-question {
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.admin-help-faq-question:hover {
    background-color: #e9ecef;
}

.admin-help-faq-question svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.admin-help-faq-question.active svg {
    transform: rotate(180deg);
}

.admin-help-faq-answer {
    padding: 12px 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    background: white;
}

.admin-help-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-help-search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.admin-help-search-result-item:hover {
    background-color: #f8f9fa;
}

.admin-help-search-result-item:last-child {
    border-bottom: none;
}

.admin-help-search-result-title {
    font-weight: 600;
    color: #28a745;
    font-size: 14px;
    margin-bottom: 4px;
}

.admin-help-search-result-summary {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.admin-help-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.admin-help-empty-small {
    font-size: 12px;
    color: #bbb;
}

/* Help Drawer - Popup from Bottom */
.help-drawer {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-drawer.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Help Drawer Header */
.help-drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.help-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.help-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.help-close-btn:hover {
    opacity: 0.8;
}

.help-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Search Container */
.help-search-container {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.help-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.help-search-input:focus {
    outline: none;
    border-color: #28a745;
}

/* Help Content Area */
.help-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.help-topic h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.help-summary {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.help-bullets h5,
.help-faq h5 {
    margin: 16px 0 10px 0;
    color: #444;
    font-size: 14px;
    font-weight: 600;
}

.help-bullets,
.help-bullets p,
.help-bullets ul,
.help-bullets ol,
.help-bullets li {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

.help-bullets ul {
    margin: 0;
    padding-left: 20px;
}

.help-bullets ol {
    margin: 0;
    padding-left: 20px;
}

.help-bullets li {
    margin-bottom: 8px;
}

/* FAQ Items */
.help-faq-items {
    margin-top: 10px;
}

.help-faq-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.help-faq-question {
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.help-faq-question:hover {
    background-color: #e9ecef;
}

.help-faq-question svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.help-faq-item.open .help-faq-question svg {
    transform: rotate(180deg);
}

.help-faq-answer {
    padding: 12px 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    background: white;
}

/* Search Results */
.help-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.help-search-result-item:hover {
    background-color: #f8f9fa;
}

.help-search-result-item:last-child {
    border-bottom: none;
}

.help-search-result-title {
    font-weight: 600;
    color: #28a745;
    font-size: 14px;
    margin-bottom: 4px;
}

.help-search-result-snippet {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.help-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .help-drawer {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
        max-width: 380px;
    }
    
    .help-toggle-btn {
        right: 10px;
        bottom: 10px;
        width: 50px;
        height: 50px;
    }
    
    .help-toggle-btn svg {
        width: 20px;
        height: 20px;
        stroke: white;
        fill: none;
        stroke-width: 2;
    }
}
}

/* ===== Modal Styles ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: auto;
}

.modal {
    position: relative;
    background-color: white;
    margin: 30px auto;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.modal-header > div:first-child {
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 16px 20px;
    max-height: 70vh;
    overflow-y: auto;
}

#refundModalTitle {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

#refundModalSubtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

.refund-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.refund-history-table thead {
    background-color: #f5f5f5;
    font-weight: bold;
}

.refund-history-table th {
    padding: 10px 8px;
    text-align: left;
    border: 1px solid #ddd;
    font-weight: bold;
}

.refund-history-table td {
    padding: 8px;
    border: 1px solid #ddd;
    word-break: break-word;
}

.refund-history-table tbody tr:hover {
    background-color: #f9f9f9;
}