/* ========== ADMIN HEADER ========== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--container-padding);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-logo {
    display: flex;
    align-items: center;
}

.admin-logo img {
    height: 56px;
    width: auto;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user {
    font-size: 13px;
    color: var(--color-gray);
}

.admin-logout-btn {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: transparent;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-logout-btn:hover {
    border-color: var(--color-black);
}

/* ========== LOGIN ========== */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 48px;
    text-align: center;
}

.login-card h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-card > p {
    color: var(--color-gray);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-card input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color var(--transition-fast);
}

.login-card input:focus {
    border-color: var(--color-black);
    outline: none;
}

.login-error {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}

/* ========== ADMIN BUTTONS ========== */
.btn-admin-primary {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    background: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.btn-admin-primary:hover {
    opacity: 0.8;
}

.btn-admin-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-admin-secondary {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: transparent;
    font-family: var(--font-heading);
    font-size: 12px;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-admin-secondary:hover {
    border-color: var(--color-black);
}

.btn-admin-danger {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid #e53e3e;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 12px;
    color: #e53e3e;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-admin-danger:hover {
    background: #e53e3e;
    color: var(--color-white);
}

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

/* ========== ADMIN PANEL LAYOUT ========== */
.admin-panel {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px var(--container-padding);
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.admin-panel-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -0.03em;
}

.admin-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--color-gray);
    font-size: 15px;
}

/* ========== ALBUM LIST ========== */
.admin-album-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-album-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: box-shadow var(--transition-fast);
    background: var(--color-white);
}

.admin-album-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.admin-album-card.dragging {
    opacity: 0.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.admin-album-card.drag-over {
    border-color: var(--color-accent);
}

.admin-album-drag-handle {
    cursor: grab;
    color: var(--color-gray-light);
    font-size: 18px;
    padding: 4px;
    user-select: none;
}

.admin-album-drag-handle:active {
    cursor: grabbing;
}

.admin-album-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--color-bg-light);
}

.admin-album-info {
    flex: 1;
    min-width: 0;
}

.admin-album-info h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-album-info span {
    font-size: 13px;
    color: var(--color-gray);
}

.admin-album-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ========== OVERLAY / FORM PANELS ========== */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-form-panel {
    background: var(--color-white);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.admin-form-panel-wide {
    max-width: 800px;
}

.admin-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-form-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.admin-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-gray);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.admin-close-btn:hover {
    color: var(--color-black);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 13px;
    color: var(--color-text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

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

/* ========== COVER UPLOAD ========== */
.cover-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    position: relative;
}

.cover-upload-area:hover {
    border-color: var(--color-gray);
}

.cover-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.cover-preview {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    margin: 0 auto;
}

.upload-hint {
    font-size: 13px;
    color: var(--color-gray);
}

/* ========== PHOTO UPLOAD ZONE ========== */
.photo-upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    transition: border-color var(--transition-fast);
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
    border-color: var(--color-accent);
}

.photo-upload-zone {
    cursor: pointer;
}

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

.photo-upload-zone p {
    font-size: 14px;
    color: var(--color-gray);
}

/* ========== UPLOAD PROGRESS ========== */
.upload-progress-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.upload-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.upload-progress-item .file-name {
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.2s ease;
    width: 0%;
}

/* ========== ADMIN PHOTO GRID ========== */
.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.admin-photo-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: var(--color-gray);
    font-size: 14px;
}

.admin-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
}

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

.admin-photo-item.dragging {
    opacity: 0.5;
}

.admin-photo-item.drag-over {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.admin-photo-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.btn-icon-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(229, 62, 62, 0.9);
    border: none;
    color: var(--color-white);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    line-height: 1;
}

.admin-photo-item:hover .btn-icon-delete {
    opacity: 1;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-white);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast-success { background: #38a169; }
.toast-error { background: #e53e3e; }

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========== ADMIN TABS ========== */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px;
}

.admin-tab {
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    color: var(--color-gray);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-tab:hover {
    color: var(--color-text);
}

.admin-tab.active {
    color: var(--color-text);
    border-bottom-color: var(--color-black);
}

/* ========== BOOKINGS SUMMARY ========== */
.bookings-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.bookings-summary-card {
    flex: 1;
    padding: 20px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    background: var(--color-white);
}

.bookings-summary-number {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.bookings-summary-label {
    display: block;
    font-size: 13px;
    color: var(--color-gray);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== CALENDAR NAV ========== */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-nav h1 {
    min-width: 200px;
    text-align: center;
}

/* ========== CALENDAR GRID ========== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.calendar-weekday {
    padding: 12px 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray);
    background: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

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

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

.calendar-day:hover {
    background: var(--color-bg-light);
}

.calendar-day.outside-month {
    background: var(--color-bg-light);
    opacity: 0.4;
}

.calendar-day.today {
    background: rgba(0, 153, 255, 0.06);
}

.calendar-day.today .calendar-day-number {
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.selected {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.calendar-day.closed-day {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        var(--color-bg-light) 4px,
        var(--color-bg-light) 8px
    );
}

.calendar-day-number {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 4px;
}

.calendar-day-bookings {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-booking-dot {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-body);
}

.calendar-booking-dot.status-confirmed {
    background: rgba(56, 161, 105, 0.15);
    color: #276749;
}

.calendar-booking-dot.status-pending {
    background: rgba(237, 137, 54, 0.15);
    color: #9c4221;
}

.calendar-booking-dot.status-completed {
    background: rgba(0, 153, 255, 0.12);
    color: #005fa3;
}

.calendar-booking-dot.status-cancelled {
    background: rgba(229, 62, 62, 0.12);
    color: #9b2c2c;
    text-decoration: line-through;
}

/* ========== DAY DETAIL PANEL ========== */
.day-detail-panel {
    margin-top: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
    background: var(--color-white);
}

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

.day-detail-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.day-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-detail-hours {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 16px;
}

.day-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-booking-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    transition: box-shadow var(--transition-fast);
}

.day-booking-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.day-booking-time {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    min-width: 70px;
    text-align: center;
}

.day-booking-info {
    flex: 1;
    min-width: 0;
}

.day-booking-info h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text);
}

.day-booking-info span {
    font-size: 13px;
    color: var(--color-gray);
}

.day-booking-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.day-booking-status.status-confirmed { background: rgba(56, 161, 105, 0.15); color: #276749; }
.day-booking-status.status-pending { background: rgba(237, 137, 54, 0.15); color: #9c4221; }
.day-booking-status.status-completed { background: rgba(0, 153, 255, 0.12); color: #005fa3; }
.day-booking-status.status-cancelled { background: rgba(229, 62, 62, 0.12); color: #9b2c2c; }

.day-booking-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ========== BOOKING FORM EXTRAS ========== */
.form-row {
    display: flex;
    gap: 16px;
}

.form-group-half {
    flex: 1;
}

.form-group select,
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--color-white);
    transition: border-color var(--transition-fast);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23808080'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-group select:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus {
    border-color: var(--color-black);
    outline: none;
}

.booking-hours-warning {
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background: rgba(237, 137, 54, 0.12);
    color: #9c4221;
    font-size: 13px;
    font-family: var(--font-heading);
    font-weight: 500;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .admin-album-card {
        flex-wrap: wrap;
    }

    .admin-album-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .admin-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-form-panel {
        width: 100%;
        padding: 24px;
    }

    .admin-header {
        padding: 16px 24px;
    }

    .admin-panel {
        padding: 24px;
    }

    .bookings-summary {
        flex-direction: column;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .calendar-day-number {
        font-size: 12px;
    }

    .calendar-booking-dot {
        font-size: 9px;
        padding: 1px 4px;
    }

    .calendar-nav h1 {
        font-size: 20px;
        min-width: 160px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .day-booking-card {
        flex-wrap: wrap;
    }

    .day-booking-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .appearance-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========== APPEARANCE / SITE IMAGES ========== */

.appearance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.appearance-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
    background: var(--color-white);
}

.appearance-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.appearance-hint {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 16px;
}

.appearance-preview {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 16px;
    position: relative;
}

.appearance-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.appearance-preview-logo {
    height: 120px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appearance-preview-logo img {
    object-fit: contain;
    padding: 16px;
}

.appearance-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
    font-size: 14px;
}

.appearance-upload-btn {
    display: inline-block;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

/* ========== SCHEDULE ========== */

.schedule-grid {
    margin-top: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
}

.schedule-row:last-child {
    border-bottom: none;
}

.schedule-row.closed .schedule-time,
.schedule-row.closed .schedule-to {
    opacity: 0.3;
    pointer-events: none;
}

.schedule-day-name {
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
}

.schedule-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.schedule-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

.schedule-toggle input:checked + .toggle-slider {
    background: var(--color-accent);
}

.schedule-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.schedule-time {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
}

.schedule-to {
    color: var(--color-gray);
    font-size: 14px;
}
