* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary: #0f3d5e;
    --primary-dark: #0a2d45;
    --primary-light: #1a5a85;
    --accent: #c9a227;
    --accent-soft: #f5edd3;
    --bg: #f7f6f4;
    --card: #ffffff;
    --text: #1c1917;
    --muted: #78716c;
    --border: #e7e5e4;
    --shadow: 0 4px 20px rgba(15, 61, 94, 0.06);
    --shadow-hover: 0 12px 32px rgba(15, 61, 94, 0.12);
    --radius: 12px;
    --success: #0d7a4f;
    --danger: #b91c1c;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar {
    background: #fff;
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent);
    font-weight: 700;
}

.navbar nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
}

.navbar nav ul li a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
    position: relative;
}

.navbar nav ul li a:hover,
.navbar nav ul li a.active {
    color: var(--primary);
}

.navbar nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-login {
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-login:hover {
    background: #f0f6ff;
}

.btn-register {
    background: var(--primary);
    color: #fff;
}

.btn-register:hover {
    background: var(--primary-dark);
}

.hero {
    background: linear-gradient(135deg, rgba(15, 40, 60, 0.72), rgba(10, 25, 40, 0.62)), 
                url('https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 19px;
    margin-bottom: 20px;
    opacity: 0.95;
    font-weight: 400;
}

.ai-search {
    max-width: 720px;
    margin: 0 auto 18px;
}

.ai-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 6px 6px 6px 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    gap: 8px;
}

.ai-icon {
    color: var(--accent);
    font-size: 18px;
}

.ai-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 10px 6px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
}

.ai-voice, .ai-go {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    font-family: inherit;
}

.ai-voice {
    background: #f5f3ef;
    color: var(--primary);
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.ai-voice.listening {
    background: #fee2e2;
    color: #b91c1c;
    animation: pulse 1s infinite;
}

.ai-go {
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
}

.ai-go:hover { background: var(--primary-dark); }

.ai-status {
    color: #fff;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.search-box {
    background: #fff;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    gap: 10px;
    max-width: 980px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-field {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    text-align: right;
    background: #fafaf9;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.search-field:focus-within {
    border-color: var(--primary);
    background: #fff;
}

.search-field label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.search-field input, .search-field select {
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    background: transparent;
    padding: 4px 0;
    font-weight: 500;
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.properties-section {
    padding: 70px 0 40px;
}

.properties-section h2,
.info-section h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

.properties-section h2::after,
.info-section h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    margin-top: 12px;
    font-size: 16px;
}

.property-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 61, 94, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #efece8;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(15, 61, 94, 0.12);
}

.property-img {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--accent);
    color: #1c1917;
    padding: 5px 12px;
    font-size: 11.5px;
    border-radius: 20px;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.3px;
}

.property-details {
    padding: 18px 20px 16px;
}

.property-details h3 {
    font-size: 17.5px;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 700;
    line-height: 1.35;
}

.stars {
    background: var(--primary);
    color: white;
    padding: 3px 9px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 12.5px;
}

.price-book {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0eeeb;
    padding-top: 14px;
    margin-top: 4px;
}

.price span {
    font-size: 21px;
    font-weight: 800;
    color: var(--primary);
}

.btn-book {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-book:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-search {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 16px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(15, 61, 94, 0.25);
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 61, 94, 0.3);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    align-items: flex-end;
    border: 1px solid #efece8;
}

.features > div {
    background: #fff;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(15, 61, 94, 0.04);
    border: 1px solid #efece8;
    transition: all 0.3s;
}

.features > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(15, 61, 94, 0.1);
}

.features i {
    font-size: 30px;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.navbar {
    background: #fff;
    box-shadow: 0 1px 0 #efece8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.logo span {
    color: var(--accent);
    font-weight: 700;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 16px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.property-card:hover .property-img img {
    transform: scale(1.05);
}

.location {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}

.reviews {
    color: var(--muted);
}

.price {
    font-size: 13px;
    color: var(--muted);
}

footer {
    background: #0c1929;
    color: #e7e5e4;
    padding: 60px 0 24px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 36px;
}

.footer-col h3, .footer-col h4 {
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
}

.footer-col p {
    font-size: 14.5px;
    color: #94a3b8;
    margin-bottom: 10px;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 22px;
    font-size: 13px;
    color: #64748b;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    align-items: flex-end;
    border: 1px solid #efece8;
}

.filters label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    color: var(--text);
}

.filters .chk {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.filters select,
.filters input[type="range"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
    font-size: 16px;
}

.info-section {
    padding: 60px 0;
}

.info-section.alt {
    background: #fff;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.features > div {
    background: #fff;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(15, 61, 94, 0.04);
    border: 1px solid #efece8;
    transition: all 0.3s;
}

.features > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(15, 61, 94, 0.1);
}

.features i {
    font-size: 30px;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.features h4 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}

.features p {
    color: var(--muted);
    font-size: 14.5px;
}

.form {
    display: grid;
    gap: 14px;
    max-width: 520px;
    margin-top: 20px;
}

.form input, .form textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
    background: #fff;
    transition: border-color 0.2s;
}

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

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal[hidden] {
    display: none;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.close {
    position: absolute;
    top: 12px;
    left: 14px;
    border: 0;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.close:hover {
    background: #e2e8f0;
}

.sum {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    margin: 14px 0;
    font-size: 14.5px;
    border: 1px solid var(--border);
}

.sum div {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.sum .tot {
    font-weight: 800;
    font-size: 17px;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 8px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    background: #1f2937;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 3000;
    font-size: 14.5px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
}

.legal {
    padding: 40px 0;
    max-width: 800px;
    line-height: 2;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--primary);
    cursor: pointer;
    padding: 6px 10px;
}

.mobile-only { display: none; }
@media (max-width: 800px) {
    .mobile-only { display: list-item; }
    .menu-toggle { display: block; }
    .navbar nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        padding: 8px 0 16px;
        z-index: 999;
    }
    .navbar nav.open { display: block; }
    .navbar nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
    }
    .navbar nav ul li a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        font-size: 16px;
    }
    .auth-buttons { display: none; }
    .navbar .container { position: relative; }

    .hero { height: auto; min-height: 380px; padding: 40px 0 30px; }
    .hero-content h1 { font-size: 26px; line-height: 1.35; }
    .hero-content p { font-size: 15px; margin-bottom: 16px; }
    .ai-input-wrap { flex-wrap: wrap; padding: 8px; }
    .ai-input-wrap input { min-width: 0; width: 100%; order: 1; }
    .ai-go { flex: 1; order: 2; }
    .ai-voice { order: 3; }
    .search-field { min-width: 0; padding: 12px 14px; }
    .search-field input, .search-field select { font-size: 16px; }
    .btn-search { width: 100%; padding: 15px; font-size: 16px; }

    .properties-section { padding: 32px 0 16px; }
    .properties-section h2 { font-size: 22px; }
    .section-subtitle { font-size: 14px; margin-bottom: 16px; }
    .properties-grid { grid-template-columns: 1fr; gap: 14px; }
    .property-img { height: 200px; }
    .filters { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
    .filters label { width: 100%; }
    .filters select { width: 100%; padding: 10px; font-size: 15px; }

    .features { grid-template-columns: 1fr; gap: 12px; }
    .features > div { padding: 20px 16px; }
    .footer-content { grid-template-columns: 1fr; gap: 20px; }
    .modal-box { margin: 8px; padding: 18px; max-height: 92vh; }
    .room { grid-template-columns: 1fr; }
    .room-img { width: 100%; height: 170px; }
    .room-price { align-items: stretch; text-align: right; }
    .gallery img#galMain { height: 190px; }
    .btn-book { padding: 12px 16px; font-size: 15px; }

    .admin-grid { grid-template-columns: 1fr; }
    @media (max-width: 800px) {
    #adminAuth { display: none; }
}
    .form input, .form textarea { font-size: 16px; padding: 12px; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 22px; }
    .container { width: 94%; }
    .property-details { padding: 14px; }
    .price span { font-size: 18px; }
    .navbar .container { padding: 12px 0; }
}

/* ===== تفاصيل العقار والغرف ===== */
.modal-box.wide { max-width: 900px; }
.noimg { background: #f1f5f9; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.property-img .noimg { height: 100%; }
.newtag { background: #dcfce7; color: #166534; padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.price small { display: block; color: #888; font-size: 12px; }
.gallery img#galMain { width: 100%; height: 320px; object-fit: cover; border-radius: 12px; background: #f1f5f9; }
.thumbs { display: flex; gap: 8px; margin: 10px 0 16px; overflow-x: auto; }
.thumb { width: 88px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; flex: none; border: 2px solid transparent; transition: border-color 0.2s; }
.thumb:hover { border-color: var(--primary); }
.hotel-meta { color: #555; font-size: 14.5px; margin: 6px 0 10px; }
.addr, .times { color: #666; font-size: 13.5px; margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chips span { background: #f1f5f9; border-radius: 20px; padding: 5px 12px; font-size: 12.5px; color: #444; }
.chips i { color: #16a34a; font-size: 11px; margin-left: 4px; }
.rooms-title { margin: 20px 0 6px; font-size: 19px; font-weight: 700; }
.rooms-note { font-size: 13px; color: #777; margin-bottom: 12px; }
.room { display: grid; grid-template-columns: 140px 1fr 200px; gap: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 14px; align-items: start; background: #fff; }
.room-img { width: 140px; height: 110px; object-fit: cover; border-radius: 10px; }
.room-info h4 { margin-bottom: 4px; font-size: 16px; }
.room-meta { font-size: 13.5px; color: #666; margin-bottom: 6px; }
.room-info p { font-size: 13.5px; color: #555; margin: 6px 0; }
.room-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 12.5px; padding: 3px 10px; border-radius: 6px; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.no { background: #fee2e2; color: #b91c1c; }
.tag.info { background: #fef3c7; color: #92400e; }
.room-price { text-align: left; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.room-price small { color: #777; font-size: 12px; text-align: right; }
.rp-total { font-size: 22px; font-weight: 800; color: #0f3d5e; }
.room-price .btn-book { margin-top: 8px; align-self: stretch; }
.btn-book:disabled { background: #cbd5e1; cursor: not-allowed; }
.back { display: inline-block; margin-bottom: 10px; color: var(--primary); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.preview-bar { background: #fef3c7; color: #92400e; text-align: center; padding: 10px 14px; font-size: 13.5px; }
.preview-bar a { color: var(--primary); margin: 0 6px; }

@media (max-width: 700px) {
    .room { grid-template-columns: 1fr; }
    .room-img { width: 100%; height: 180px; }
    .room-price { align-items: stretch; text-align: right; }
    .gallery img#galMain { height: 220px; }
}

/* ===== لوحة الإدارة (محفوظة كما هي مع تحسينات بسيطة) ===== */
.admin-wrap { padding: 20px 0 60px; }
.notice { background: #eef6fd; border: 1px solid #cfe3f5; border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.9; margin-bottom: 16px; }
.notice code { background: #fff; padding: 1px 6px; border-radius: 4px; }
.admin-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.admin-side { background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); position: sticky; top: 80px; }
.btn-search.wide { width: 100%; margin-bottom: 10px; padding: 10px; }
.hotel-list { list-style: none; max-height: 340px; overflow: auto; margin-bottom: 10px; }
.hotel-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; border: 1px solid transparent; }
.hotel-list li.on { background: #eef6fd; border-color: #cfe3f5; }
.hotel-list small { display: block; color: #777; font-size: 11px; }