:root {
    --primary: #0077B6;
    --secondary: #0091D5;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --dark: #1A1A2E;
    --light: #f8f9fa;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: #f0f2f5;
    color: var(--dark);
}

/* Login Screen */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-screen.hidden {
    display: none !important;
}

.login-container {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
}

.login-container h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-container h2 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
}

.admin-dashboard.hidden {
    display: none !important;
}

.admin-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow);
}

.admin-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
}

/* Navigation Tabs */
.admin-nav {
    background: var(--white);
    padding: 0 40px;
    display: flex;
    gap: 5px;
    box-shadow: 0 2px 8px var(--shadow);
}

.nav-tab {
    padding: 18px 30px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: var(--primary);
}

.nav-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 40px;
}

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
}

/* Items List */
.items-list {
    display: grid;
    gap: 20px;
}

.item-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px var(--shadow);
}

.item-info {
    flex: 1;
}

.item-info h3 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.item-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.item-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #999;
    margin-top: 10px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

.modal.show {
    display: block;
}

.modal-content {
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* Calendar Controls */
.calendar-selector {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.calendar-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.calendar-selector select {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-selector select:hover {
    border-color: #007bff;
}

.calendar-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Info Panel */
.info-panel {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border-left: 5px solid #007bff;
}

.info-panel h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.info-panel ol {
    margin-left: 20px;
}

.info-panel li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.info-panel ul {
    margin-top: 8px;
    margin-left: 20px;
}

.info-panel ul li {
    margin-bottom: 5px;
}

.calendar-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.calendar-controls input[type="date"] {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
}

/* Reservation List */
.reservation-item {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.reservation-item:hover {
    transform: translateX(5px);
}

.reservation-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Error Messages */
.error-message {
    color: var(--danger);
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Messages */
.success-message {
    color: var(--success);
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: var(--success);
}

.status-badge.inactive {
    background: #f8d7da;
    color: var(--danger);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-nav {
        overflow-x: auto;
        padding: 0 20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .calendar-admin-controls {
        flex-direction: column;
    }
    
    .date-range-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-date-picker {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Calendar Admin Controls */
.calendar-admin-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 2px 10px var(--shadow);
}

.date-range-picker {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border: 2px solid var(--primary);
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.date-input-group input {
    padding: 10px 15px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 1rem;
    min-width: 160px;
}

.single-date-picker {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.single-date-picker span {
    color: #666;
    font-size: 0.9rem;
}

.single-date-picker input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.selected-dates-preview {
    padding: 0 10px;
}

.selected-dates-preview p {
    font-size: 0.95rem;
    padding: 10px;
    border-radius: 8px;
    background: #fff3cd;
}

.selected-dates-preview p[style*="color: #28a745"] {
    background: #d4edda !important;
}

/* Rich Text Editor Styles */
.rich-text-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
}

.rich-text-toolbar button {
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--dark);
}

.rich-text-toolbar button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.rich-text-toolbar button:active {
    transform: translateY(0);
}

.rich-text-editor {
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    background: var(--white);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
    transition: border-color 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rich-text-editor:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.rich-text-editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

.rich-text-editor br {
    display: block;
    content: "";
    margin: 8px 0;
}

/* Style for formatted text in editor */
.rich-text-editor strong {
    font-weight: 700;
}

.rich-text-editor em {
    font-style: italic;
}

.rich-text-editor u {
    text-decoration: underline;
}

/* Mobile responsive for rich text editor */
@media (max-width: 768px) {
    .rich-text-toolbar {
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px;
    }
    
    .rich-text-toolbar button {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .rich-text-editor {
        min-height: 80px;
        font-size: 0.95rem;
    }
}

/* Albums List Styling */
.albums-list {
    display: grid;
    gap: 20px;
}

.album-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
}

.album-card:hover {
    box-shadow: 0 4px 16px var(--shadow);
    transform: translateY(-2px);
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.album-title {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
}

.album-actions {
    display: flex;
    gap: 10px;
}

.album-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.album-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.album-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.album-image-item:hover {
    transform: scale(1.05);
}

.album-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.album-image-item:hover .album-image-overlay {
    opacity: 1;
}

.image-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.add-images-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-images-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.album-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #666;
}

.album-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal Large */
.modal-large {
    max-width: 900px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

#progress_text {
    text-align: center;
    margin-top: 10px;
    color: var(--primary);
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .album-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .album-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .modal-large {
        max-width: 95%;
    }
}
