/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #212529;
}

/* Layout Containers */
.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.navbar {
    background-color: #2d2d2d;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Main content container - 75% of nav width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Content sections - ensure they respect the container width */
.weekly-set,
.repertoire-section,
.admin-panel,
.tune-grid,
.set-grid {
    width: 100%;
    margin: 0 auto;
}



.repertoire-section > h1,
.weekly-set > h1,
.my-setlist > h1,
.available-tunes > h2 {
    color: #212529;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Navbar styles */
.navbar-gradient {
    height: 8px;
    width: 100%;
    background: linear-gradient(to right, #1D7445, #3BFC92);
    margin: 0;
    border: none;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #20864E;
    font-size: 1.25rem;
    font-weight: 600;
}

.shamrock-icon {
    margin-right: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2.5rem;
    flex: 0 0 auto;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

/* Logout button in navigation */
.logout-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Active state for navigation */
.nav-link.active {
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    width: 100%;
}

.nav-link:hover {
    color: #20864E;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.page-title {
    color: #20864E;
    font-size: 2rem;
    font-weight: 700;
}

/* Admin button */
.admin-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.admin-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.add-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.add-tune-btn {
    flex: 1;
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-tune-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #20864E;
    box-shadow: 0 0 0 3px rgba(32, 134, 78, 0.1);
}

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

.submit-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(32, 134, 78, 0.25);
}

/* Weekly Set Container & Headers */
.weekly-set {
    margin-bottom: 3rem;
}

.weekly-set > h1 {
    color: #20864E;
    font-size: 2.25rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.set-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

#setName {
    font-size: 1.75rem;
    color: #212529;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

/* Session Notes */
.session-notes {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    border-left: 4px solid #20864E;
}

.session-notes h3 {
    color: #212529;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

#sessionNotes {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* View All Button */
.set-actions {
    flex-shrink: 0;
}

.view-all-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.view-all-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Weekly Tunes List */
.weekly-tunes {
    margin-top: 2rem;
}

.weekly-tune-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    gap: 1rem;
    transition: all 0.2s ease;
}

.weekly-tune-item:hover {
    background: white;
    border-color: #20864E;
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.1);
}

.weekly-tune-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.weekly-tune-number {
    color: #666;
    font-weight: 500;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.weekly-tune-name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weekly-tune-type {
    color: #6c757d;
    font-size: 0.9375rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* PDF Link in Weekly Tunes */
.weekly-tunes .pdf-link {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.weekly-tunes .pdf-link:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

/* Repertoire Page Styles */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-filters-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2rem;
    width: 100%;
}

.search-box {
    flex: 2;
    min-width: 250px;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #212529;
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: none;
    transition: color 0.2s;
    line-height: 1;
}

.clear-search-btn:hover {
    color: #dc3545;
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 180px;
    height: 48px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-right: 0.5rem;
}

.filter-select {
    width: 100%;
    height: 48px;
    padding: 0 2.5rem 0 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: transparent;
    color: #212529;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-chevron {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.25rem;
    color: #6c757d;
}

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

.results-count {
    font-size: 0.9375rem;
    color: #6c757d;
    font-weight: 500;
}

.clear-search-inline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.clear-search-inline:hover {
    background: #f3f4f6;
    color: #212529;
    border-color: #9ca3af;
}

.view-toggle {
    display: flex;
    gap: 0;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.view-toggle-inline {
    display: flex;
    align-items: center;
    height: 48px;
    background: #e5e7eb;
    border-radius: 8px;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

.toggle-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    background: transparent;
    color: #495057;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    position: relative;
}

.toggle-btn:hover {
    color: #20864E;
}

.toggle-btn.active {
    background: #fff;
    color: #20864E;
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.10);
}

.toggle-btn:hover:not(.active) {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.toggle-btn:first-child {
    border-radius: 6px;
}

.toggle-btn:last-child {
    border-radius: 6px;
}

/* Tune Grid and Card Styles */
.tune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* Tune/Set Card Wrapper - Gray outer container */
.tune-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 10px 10px;
    gap: 12px;
    background: #EBEBEB;
    border-radius: 16px;
    height: 100%;
    min-height: 100%;
}

/* Card Header - metadata and type indicator */
.card-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px 8px;
    gap: 10px;
    align-self: stretch;
    flex-shrink: 0;
}

.card-metadata {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 6px;
}

/* Tag Badge - dot + text style */
.tag-badge {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 6px;
}

.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 100px;
}

.tag-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #282323;
}

.card-type-indicator {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 4px;
}

.type-icon {
    width: 16px;
    height: 16px;
}

.type-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #282323;
}

/* Inner white card */
.tune-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 24px;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 12px;
    align-self: stretch;
    flex: 1;
    min-height: 0;
}

/* Card Content */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;
    align-self: stretch;
    flex: 1;
}

.tune-title {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 100%;
    color: #000000;
    align-self: stretch;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tune-type {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: rgba(0, 0, 0, 0.4);
    align-self: stretch;
}

/* Divider between content and actions */
.card-divider {
    width: 100%;
    height: 0px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0;
    align-self: stretch;
    flex-shrink: 0;
}

/* Action Buttons */
.tune-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 0px;
    gap: 16px;
    align-self: stretch;
    flex-shrink: 0;
}

/* View PDF Button */
.pdf-link {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 10px;
    min-width: 88px;
    height: 38px;
    background: #FFFFFF;
    border: 1px solid #199953;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #199953;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.pdf-link:hover {
    background: #f0f9f4;
    border-color: #147a3f;
    color: #147a3f;
}

/* Add to Setlist Button */
.add-to-setlist-btn {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 10px;
    min-width: 112px;
    height: 38px;
    background: #199953;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.add-to-setlist-btn:hover:not(:disabled) {
    background: #147a3f;
}

.add-to-setlist-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Play Recording Button (when recording_url exists) */
.play-recording-btn {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 10px;
    min-width: 147px;
    height: 38px;
    background: #FFFFFF;
    border: 1px solid #199953;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #199953;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.play-recording-btn:hover {
    background: #f0f9f4;
    border-color: #147a3f;
    color: #147a3f;
}

.play-recording-btn svg {
    width: 14px;
    height: 14px;
    fill: #199953;
}

/* Legacy support for old structure */
.tune-info {
    flex: 1;
}

.tune-info h3 {
    margin: 0 0 0.5rem 0;
    color: #212529;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Legacy button styles for backwards compatibility */
.tune-actions .preview-btn,
.tune-actions button:not(.add-to-setlist-btn):not(.pdf-link) {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.625rem 1.125rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    flex: 1;
}

.tune-actions .preview-btn:hover,
.tune-actions button:not(.add-to-setlist-btn):not(.pdf-link):hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

/* Admin Panel Styles */
.admin-panel {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.admin-panel h1 {
    padding: 2rem 2rem 1rem 2rem;
    margin: 0;
    color: #1f2937;
    font-size: 1.75rem;
}

/* Admin Tabs - Modern horizontal style */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0 2rem;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.admin-tab-btn:hover {
    color: #20864E;
}

.admin-tab-btn.active {
    color: #20864E;
    border-bottom-color: #20864E;
    background: white;
}

/* Sub-tabs for nested navigation */
.sub-tabs {
    display: flex;
    gap: 0;
    background: #f9fafb;
    padding: 0.5rem 0 0 0;
    margin: 0 0 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sub-tab-btn {
    background: none;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.sub-tab-btn:hover {
    color: #20864E;
}

.sub-tab-btn.active {
    color: #20864E;
    border-bottom-color: #20864E;
}

.sub-tab-panel {
    display: none;
}

.sub-tab-panel.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

.admin-tab-content {
    padding: 2rem;
    min-height: 400px;
    background: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

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

.admin-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.admin-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-form label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.admin-form input[type="text"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.admin-form input[type="text"]:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #20864E;
    box-shadow: 0 0 0 3px rgba(32, 134, 78, 0.1);
}

.admin-form small {
    color: #6b7280;
    font-size: 0.8125rem;
    margin-top: -0.25rem;
}

/* Modern table styling */
#bulkFilesTable,
#manageTunesTable {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

#bulkFilesTable thead,
#manageTunesTable thead {
    background: #f9fafb;
}

#bulkFilesTable th,
#manageTunesTable th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

#bulkFilesTable td,
#manageTunesTable td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

#bulkFilesTable tbody tr:hover,
#manageTunesTable tbody tr:hover {
    background: #f9fafb;
}

#bulkFilesTable tbody tr:last-child td,
#manageTunesTable tbody tr:last-child td {
    border-bottom: none;
}

/* Table inputs */
.manage-tune-input,
.manage-tune-select,
.tune-name-input,
.tune-type-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.manage-tune-input:focus,
.manage-tune-select:focus,
.tune-name-input:focus,
.tune-type-select:focus {
    outline: none;
    border-color: #20864E;
}

/* Button styling */
.submit-btn,
.save-tune-btn {
    background: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover,
.save-tune-btn:hover {
    background: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(32, 134, 78, 0.25);
}

.delete-tune-btn,
.remove-bulk-file-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-tune-btn:hover,
.remove-bulk-file-btn:hover {
    background: #b91c1c;
}

.tune-selection {
    margin-top: 1rem;
}

.selected-tunes {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    min-height: 100px;
}

.add-tune-btn,
.add-set-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-tune-btn:hover,
.add-set-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

/* Tune Selection Modal Styles */
.tune-select-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
}

.tune-select-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tune-select-item:hover {
    background-color: #f5f5f5;
}

.tune-type-label {
    color: #666;
    font-size: 0.9rem;
}

/* Selected Tunes Styles */
.selected-tune-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
}

.selected-tune-item:active {
    cursor: grabbing;
}

.selected-tune-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.selected-tune-item:hover {
    background: white;
    border-color: #20864E;
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.1);
}

.tune-drag-handle {
    color: #adb5bd;
    margin-right: 1rem;
    cursor: grab;
    font-size: 1.25rem;
}

.selected-tune-item:active .tune-drag-handle {
    cursor: grabbing;
}

.selected-tune-info {
    flex-grow: 1;
}

.selected-tune-name {
    display: block;
    font-weight: 500;
}

.selected-tune-type {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.remove-tune-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.learn-by-ear-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    width: 100%;
    margin: 1rem 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.learn-by-ear-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(32, 134, 78, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-wrapper {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .nav-links {
        gap: 0.75rem;
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }

    .nav-link {
        font-size: 0.9375rem;
    }

    .admin-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .logo-link span {
        font-size: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .weekly-set > h1,
    .repertoire-section > h1,
    .my-setlist > h1,
    .available-tunes > h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    #setName {
        font-size: 1.375rem;
    }

    .set-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .set-actions {
        width: 100%;
    }

    .view-all-btn {
        width: 100%;
        text-align: center;
    }

    .view-toggle {
        gap: 0.5rem;
    }

    .toggle-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }    .weekly-tune-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .weekly-tune-info {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .weekly-tune-name {
        flex: 1;
        min-width: 0;
    }

    .weekly-tunes .pdf-link {
        width: 100%;
        text-align: center;
    }

    .session-notes {
        padding: 1rem;
    }

    .search-filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .tune-grid,
    .set-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .setlist-controls {
        flex-direction: column;
    }

    .view-setlist-btn,
    .clear-setlist-btn {
        width: 100%;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .admin-sections {
        gap: 1rem;
    }

    .admin-section {
        padding: 1rem;
    }

    .admin-tab-content {
        padding: 1.25rem;
    }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .weekly-set > h1,
    .repertoire-section > h1,
    .my-setlist > h1,
    .available-tunes > h2 {
        font-size: 1.5rem;
    }

    .tune-card {
        padding: 1.25rem;
    }

    .weekly-tune-info {
        flex-wrap: wrap;
    }

    .weekly-tune-type {
        width: 100%;
        margin-left: 2rem;
        margin-top: 0.25rem;
    }

    .setlist-controls {
        gap: 0.75rem;
    }

    .view-setlist-btn,
    .clear-setlist-btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.preview-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.preview-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.set-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.set-card:hover {
    box-shadow: 0 4px 12px rgba(32, 134, 78, 0.15);
    transform: translateY(-2px);
    border-color: #20864E;
}

.set-name {
    color: #20864E;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.set-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.set-tunes {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.set-tune-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

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

.view-set-pdf {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: auto;
}

.view-set-pdf:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.selected-tune-item.set-item {
    background-color: #f8f9fa;
    border-left: 3px solid #20864E;
}

.set-info {
    display: inline-block;
    font-size: 0.9rem;
    color: #20864E;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Session Playlist Styles */
.my-setlist {
    margin-bottom: 3rem;
}

.setlist-description {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.setlist-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-setlist-btn,
.clear-setlist-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.view-setlist-btn {
    background-color: #20864E;
    color: white;
}

.view-setlist-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.clear-setlist-btn {
    background-color: #dc3545;
    color: white;
}

.clear-setlist-btn:hover {
    background-color: #c82333;
}

.my-setlist-tunes {
    min-height: 100px;
}

.setlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-left: 4px solid #20864E;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.setlist-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(32, 134, 78, 0.15);
}

.setlist-number {
    font-weight: bold;
    color: #20864E;
    font-size: 1.2rem;
    min-width: 30px;
}

.setlist-tune-info {
    flex: 1;
}

.setlist-tune-info h4 {
    margin: 0 0 0.25rem 0;
    color: #212529;
    font-size: 1.125rem;
    font-weight: 600;
}

.setlist-tune-info .tune-type {
    color: #6c757d;
    font-size: 0.9375rem;
}

.remove-from-setlist {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.remove-from-setlist:hover {
    background-color: #c82333;
}

/* Available Tunes Section */
.available-tunes {
    margin-bottom: 3rem;
}

.available-tunes h2 {
    color: #20864E;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 2.25rem;
}

.tunes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tune-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tune-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tune-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.tune-card-header h3 {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
}

.tune-type-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.tune-card-actions {
    display: flex;
    gap: 0.5rem;
}

.add-to-setlist-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
}

.add-to-setlist-btn:hover {
    background-color: #186A3E;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32, 134, 78, 0.25);
}

.add-to-setlist-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.empty-message {
    text-align: center;
    color: #6c757d;
    padding: 3rem 2rem;
    font-style: italic;
    font-size: 1rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 180px;
    height: 48px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

/* Fixed Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2d2d2d;
    color: #ffffff;
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #ffffff;
}

/* Subtle admin link in footer - less prominent */
.footer-admin-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
    opacity: 0.6;
}

.footer-admin-link:hover {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

/* Legacy button style - kept for compatibility */
.footer-admin-btn {
    background-color: #20864E;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.footer-admin-btn:hover {
    background-color: #1a6d3f;
}

body {
    padding-bottom: 80px;
}
