﻿/* pbnoter.se - Music Score Library Styles */

:root {
    --primary-color: #2c5282;
    --primary-dark: #1a365d;
    --primary-light: #4299e1;
    --accent-color: #ed8936;
    --success-color: #48bb78;
    --danger-color: #e53e3e;
    --warning-color: #ecc94b;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    font-size: 28px;
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.user-info .user-name {
    font-weight: 500;
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: var(--bg-color);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

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

.btn-success:hover {
    background: #38a169;
}

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

.btn-danger:hover {
    background: #c53030;
}

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

.btn-secondary:hover {
    background: #4a5568;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
}

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

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 13px;
}

select.form-control {
    cursor: pointer;
}

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

/* Tables */
.table-container {
    overflow-x: auto;
}

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

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

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table .actions {
    white-space: nowrap;
}

/* Score Library Specific Styles */
.score-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.score-selector select {
    min-width: 300px;
}

.score-info {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.score-info-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 15px;
}

.score-info-label {
    font-weight: 600;
    color: var(--text-light);
}

.score-info-value {
    color: var(--text-color);
}

.score-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.score-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Instrument Categories */
.instrument-category {
    margin-bottom: 5px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
}

.category-header .category-name {
    flex: 1;
}

.category-files {
    padding-left: 30px;
    margin-top: 5px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.file-link {
    flex: 1;
    color: var(--primary-color);
    text-decoration: none;
}

.file-link:hover {
    text-decoration: underline;
}

.btn-upload {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.2s;
}

.btn-upload:hover {
    color: var(--primary-color);
}

.btn-delete {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-delete:hover {
    opacity: 1;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

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

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

.login-logo h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 28px;
}

.login-logo p {
    color: var(--text-light);
    margin: 5px 0 0;
}

.login-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
}

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

.calendar-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.calendar-nav button:hover {
    background: rgba(255,255,255,0.3);
}

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

.calendar-day-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.calendar-day.other-month {
    background: #f8f8f8;
    color: var(--text-light);
}

.calendar-day.today {
    background: #ebf8ff;
}

.calendar-date {
    font-weight: 600;
    margin-bottom: 5px;
}

.calendar-event {
    background: var(--primary-light);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 3px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Member List */
.member-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}

.member-card:hover {
    box-shadow: var(--shadow);
}

.member-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 24px;
    flex-shrink: 0;
}

.member-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 3px;
}

.member-category {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 5px;
}

.member-contact {
    font-size: 13px;
    color: var(--text-color);
}

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

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

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
}

.alert-warning {
    background: #fefcbf;
    color: #975a16;
}

.alert-info {
    background: #bee3f8;
    color: #2b6cb0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .score-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .score-selector select {
        min-width: 100%;
    }
    
    .score-info-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-date {
        font-size: 12px;
    }
    
    .calendar-event {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* File upload styling */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary-light);
    background: #f0f7ff;
}

.file-upload-zone input[type="file"] {
    display: none;
}

.file-upload-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.file-upload-text {
    color: var(--text-color);
    margin-bottom: 5px;
}

.file-upload-hint {
    color: var(--text-light);
    font-size: 12px;
}

/* Progress bar */
.progress {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 15px 20px;
    text-align: center;
    font-size: 13px;
    margin-top: auto;
}

/* Audio Section */
.audio-section {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.audio-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
}

.audio-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.audio-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-title {
    font-weight: 500;
    color: var(--text-color);
}

.audio-item audio {
    width: 100%;
    max-width: 400px;
    height: 36px;
}

.no-audio {
    padding: 20px;
    text-align: center;
}

.no-audio p {
    margin: 0;
}
