* {
    box-sizing: border-box;
}

:root {
    --bg: #eef1f4;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #d7dde5;
    --primary: #374151;
    --primary-dark: #111827;
    --accent: #4b5563;
    --danger: #7f1d1d;
    --success-bg: #e8f5e9;
    --success-text: #1f5f2b;
    --error-bg: #fdecec;
    --error-text: #8b1e1e;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --radius: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, #f8fafc 0%, #eef1f4 45%, #e5e7eb 100%);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 1280px;
    max-width: calc(100% - 32px);
    margin: 32px auto 50px;
}

.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 34px 28px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 38px;
    color: var(--primary-dark);
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.filters {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.filters form {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.filters label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.filters input[type="text"],
.filters select,
input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cfd6de;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    color: var(--text);
    transition: 0.2s ease;
}

.filters input[type="text"]:focus,
.filters select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.16);
}

textarea {
    min-height: 180px;
    resize: vertical;
}

.btn,
button,
input[type="submit"] {
    border: none;
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    color: #fff;
    padding: 13px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.15);
    display: inline-block;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    filter: brightness(0.96);
    text-decoration: none;
}

.btn-light {
    background: #e5e7eb;
    color: #111827;
    box-shadow: none;
}

.btn-light:hover {
    background: #d1d5db;
}

.btn-danger {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 4px 22px;
    gap: 15px;
    flex-wrap: wrap;
}

.summary-bar .count {
    color: var(--muted);
    font-size: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: 480px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.12);
}

.card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #d1d5db 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.card-title {
    font-size: 22px;
    line-height: 1.25;
    font-weight: bold;
    color: #111827;
}

.badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #374151;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    border: 1px solid #d7dde5;
}

.card-location {
    font-size: 14px;
    color: #6b7280;
}

.card-description {
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
    flex: 1;
}

.card-contact {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    font-size: 14px;
    color: #111827;
    line-height: 1.5;
}

.card-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

.no-items,
.admin-wrapper,
.login-wrapper,
.single-box {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe2ea;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.no-items {
    padding: 35px 20px;
    text-align: center;
    color: var(--muted);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7dde5;
    background: #fff;
    color: #374151;
    font-weight: bold;
}

.pagination a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.pagination .active {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    color: #fff;
    border-color: #1f2937;
}

.single-box {
    overflow: hidden;
}

.single-image-wrap {
    background: #f3f4f6;
    padding: 22px;
    border-bottom: 1px solid #e5e7eb;
}

.single-image {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    cursor: zoom-in;
}

.single-content {
    padding: 28px;
}

.single-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.single-title {
    margin: 0;
    font-size: 36px;
    color: #111827;
}

.single-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.single-description {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
    white-space: pre-line;
}

.single-contact-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
}

.single-contact-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #111827;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.88);
    z-index: 9999;
    padding: 30px;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.admin-wrapper,
.login-wrapper {
    width: 1120px;
    max-width: calc(100% - 32px);
    margin: 32px auto 50px;
    padding: 26px;
}

.login-wrapper {
    width: 440px;
    margin-top: 70px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 32px;
    color: #111827;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-box {
    margin-top: 16px;
}

.form-row {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #374151;
}

.help-text {
    font-size: 13px;
    color: #6b7280;
    margin-top: 7px;
}

.error-box,
.success-box {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.error-box {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f3c4c4;
}

.success-box {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #cde6d0;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.table th,
.table td {
    border: 1px solid #e5e7eb;
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.table th {
    background: #f3f4f6;
    color: #111827;
}

.thumb-preview {
    width: 110px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    display: block;
}

.status-badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-on {
    background: #e6f4ea;
    color: #1f5f2b;
}

.status-off {
    background: #f8e3e3;
    color: #7f1d1d;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions a {
    padding: 9px 12px;
    border-radius: 10px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.actions a:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-check input {
    width: auto;
}

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .single-title {
        font-size: 30px;
    }

    .card {
        min-height: auto;
    }

    .admin-topbar,
    .single-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .single-content {
        padding: 20px;
    }

    .single-image-wrap {
        padding: 14px;
    }
}
