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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.logo {
    height: 32px;
    width: auto;
    margin: 0;
    padding: 0;
}

.logo-inverted {
    filter: invert(100%) !important;
}

.logo-fallback {
    font-size: 1.5rem;
    line-height: 1;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: #3498db;
}

#user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.container {
    margin: 2rem auto;
    padding: 0 2rem;
    max-width: 100%;
}

/* Remove width constraint for compositions page specifically */
.compositions-page {
    max-width: none;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

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

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fafbfc;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

.alert {
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #f5c2c0;
    color: #c0392b;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-card h2 {
    margin-bottom: 1rem;
}

.dashboard-card p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    margin-bottom: 1rem;
}

.info-section ul {
    margin-left: 2rem;
}

.info-section li {
    margin-bottom: 0.5rem;
}

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

.resource-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.resource-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.resource-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.resource-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.resource-item .btn {
    align-self: flex-start;
}

/* Compositions page */
.compositions-page h1,
.concerts-page h1 {
    margin-bottom: 1rem;
}

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

/* Compositions Container with Sidebar */
.compositions-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Keyword Filter Sidebar */
.keyword-filter-sidebar {
    flex: 0 0 200px;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    position: sticky;
    top: 100px;
}

.keyword-filter-sidebar h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ecf0f1;
}

.keyword-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.keyword-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keyword-checkbox:hover {
    background-color: #f8f9fa;
}

.keyword-checkbox input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.keyword-checkbox span {
    font-size: 0.9rem;
    color: #2c3e50;
    user-select: none;
}

.sidebar-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 1.5rem 0;
}

.sidebar-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.sidebar-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.no-keywords {
    color: #95a5a6;
    font-style: italic;
    font-size: 0.9rem;
}

/* Main Content Area */
.compositions-main-content {
    flex: 1;
    min-width: 0;
}

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filters input[type="text"] {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background: white;
}

.filters label {
    font-weight: 600;
    color: #2c3e50;
}

.filters select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    min-width: 140px;
    background: white;
}

/* Optimized card grid - wider cards for better layout */
.compositions-grid,
.concerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}

/* Reduce columns on medium screens */
@media (max-width: 1200px) {
    .compositions-grid,
    .concerts-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Single column on small screens */
@media (max-width: 768px) {
    .compositions-grid,
    .concerts-grid {
        grid-template-columns: 1fr;
    }
}

.composition-card,
.concert-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 480px;
}

.composition-card:hover,
.concert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.composition-card h3,
.concert-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.4;
    max-height: 3.5em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composition-card p,
.concert-card p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Content area that expands to fill available space */
.composition-card .card-content,
.concert-card .card-content {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #ecf0f1;
    border-radius: 20px;
    font-size: 0.85rem;
}

.division-badge {
    background-color: #3498db;
    color: white;
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
}

.pagination #page-info {
    font-weight: 600;
    color: #2c3e50;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.links-section {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid #ecf0f1;
    border-bottom: 1px solid #ecf0f1;
}

.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    border-radius: 4px;
    background-color: #f0f0f0;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.link-icon:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

/* Card action buttons - 4 buttons in one row at bottom */
.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
    justify-content: space-between;
    flex-wrap: wrap;
}

.card-actions button {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    white-space: normal;
    word-wrap: break-word;
}

.card-actions .btn-danger {
    flex: 1;
}

/* Full-width button variant */
.btn-full-width {
    width: 100%;
    margin-top: 0.5rem;
}

/* External links container - Visit buttons in horizontal row with wrapping */
.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.btn-visit {
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    overflow-y: auto;
    padding: 80px 1rem 2rem 1rem;
}

.modal.show {
    display: flex;
}

/* Add composition modal should be on top */
#composition-modal {
    z-index: 2000;
}

#composition-detail-modal {
    z-index: 1500;
}

#add-composition-modal {
    z-index: 2000;
}

#concert-detail-modal {
    z-index: 1500;
}

#reorder-modal,
#program-modal {
    z-index: 2200;
}

#reorder-modal .modal-content,
#program-modal .modal-content {
    z-index: 2201;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: relative;
    margin: 0 0 2rem 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-content.wide {
    max-width: 1100px;
}

.form-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #f5f7fa 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-section h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.form-section-full {
    grid-column: 1 / -1;
}

.form-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: all;
    border-left: 4px solid #3498db;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    font-weight: bold;
}

.toast-content {
    flex: 1;
    color: #2c3e50;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #7f8c8d;
}

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

/* Confirmation Modal */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.confirm-modal {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.confirm-modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.confirm-modal-body {
    color: #34495e;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #95a5a6;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
}

.close:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Concert detail */
.concert-detail {
    margin-top: 2rem;
}

.detail-info {
    background: #ecf0f1;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.detail-info p {
    margin-bottom: 0.5rem;
}

.compositions-section,
.ratings-section,
.comments-section {
    margin-bottom: 2rem;
}

.compositions-section h3,
.ratings-section h3,
.comments-section h3 {
    margin-bottom: 1rem;
}

.composition-item {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.composition-item p {
    margin: 0;
}

.comment-item {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.comment-item p {
    margin-bottom: 0.5rem;
}

.comment-item p:first-child {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.add-comment {
    margin-top: 1rem;
}

.add-comment textarea {
    margin-bottom: 0.5rem;
}

/* Composition Selector */
.composition-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.filter-section {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
}

.filter-section input {
    flex: 1;
}

.filter-section select {
    flex: 1;
}

.available-compositions,
.selected-compositions {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.available-compositions h3,
.selected-compositions h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.available-comp-item,
.selected-comp-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #3498db;
}

.available-comp-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comp-info {
    flex: 1;
}

.comp-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.comp-info small {
    display: block;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.selected-comp-item {
    border-left-color: #27ae60;
}

#selected-total-duration {
    margin-top: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.modal-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

/* Length Input Group */
.length-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.length-input-group > div {
    display: flex;
    flex-direction: column;
}

.length-input-group label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.length-input-group input[type="number"],
.length-input-group input[type="text"] {
    padding: 0.5rem;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .filters {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .compositions-container {
        flex-direction: column;
    }

    .keyword-filter-sidebar {
        flex: 1;
        width: 100%;
        position: static;
        max-height: 300px;
    }

    .compositions-main-content {
        width: 100%;
    }

    .compositions-grid,
    .concerts-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .filters input,
    .filters select {
        min-width: auto;
        width: 100%;
    }

    .composition-selector {
        grid-template-columns: 1fr;
    }

    .available-compositions,
    .selected-compositions {
        max-height: 400px;
    }
}

/* Users page */
.users-page {
    padding: 2rem 0;
}

.users-table-element {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.users-table-element thead {
    background-color: #2c3e50;
    color: white;
}

.users-table-element th,
.users-table-element td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.users-table-element tbody tr:hover {
    background-color: #f9f9f9;
}

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

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

.admin-badge {
    background-color: #27ae60;
    color: white;
    font-weight: 600;
}

/* Concert Detail Page */
.concert-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.back-btn {
    font-size: 1rem;
}

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

.concert-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.concert-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.concert-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.concert-info p {
    font-size: 1.1rem;
    color: #555;
}

.concert-notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.concert-notes p {
    color: #666;
    line-height: 1.6;
}

.concert-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

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

.compositions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.composition-item {
    background: linear-gradient(to right, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 5px solid #3498db;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    align-items: flex-start;
}

.composition-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-left-color: #2980b9;
}

.comp-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
    justify-content: flex-start;
}

.comp-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.composition-item .comp-info {
    flex: 1;
    text-align: left;
}

.composition-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
    color: #2c3e50;
    text-align: left;
}

.comp-meta {
    margin: 0.25rem 0;
    color: #555;
    font-size: 1rem;
    text-align: left;
}

.comp-details {
    margin: 0.25rem 0 0 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-align: left;
}

.comp-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.toggle-comp-comments {
    background-color: #95a5a6;
    color: white;
}

.toggle-comp-comments:hover {
    background-color: #7f8c8d;
}

/* Composition Comments Section */
.comp-comments-section {
    margin-top: 1rem;
    padding: 1.25rem;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e3e8ed;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comp-comments-list {
    margin-bottom: 1rem;
}

.comp-comments-list .comment-item {
    background: #ffffff;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 3px solid #9b59b6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.comp-comments-list .comment-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.comp-comments-list .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f0f0f0;
}

.comp-comments-list .comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.comp-comments-list .comment-date {
    font-size: 0.8rem;
    color: #95a5a6;
}

.comp-comments-list .comment-text {
    margin: 0;
    color: #34495e;
    line-height: 1.5;
    font-size: 0.9rem;
}

.comp-comments-list .empty-message,
.comp-comments-list .loading-message,
.comp-comments-list .error-message {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    background: white;
    border-radius: 6px;
}

.comp-comments-list .error-message {
    color: #e74c3c;
    background: #fef5f5;
}

.add-comp-comment {
    padding-top: 1rem;
    border-top: 1px solid #e3e8ed;
    margin-top: 0.5rem;
}

.add-comp-comment textarea {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e3e8ed;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.2s;
    background: white;
}

.add-comp-comment textarea:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.empty-message {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Rating Display */
.rating-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.rating-score {
    font-size: 3rem;
    font-weight: bold;
    color: #f39c12;
    min-width: 80px;
    text-align: center;
}

.rating-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-stars {
    font-size: 1.5rem;
    color: #f39c12;
    letter-spacing: 0.1rem;
}

.rating-info p {
    margin: 0;
    color: #7f8c8d;
}

/* Comments Section */
.comments-container {
    transition: all 0.3s ease;
}

.toggle-comments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ecf0f1;
    color: #2c3e50;
}

.toggle-comments:hover {
    background: #d5dbdb;
}

#toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.comment-item {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #3498db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateX(2px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.85rem;
    color: #95a5a6;
}

.comment-text {
    margin: 0;
    color: #34495e;
    line-height: 1.6;
    font-size: 0.95rem;
}

.add-comment {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.add-comment textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.875rem;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.2s;
    background: #fafbfc;
}

.add-comment textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

/* Responsive adjustments for concert detail page */
@media (max-width: 768px) {
    .concert-detail-page {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .concert-header h1 {
        font-size: 1.8rem;
    }

    .concert-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .composition-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .comp-header {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .comp-number {
        align-self: flex-start;
    }

    .comp-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .rating-display {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Composer/Arranger Autocomplete Styles */
.composer-select-wrapper,
.arranger-select-wrapper,
.parent-composition-select-wrapper {
    position: relative;
}

.composer-select-wrapper input,
.arranger-select-wrapper input,
.parent-composition-select-wrapper input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

.composer-select-wrapper input:focus,
.arranger-select-wrapper input:focus,
.parent-composition-select-wrapper input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #dfe6e9;
    border-top: none;
    border-radius: 0 0 6px 6px;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #ecf0f1;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #3498db;
    color: white;
    padding-left: 1rem;
}

.suggestion-item.new-item {
    background-color: #e8f8f5;
    color: #27ae60;
    font-weight: 500;
}

.suggestion-item.new-item:hover,
.suggestion-item.new-item.selected {
    background-color: #27ae60;
    color: white;
}

/* Composers Page Styles */
.composers-page {
    padding: 0;
}

.composers-page h1 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.composers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* Reduce columns on medium screens */
@media (max-width: 1200px) {
    .composers-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Single column on small screens */
@media (max-width: 768px) {
    .composers-grid {
        grid-template-columns: 1fr;
    }
}

.composer-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

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

.composer-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.composer-card p {
    margin: 0.5rem 0;
    color: #555;
    font-size: 0.95rem;
}

/* Content area that expands to fill space */
.composer-card .card-content {
    flex: 1;
}

.filters {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 0.75rem;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    font-size: 0.95rem;
    flex: 1;
    min-width: 200px;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

#page-info {
    font-weight: 600;
    color: #2c3e50;
    min-width: 100px;
    text-align: center;
}

.actions {
    margin-bottom: 1.5rem;
}

/* Versioning Modal Styles */
.version-current-info {
    background: #ecf0f1;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.version-current-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.version-current-info p {
    margin: 0.25rem 0;
    color: #7f8c8d;
}

.version-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.version-action-section {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
}

.version-action-section h4 {
    margin: 0 0 0.75rem 0;
    color: #34495e;
}

.version-search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.version-search-result-item {
    padding: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: background 0.2s;
}

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

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

.version-search-result-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.version-search-result-composer {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.version-search-result-meta {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.version-list-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    margin-bottom: 0.5rem;
}

.parent-chain-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-left: 3px solid #e74c3c;
    margin-bottom: 0.5rem;
}

.depth-0 { margin-left: 0; }
.depth-1 { margin-left: 1rem; }
.depth-2 { margin-left: 2rem; }
.depth-3 { margin-left: 3rem; }
.depth-4 { margin-left: 4rem; }
.depth-5 { margin-left: 5rem; }
/* CSS Utility Classes for CSP Compliance */

/* Dynamic logo height using CSS variables */
.navbar-logo {
    height: var(--logo-height, 32px) !important;
}

/* Hidden utility class replaces display:none */
.hidden {
    display: none !important;
}

/* Admin-only links - hidden by default */
.admin-only {
    display: none !important;
}

/* Show admin links when needed (controlled via JavaScript) */
.admin-only.visible {
    display: inline !important;
}

/* Helper classes for display toggles */
.visible {
    display: block !important;
}

.inline {
    display: inline !important;
}

.inline-flex {
    display: inline-flex !important;
}

.flex {
    display: flex !important;
}

.w-100 { width: 100%; }
.p-half { padding: 0.5rem; }
.p-1 { padding: 1rem; }
.mb-half { margin-bottom: 0.5rem; }
.mt-half { margin-top: 0.5rem; }
.mb-quarter { margin-bottom: 0.25rem; }
.block { display: block; }
.bg-light { background-color: #ecf0f1; }
.text-muted { color: #666; }
.text-muted-secondary { color: #95a5a6; }
.text-error { color: #e74c3c; }
.fs-90 { font-size: 0.9rem; }
.fs-110 { font-size: 1.1em; }
.cursor-default { cursor: default; }
.m-vertical-15 { margin: 15px 0; }
.m-vertical-20 { margin: 20px 0; }
.mt-2rem { margin-top: 2rem; }
.mb-1rem { margin-bottom: 1rem; }
.p-12 { padding: 12px; }
.p-10 { padding: 10px; }
.list-indent { margin: 8px 0 0 0; padding-left: 20px; }

.box-success {
    background: #e8f5e9;
    border-left: 4px solid #27ae60;
    border-radius: 4px;
}

.box-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
}

.box-muted {
    background: #f0f0f0;
    border-radius: 4px;
}

.comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.grid {
    display: grid !important;
}

/* Common responsive grid patterns */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-2-col-auto {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

/* Modal and overlay utilities */
.modal.active {
    display: block !important;
}

/* Allow either .active or .show for modals */
.modal.show {
    display: block !important;
}

/* Default modal state */
.modal {
    display: none !important;
}

/* Suggestions list default hidden */
.suggestions-list {
    display: none !important;
    max-height: 200px;
    overflow-y: auto;
}

.suggestions-list.active {
    display: block !important;
}

/* Common hint/helper text styling */
.hint-text {
    color: #666;
    margin-top: 4px;
    display: block;
    font-size: 0.9rem;
}

/* Readonly input styling */
.input-readonly {
    background-color: #ecf0f1 !important;
}

/* Common flex containers */
.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.flex-column.gap-half {
    gap: 0.5rem;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

/* Text styling */
.text-italic {
    font-style: italic;
}

.text-small {
    font-size: 0.9rem;
}

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

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

.text-muted {
    color: #7f8c8d;
}

/* Spacing utilities */
.mt-half {
    margin-top: 0.5rem;
}

.mb-half {
    margin-bottom: 0.5rem;
}

.p-half {
    padding: 0.5rem;
}

/* Border utilities */
.border-top {
    border-top: 1px solid #ddd;
}

.border-bottom {
    border-bottom: 1px solid #ddd;
}

/* Layout utilities */
.flex-layout {
    display: flex;
}

.flex-layout-gap {
    display: flex;
    gap: 2rem;
}

.gap-half {
    gap: 0.5rem;
}

.gap-1rem {
    gap: 1rem;
}

.gap-2rem {
    gap: 2rem;
}

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

/* Form field utilities */
.label-small {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.input-readonly {
    background-color: #ecf0f1 !important;
}

/* Button utilities */
.min-width-70px {
    min-width: 70px;
}

.btn-full-width {
    width: 100%;
}

/* Hint and helper text */
.hint-text {
    color: #666;
    margin-top: 4px;
    display: block;
    font-size: 0.9rem;
}

/* Cursor utilities */
.cursor-pointer {
    cursor: pointer;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: #3498db;
    color: white;
    border-radius: 16px;
    font-size: 0.9rem;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
}

/* Color utilities */
.color-white {
    color: white;
}

.bg-light-gray {
    background-color: #f0f0f0;
}

.bg-blue {
    background: #3498db;
}

/* Padding utilities */
.p-0 {
    padding: 0;
}

.p-half {
    padding: 0.5rem;
}

.p-1rem {
    padding: 1rem;
}

/* Margin utilities */
.m-0 {
    margin: 0;
}

.m-half {
    margin: 0.5rem;
}

.m-1rem {
    margin: 1rem;
}

/* Font family utilities */
.font-serif {
    font-family: Georgia, serif;
}

.font-italic {
    font-style: italic;
}

/* Print utilities */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block;
    }
    
    .no-print {
        display: none;
    }
}
