@import url('style.css');

:root {
    --admin-bg: #1a1a1a;
    /* Deep dark for contrast */
    --admin-surface: #222222;
    /* Solid dark surface for cards */
    --admin-border: rgba(255, 255, 255, 0.08);
    --admin-text: #ffffff;
    --admin-text-muted: #a0a0a0;
    /* Neutral muted text */
    --admin-accent: #c4563a;
    /* Rust orange for primary actions */
    --admin-accent-hover: #346751;
    /* Forest green */
    --admin-danger: #c4563a;
    /* Repurposed for destructive but cohesive */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-family: var(--font-body), sans-serif;
}

/* Minimal dark background matching main theme */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--admin-bg);
    color: var(--admin-text);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading), sans-serif;
    color: var(--admin-text);
    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: var(--admin-accent);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav li {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--admin-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--admin-text);
}

.sidebar-nav a.active {
    background: rgba(164, 190, 159, 0.1);
    color: var(--admin-accent);
    border-left-color: var(--admin-accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.admin-btn-primary {
    background: var(--admin-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.admin-btn-primary:hover {
    background: var(--admin-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(136, 117, 84, 0.3);
}

.admin-btn-outline {
    background: transparent;
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

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

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.main-header {
    background: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
}

.main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--admin-text);
}

.user-info {
    font-size: 0.9rem;
    color: var(--admin-text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background: var(--admin-accent);
    border-radius: 50%;
    opacity: 0.8;
}

.content-body {
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-body h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--admin-text);
    font-weight: 600;
}

.admin-form {
    background: rgba(30, 41, 59, 0.85);
    /* Matching Features Card (Slate 800) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 700px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    /* Slate 300 */
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    /* Slate 900 with opacity */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* Admin Table */
.table-container {
    background: rgba(30, 41, 59, 0.85);
    /* Matching Features Card (Slate 800) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.admin-table th,
.admin-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    font-size: 0.95rem;
}

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

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.media-thumbnail {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

/* Status Messages */
#uploadStatus,
#editStatus {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

#uploadStatus.success,
#editStatus.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

#uploadStatus.error,
#editStatus.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--admin-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Gallery Preview Grid (Add/Edit Content) */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.gallery-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.gallery-preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.gallery-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(229, 57, 70, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-delete-btn:hover {
    background: #D90429;
    transform: scale(1.15);
}

/* Gallery Manage Grid (Manage Gallery view) */
.gallery-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.gallery-manage-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

.gallery-manage-item:hover {
    transform: scale(1.03);
}

.gallery-manage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modern Admin Toast Notification */
.admin-toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
    pointer-events: none;
}

.admin-toast {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
}

.admin-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.admin-toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

.admin-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
}

.admin-toast-success .admin-toast-icon {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.admin-toast-error .admin-toast-icon {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.admin-toast-info .admin-toast-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
/* Booking Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-pending {
    background: rgba(255, 165, 2, 0.15);
    color: #ffa502;
    border: 1px solid rgba(255, 165, 2, 0.3);
}
.status-confirmed {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}
.status-cancelled {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Booking Actions */
.booking-actions {
    display: flex;
    gap: 0.5rem;
}
.booking-action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, opacity 0.2s;
}
.booking-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-confirm {
    background: #2ed573;
    color: #000;
}
.btn-confirm:hover {
    background: #26b361;
}
.btn-cancel {
    background: #ff4757;
    color: #fff;
}
.btn-cancel:hover {
    background: #e63946;
}

/* Table Action Buttons (Edit / Delete pair) */
.action-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Review admin card layout */
.review-admin-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem;
}

