.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-page-header p {
    margin: 0.35rem 0 0;
    color: #666;
}

.admin-back-link {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    background: #262541;
    color: #fff;
    padding: 0.75rem 1rem;
    text-decoration: none;
    white-space: nowrap;
}

.contact-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-stat-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}

.contact-stat-card span {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.contact-stat-card strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-filters {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}

.contact-filters form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 0.8rem;
    align-items: end;
}

.contact-filters label,
.status-form label {
    display: block;
    margin-bottom: 0.35rem;
}

.contact-filters input,
.contact-filters select,
.status-form select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
}

.contact-filters button,
.admin-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 5px;
    background: #262541 !important;
    color: #fff;
    padding: 0.5rem 1.1rem;

    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.admin-btn-secondary {
    background: #222;
}

.admin-table-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}

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

.admin-table th,
.admin-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
}

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

.admin-table small {
    color: #666;
    display: block;
    margin-top: 0.2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.badge-new {
    background: #fff0f0;
    color: #b42318;
}

.badge-read {
    background: #eef4ff;
    color: #175cd3;
}

.badge-responded {
    background: #ecfdf3;
    color: #067647;
}

.badge-archived {
    background: #f2f4f7;
    color: #475467;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.enquiry-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.enquiry-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}

.enquiry-card h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.enquiry-message {
    white-space: pre-wrap;
    line-height: 1.7;
    color: #333;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1rem;
}

.meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.meta-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.meta-list li:last-child {
    border-bottom: none;
}

.meta-list strong {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.meta-list a {
    color: #262541;
    font-weight: 700;
    text-decoration: none;
    word-break: break-word;
}

.meta-list a:hover {
    text-decoration: underline;
}

.status-form {
    margin-top: 1rem;
}

.status-form select {
    margin-bottom: 0.8rem;
}

.admin-message {
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.4rem;
    font-weight: 700;
}

.admin-message.success {
    background: #e8f8ef;
    color: #176b3a;
    border: 1px solid #bfe8cf;
}

.admin-message.error {
    background: #fff0f0;
    color: #9f1d1d;
    border: 1px solid #f1c1c1;
}

@media (max-width: 900px) {
    .contact-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .admin-table-card {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 850px;
    }

    .admin-page-header,
    .enquiry-layout {
        display: block;
    }

    .admin-back-link {
        margin-top: 1rem;
    }

    .enquiry-card {
        margin-bottom: 1rem;
    }
}