/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b4a7a7;
    --secondary-color: #d4b5b5;
    --accent-color: #8b7e74;
    --dark-color: #2c2c2c;
    --light-color: #f9f7f5;
    --text-color: #4a4a4a;
    --border-color: #e8e4e0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --serif-font: 'Cormorant Garamond', serif;
    --sans-font: 'Montserrat', sans-serif;
}

body {
    font-family: var(--sans-font);
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

.section-heading {
    margin: 2rem 0 1rem;
    color: var(--dark-color);
}

.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Font preview styles */
.font-preview {
    margin-top: 10px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #333;
    transition: font-family 0.3s ease;
}

.font-preview.secondary {
    font-size: 16px;
    font-weight: 400;
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

.custom-fonts-list {
    margin-top: 1.5rem;
}

.custom-font-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.custom-font-item .font-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-font-item .font-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.color-text {
    width: 100px;
}

.preview-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    color: #856404;
}

/* Hero height preview */
.hero-height-preview {
    margin: 1.5rem 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.hero-height-preview .preview-background {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #b4a7a7 0%, #d4b5b5 50%, #8b7e74 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.3s ease;
    position: relative;
}

.hero-height-preview .preview-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Monogram preview */
.monogram-preview {
    margin: 1.5rem 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.monogram-preview .preview-background {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #b4a7a7 0%, #d4b5b5 50%, #8b7e74 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.monogram-preview .preview-monogram {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg) scale(0.85);
    font-family: 'Great Vibes', cursive;
    font-size: var(--preview-monogram-font-size, 8rem);
    color: rgba(255, 255, 255, var(--preview-monogram-opacity, 0.3));
    letter-spacing: 0.15em;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -1px 0 0 #000,
        1px 0 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000;
    pointer-events: none;
    white-space: nowrap;
    padding: 1rem 2rem;
}

/* Preview animation classes */
.preview-monogram.anim-fade {
    opacity: 0;
    animation: previewFade 2s ease-in-out forwards;
}

.preview-monogram.anim-drawn {
    opacity: 0;
    animation: previewDrawn 3s ease-out forwards;
}

.preview-monogram.anim-wipe {
    opacity: 0;
    animation: previewWipe 2s ease-in-out forwards;
}

.preview-monogram.anim-slide {
    opacity: 0;
    animation: previewSlide 2s ease-out forwards;
}

.preview-monogram.anim-zoom {
    opacity: 0;
    animation: previewZoom 2s ease-out forwards;
}

@keyframes previewFade {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)) scale(1); }
}

@keyframes previewDrawn {
    0% { opacity: 1; clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)); }
    100% { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)); }
}

@keyframes previewWipe {
    0% { opacity: 1; clip-path: inset(0 100% 0 0); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes previewSlide {
    0% { opacity: 0; transform: translate(-150%, -50%) rotate(var(--preview-monogram-rotation, -15deg)); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)); }
}

@keyframes previewZoom {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)) scale(3); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--preview-monogram-rotation, -15deg)) scale(1); }
}

.hidden {
    display: none;
}

.hero-photos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.hero-photo-item {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.hero-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-photo-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hero-photo-delete:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4b5b5 0%, #b4a7a7 50%, #8b7e74 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-family: var(--serif-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--sans-font);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 126, 116, 0.3);
}

.btn-secondary {
    padding: 0.6rem 1.5rem;
    background: white;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    min-height: 20px;
}

.back-to-site-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-to-site-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard.hidden {
    display: none;
}

.dashboard-header {
    background: linear-gradient(135deg, #8b7e74 0%, #b4a7a7 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.dashboard-header h1 {
    font-family: var(--serif-font);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.username {
    font-size: 0.95rem;
}

/* Navigation Tabs */
.dashboard-nav {
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.nav-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

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

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.tab-content h2 {
    font-family: var(--serif-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.tab-description {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-family: var(--serif-font);
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.quick-actions h3 {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.btn-action {
    padding: 1.5rem;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
}

.btn-action:hover {
    border-color: var(--accent-color);
    background: white;
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
}

/* RSVPs Tab */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.search-input {
    padding: 0.7rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.rsvp-table thead {
    background: var(--light-color);
}

.rsvp-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.rsvp-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.rsvp-table tbody tr:hover {
    background: var(--light-color);
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-attending {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-declined {
    background: #ffebee;
    color: #c62828;
}

.btn-delete {
    padding: 0.4rem 1rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

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

.loading {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-color);
    font-style: italic;
}

/* Content Editor */
.content-editor {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.content-editor h3 {
    font-family: var(--serif-font);
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.story-card-editor {
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.story-card-editor h4 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Success Message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dashboard-nav {
        overflow-x: auto;
        gap: 1rem;
    }

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

    .tab-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-actions {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .rsvp-table {
        min-width: 800px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Gallery Management */
.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item-admin {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
}

.gallery-item-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-video {
    width: 100%;
    height: 200px;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.gallery-item-type {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: opacity 0.3s ease;
}

.btn-edit {
    background: var(--accent-color);
    color: white;
    flex: 1;
}

.btn-edit:hover {
    opacity: 0.8;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions button {
    flex: 1;
}

small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--accent-color);
}
/* Schedule Item Form Styles */
.schedule-item-form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.schedule-item-form h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.schedule-item-form .form-group {
    margin-bottom: 1rem;
}

.schedule-item-form .btn-danger {
    margin-top: 0.5rem;
}

/* Hotel Item Form Styles */
.hotel-item-form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.hotel-item-form h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.hotel-item-form .form-group {
    margin-bottom: 1rem;
}

.hotel-item-form .btn-danger {
    margin-top: 0.5rem;
}

/* Activity Item Form Styles */
.activity-item-form {
    margin-bottom: 0.75rem;
}

.activity-item-form .form-row {
    gap: 0.5rem;
}

.activity-item-form .btn-danger {
    padding: 0.5rem 1rem;
    white-space: nowrap;
}