/* Admin Dashboard Styles - Refined & Premium */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --admin-sidebar: #0A3D2F;
    --admin-sidebar-hover: #145240;
    --admin-gold: #D4AF87;
    --admin-bg: #F5F7FA;
    --admin-white: #ffffff;
    --admin-text: #2c3e50;
    --admin-text-light: #7f8c8d;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Common Variables for Notifications/Modals */
    --accent-color: #D4AF87;
    --primary-color: #0A3D2F;
    --white: #ffffff;
    --text-primary: #222222;
    --text-secondary: #555555;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--admin-bg);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--admin-text);
    /* Removed display: flex to fix overlap issues with fixed position elements */
}

/* Sidebar - Premium Dark Green */
.admin-sidebar {
    width: 270px;
    /* Slightly wider for better spacing */
    height: 100vh;
    background: linear-gradient(180deg, var(--admin-sidebar) 0%, #062b21 100%);
    color: var(--admin-white);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 25px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.brand-showcase {
    margin-bottom: 50px;
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link i {
    font-size: 1.3rem;
    margin-right: 16px;
    width: 24px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(212, 175, 135, 0.15);
    color: var(--admin-white);
    border-left: 4px solid var(--admin-gold);
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--admin-gold);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    /* Subtle container */
    padding: 15px;
    border-radius: 12px;
    margin-top: auto;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--admin-gold), #b8860b);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Main Content Area */
.admin-main {
    margin-left: 270px;
    /* Matching sidebar width */
    width: auto;
    /* Allow block flow to fill remaining space */
    padding: 40px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 45px;
}

.page-title h2 {
    color: var(--admin-sidebar);
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.page-title p {
    margin: 0;
    color: var(--admin-text-light);
}

.action-btn {
    background: var(--admin-sidebar);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(10, 61, 47, 0.3);
}

.action-btn:hover {
    background: var(--admin-sidebar-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 61, 47, 0.4);
    color: var(--admin-gold);
}

/* Stats Cards - Modern & Clean */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--admin-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 175, 135, 0.3);
}

.stat-info h3 {
    font-size: 2.8rem;
    margin: 0;
    color: var(--admin-sidebar);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.stat-info p {
    margin: 8px 0 0;
    color: var(--admin-text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-icon {
    width: 65px;
    height: 65px;
    background-color: rgba(10, 61, 47, 0.05);
    color: var(--admin-sidebar);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    background-color: var(--admin-sidebar);
    color: var(--admin-gold);
    transform: rotate(10deg);
}

/* Data Tables - Elegant */
.data-table-container {
    background: var(--admin-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

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

.table-header h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: var(--admin-text);
    font-size: 1.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Row spacing */
}

th {
    padding: 15px 20px;
    text-align: left;
    color: var(--admin-text-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #f9f9f9;
    border-bottom: 1px solid #f9f9f9;
    color: var(--admin-text);
    vertical-align: middle;
}

/* Rounded corners for rows */
tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid #f9f9f9;
}

tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid #f9f9f9;
}

tr {
    transition: var(--transition);
}

tr:hover td {
    background-color: #fafafa;
    transform: scale(1.005);
}

.status-badge {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.status-badge:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

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

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

.status-pending {
    background-color: #fff8e1;
    color: #f57f17;
}

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

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

.type-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-site {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.type-enquiry {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.action-icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 0 5px;
    color: var(--admin-text-light);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-icon-btn:hover {
    border-color: var(--admin-gold);
    background: var(--admin-gold);
    color: #fff;
    transform: translateY(-2px);
}

.action-icon-btn.delete:hover {
    border-color: #ff5252;
    background: #ff5252;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 4px solid var(--accent-color);
    animation: slideInRight 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

.toast i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.toast-success {
    border-left-color: #2e7d32;
    background: #f1f8f1;
}

.toast-success i {
    color: #2e7d32;
}

.toast-error {
    border-left-color: #c62828;
    background: #fff5f5;
}

.toast-error i {
    color: #c62828;
}

.toast-warning {
    border-left-color: #f39c12;
    background: #fffdf5;
}

.toast-warning i {
    color: #f39c12;
}

/* Custom Modern Modals */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 61, 47, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInModal 0.3s ease;
}

.custom-modal-card {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
}

.modal-icon.warning {
    background: #fff8f0;
    color: #f39c12;
}

.modal-icon.info {
    background: #f0f7ff;
    color: #3498db;
}

.custom-modal-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.custom-modal-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
}

.modal-btn.cancel {
    background: #f5f5f5;
    color: var(--text-primary);
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.action-icon-btn.approve:hover {
    border-color: #4caf50;
    background: #4caf50;
}

/* Form Styling - Refined */
.admin-form-container {
    background: var(--admin-white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    max-width: 900px;
}

.admin-input,
select.admin-input,
textarea.admin-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--admin-text);
    background-color: #fcfcfc;
    transition: var(--transition);
    margin-bottom: 25px;
}

.admin-input:focus {
    outline: none;
    border-color: var(--admin-gold);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(212, 175, 135, 0.15);
}

.admin-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--admin-sidebar);
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .brand-showcase h2,
    .brand-showcase p,
    .user-info,
    .nav-link span {
        display: none;
        /* Hide text on tablet */
    }

    .nav-link {
        justify-content: center;
        padding: 15px;
    }

    .nav-link i {
        margin: 0;
        font-size: 1.5rem;
    }

    .admin-main {
        margin-left: 80px;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}