@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;600&display=swap');

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

/* Fix for rotated images from smartphones - respects EXIF orientation */
img {
    image-orientation: from-image;
}

:root {
    /* Golden Brown Luxury Theme - Updated Jan 2, 2026 */
    --primary-color: #9a6b3d;      /* Golden brown */
    --secondary-color: #5a3a25;    /* Rich brown */
    --accent-color: #ffd700;       /* Gold */
    --success-color: #6D8B74;      /* Sage green */
    --danger-color: #c1121f;
    --light-gray: #faf7f1;         /* Light background */
    --border-gray: #e8dcd8;        /* Borders */
    --text-dark: #3E2723;          /* Dark espresso */
    --text-light: #5a3a25;         /* Brown text */
    --wood-dark: #2a1810;          /* Dark brown */
    --wood-medium: #9a6b3d;        /* Golden brown */
    --wood-warm: #7a4d2f;          /* Warm bronze */
}

body {
    font-family: 'Lato', sans-serif;
    background: #f5f1e8;           /* Updated to cream */
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

/* Navbar - consistent met publieke pagina's */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(93, 64, 55, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav-brand h1 {
    font-family: 'Playfair Display', serif;
    color: #5D4037;
    font-size: 24px;
    margin: 0;
}

.navbar .nav-links a {
    color: #3E2723;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    background: #5D4037;
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.header-section {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.header-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    margin-bottom: 10px;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(27, 67, 50, 0.3);
}

.header-section p {
    font-size: 18px;
    opacity: 0.95;
}

/* Stats Section - Compact */
.stats-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.15);
}

.stats-section h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 12px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.stat-card {
    background: linear-gradient(135deg, var(--wood-dark) 0%, var(--wood-medium) 100%);
    color: white;
    padding: 14px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(93, 64, 55, 0.25);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* Tabs - modern design */
.tabs-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.15);
    overflow: visible;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    background: #FAF8F5;
    border-bottom: 2px solid #D2B48C;
    padding: 8px 12px 0;
    gap: 3px;
}

.tab-btn {
    padding: 8px 14px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    margin-right: 2px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: white;
    color: #5D4037;
}

.tab-btn.active {
    background: white;
    color: #5D4037;
    border-bottom-color: #5D4037;
}

.tab-content {
    display: none;
    padding: 20px;
}

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

.tab-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 14px;
}
/* Table - moderne styling */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.1);
}

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

table thead {
    background: linear-gradient(135deg, #5D4037 0%, #6D4C41 100%);
}

table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

table tr:hover {
    background: #FAF8F5;
    transition: background 0.2s;
}

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

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

.badge-admin {
    background: linear-gradient(135deg, #c1121f 0%, #d62828 100%);
    color: white;
}

.badge-user {
    background: linear-gradient(135deg, #6D4C41 0%, #8B5A2B 100%);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
}

.badge-free {
    background: #e0e0e0;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.action-buttons.compact {
    gap: 2px;
}

/* Icon buttons voor compacte acties */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.btn-icon-danger:hover {
    background: #ffebee;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-view {
    background: linear-gradient(135deg, #5D4037 0%, #6D4C41 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.3);
}

/* Piano Grid in Admin */
.admin-piano-card {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(45, 106, 79, 0.15);
    transition: transform 0.3s;
}

.admin-piano-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 106, 79, 0.25);
}

.piano-owner {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.95) 0%, rgba(64, 145, 108, 0.95) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Forms - compact styling */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #D2B48C;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #CD853F;
    box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.15);
}

.form-group small {
    display: block;
    color: #6D4C41;
    font-size: 13px;
    margin-top: 5px;
}

/* Buttons - compact styling */
.btn, .btn-primary, .btn-secondary, .btn-success, .btn-danger {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #5D4037 0%, #6D4C41 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(93, 64, 55, 0.4);
}

.btn-secondary {
    background: #FAF8F5;
    color: #3E2723;
    border: 2px solid #D2B48C;
}

.btn-secondary:hover {
    background: #D2B48C;
}

.btn-success {
    background: linear-gradient(135deg, #6D4C41 0%, #8B5A2B 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(109, 76, 65, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #c1121f 0%, #d62828 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(193, 18, 31, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.success-message {
    background: linear-gradient(135deg, #FAF0E6 0%, #F5DEB3 100%);
    border: 2px solid #8B5A2B;
    color: #3E2723;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    border: 2px solid #d62828;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-section h1 {
        font-size: 32px;
    }

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

    .tabs {
        flex-direction: column;
        padding: 0;
    }

    .tab-btn {
        border-radius: 0;
        border-bottom: 1px solid #D2B48C;
        margin: 0;
    }

    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn, .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Piano Card Styling - consistent met index.html */
.piano-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.piano-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(45, 106, 79, 0.15);
    transition: all 0.3s;
}

.piano-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 106, 79, 0.25);
}

.piano-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    image-orientation: from-image;
}

.piano-content {
    padding: 20px;
}

.piano-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.piano-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.piano-tag {
    background: linear-gradient(135deg, #FAF8F5 0%, #FAF0E6 100%);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.piano-tag.categorie {
    background: linear-gradient(135deg, #CD853F 0%, #D2691E 100%);
    color: white;
}

/* No data message */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: white;
    font-size: 18px;
}

.no-data-card {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(45, 106, 79, 0.2);
    text-align: center;
}

.no-data-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 15px;
}

.no-data-card p {
    color: var(--text-light);
    font-size: 16px;
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 50%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 1rem auto;
    }
}

/* Mobiel landscape (max-width: 640px) */
@media (max-width: 640px) {
    .stats-section {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .tabs-section {
        border-radius: 6px;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Mobiel portret (max-width: 480px) */
@media (max-width: 480px) {
    .stats-section,
    .tabs-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        flex: 1 1 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-gray);
    }
    
    .tab-btn.active {
        border-left: 3px solid var(--accent-color);
        border-bottom-color: var(--border-gray);
    }

    .tab-content {
        padding: 1rem;
    }
    
    .tab-content h2 {
        font-size: 1.2rem;
    }
    
    .table-wrapper {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }
    
    /* Modal aanpassingen */
    .modal-dialog {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-header {
        padding: 1rem;
        border-radius: 0;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-header .close {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .info-item {
        padding: 0.75rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Zeer kleine schermen (max-width: 360px) */
@media (max-width: 360px) {
    .stats-section h2,
    .tab-content h2 {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
    }
}
/* Bedrijfsinfo Modal */
.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 2rem auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-header .close {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.bedrijfsinfo-display {
    display: grid;
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.info-item label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.info-item .value {
    color: #555;
}

.bedrijfsinfo-edit-form {
    display: grid;
    gap: 1rem;
}

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

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Profiel sectie */
.profile-container {
    max-width: 600px;
    margin: 2rem auto;
}

#profileForm {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.form-section h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.info-text {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #FAF0E6 0%, #F5DEB3 100%);
    border-left: 4px solid var(--primary-green);
    border-radius: 6px;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    display: none;
}

.message.success {
    background: #FAF0E6;
    border: 1px solid #F5DEB3;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
/* Backup sectie */
.backup-container {
    max-width: 900px;
}

.backup-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.backup-list table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.backup-list table th {
    font-weight: 600;
    color: var(--text-dark);
}

.backup-list table tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.2s;
}

.info-box {
    border-radius: 8px;
}

.info-box h3 {
    font-size: 1.2rem;
}

.info-box code {
    white-space: pre;
    line-height: 1.8;
}

/* Email Template Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal .close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

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

.modal h2 {
    margin-bottom: 20px;
    color: #5D4037;
    padding-right: 30px;
}

/* Email templates table styling */
#emailTemplatesBody .btn-small {
    padding: 5px 10px;
    font-size: 14px;
    margin: 2px;
}

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

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

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

.status-active {
    background: #FAF0E6;
    color: #155724;
}

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

/* Sidebar Beheer Styles */
.sidebar-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.sidebar-subtab {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.sidebar-subtab:hover {
    background: #e0e0e0;
}

.sidebar-subtab.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-subcontent {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.sidebar-item.inactive {
    opacity: 0.6;
    border-left: 3px solid #999 !important;
}

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

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

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