*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.main {
    flex: 1;
    padding-top: var(--header-height);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn--secondary {
    background: var(--secondary);
    color: white;
}

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

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

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #2563eb;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
}

.nav__link:hover {
    color: var(--primary);
}

.nav__lang {
    position: relative;
}

.nav__lang-btn {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav__lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    min-width: 120px;
}

.nav__lang:hover .nav__lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__lang-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 0.875rem;
}

.nav__lang-item:hover {
    background: var(--bg);
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.search-form__group {
    display: flex;
    flex-direction: column;
}

.search-form__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.section {
    padding: 4rem 0;
}

.section__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

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

.property-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.property-card__image {
    height: 200px;
    background: var(--secondary);
    position: relative;
    overflow: hidden;
}

.property-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card__price {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
}

.property-card__content {
    padding: 1.5rem;
}

.property-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-card__location {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.property-card__details {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.property-card__detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-detail {
    padding: 2rem 0;
}

.property-detail__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.property-detail__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.property-detail__gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.2s;
}

.property-detail__gallery img:hover {
    opacity: 0.8;
}

.property-detail__info {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-height) + 1rem);
}

.property-detail__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.property-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.property-detail__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.booking-form {
    padding-top: 1rem;
}

.booking-form__dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.booking-form__summary {
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.booking-form__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.booking-form__total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.reviews-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.review-card__author {
    font-weight: 600;
}

.review-card__rating {
    color: var(--warning);
}

.review-card__date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.review-card__content {
    color: var(--text-light);
}

.review-form {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.review-form__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.rating-input {
    display: flex;
    gap: 0.25rem;
}

.rating-input__star {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--border);
    transition: color 0.2s;
}

.rating-input__star.active,
.rating-input__star:hover {
    color: var(--warning);
}

.confirmation {
    text-align: center;
    padding: 4rem 0;
}

.confirmation__icon {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--success);
    font-size: 2rem;
}

.confirmation__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.confirmation__message {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.confirmation__details {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto 2rem;
    text-align: left;
}

.confirmation__row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.confirmation__row:last-child {
    border-bottom: none;
    font-weight: 600;
}

.login-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-form__title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
}

.admin-sidebar__nav {
    display: flex;
    flex-direction: column;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    font-weight: 500;
    transition: background 0.2s;
}

.admin-sidebar__link:hover {
    background: var(--bg);
    color: var(--primary);
}

.admin-sidebar__link.active {
    background: var(--bg);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header__title {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
}

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

.admin-table tr:hover td {
    background: var(--bg);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge--pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge--confirmed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge--cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge--completed {
    background: #dbeafe;
    color: #1e40af;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 1rem;
}

.calendar__header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.5rem;
}

.calendar__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.calendar__day:hover:not(.disabled) {
    background: var(--bg);
}

.calendar__day.selected {
    background: var(--primary);
    color: white;
}

.calendar__day.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar__day.in-range {
    background: #dbeafe;
}

.calendar__day.unavailable {
    background: #fee2e2;
    cursor: not-allowed;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal__actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination__link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
}

.pagination__link:hover {
    background: var(--bg);
}

.pagination__link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.footer {
    background: var(--text);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__copy,
.footer__powered {
    font-size: 0.875rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .nav__menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__toggle {
        display: flex;
    }

    .hero__title {
        font-size: 1.75rem;
    }

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

    .property-detail__grid {
        grid-template-columns: 1fr;
    }

    .property-detail__info {
        position: static;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .footer__content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.star-rating {
    color: var(--warning);
}

.img-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.file-upload__input {
    display: none;
}

.file-upload__text {
    color: var(--text-light);
    font-size: 0.875rem;
}

.images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.images-preview__item {
    position: relative;
    width: 100px;
}

.images-preview__img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.images-preview__remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
}
