* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f6fb;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

button, input, select {
    font-family: inherit;
}

.app {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 16px 96px;
}

.top-title {
    height: 52px;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    color: #111827;
    font-weight: 800;
    text-align: center;
}

.top-title a,
.top-title button {
    color: #111827;
    text-decoration: none;
    border: 0;
    background: transparent;
    font-size: 20px;
}

.lang-switch {
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
}

.lang-trigger {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 0;
    color: #111827;
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.lang-trigger span {
    font-size: 10px;
    font-weight: 800;
}

.lang-menu {
    position: absolute;
    top: 30px;
    left: 0;
    z-index: 80;
    width: 160px;
    max-height: 260px;
    overflow: auto;
    display: none;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.lang-switch.open .lang-menu {
    display: block;
}

.lang-menu button {
    width: 100%;
    min-height: 38px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    background: #fff;
    color: #111827;
    text-align: left;
    font-size: 13px;
}

.lang-menu button.active {
    color: #1f53e8;
    background: #eef4ff;
}

.lang-menu img {
    width: 20px;
}

.user-dot {
    color: #1f5bea;
}

.search-panel,
.auth-card,
.panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 10px rgba(15, 23, 42, .04);
}

.search-panel {
    padding: 16px;
    margin-bottom: 14px;
}

.field-line {
    position: relative;
    border-bottom: 1px solid #eef0f4;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.field-line i {
    color: #9ca3af;
    width: 24px;
    text-align: center;
}

.field-line input,
.field-line select {
    flex: 1;
    border: 0;
    outline: 0;
    height: 48px;
    padding: 0 8px;
    background: transparent;
    font-size: 14px;
    color: #111827;
}

.field-clear {
    color: #9ca3af;
}

.booking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    border-bottom: 1px solid #eef0f4;
    padding: 12px 0 8px;
}

.booking-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.booking-value input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0;
    font-size: 14px;
    color: #111827;
    background: transparent;
}

.counter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 0 0;
}

.counter-row label {
    color: #111827;
    font-size: 14px;
}

.counter-row input {
    width: 44px;
    border: 0;
    outline: 0;
    text-align: right;
    font-size: 14px;
}

.primary-btn {
    width: 100%;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #1f53e8;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.search-panel .primary-btn {
    margin-top: 18px;
}

.hotel-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 10px rgba(15, 23, 42, .04);
}

.hotel-card img {
    width: 100%;
    height: 160px;
    display: block;
    object-fit: cover;
}

.hotel-card-body {
    padding: 14px;
}

.hotel-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
}

.muted-line {
    display: flex;
    gap: 6px;
    align-items: center;
    color: #6b7280;
    font-size: 12px;
}

.price-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
}

.price-label {
    color: #8b8f99;
    font-size: 12px;
}

.old-price {
    color: #8b8f99;
    text-decoration: line-through;
    font-size: 12px;
    margin-right: 8px;
}

.price {
    color: #e8505b;
    font-weight: 900;
    font-size: 17px;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 50;
    width: 100%;
    max-width: 500px;
    height: 64px;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .08);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #111827;
    text-decoration: none;
    font-size: 11px;
}

.bottom-nav a.active {
    color: #1f53e8;
}

.bottom-nav i {
    font-size: 19px;
}

.auth-screen {
    max-width: 500px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 32px;
    background: linear-gradient(140deg, #fbffff 0%, #eefaff 45%, #f7fbff 100%);
}

.auth-lang {
    text-align: right;
    font-size: 21px;
}

.auth-brand {
    text-align: center;
    margin: 16px 0 36px;
}

.logo-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2588ff, #7b4dff);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(31, 83, 232, .2);
}

.brand-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    object-fit: contain;
    display: block;
}

.auth-brand h1 {
    font-size: 24px;
    margin: 0;
}

.auth-form label {
    display: block;
    margin-top: 24px;
    font-size: 14px;
    color: #374151;
}

.auth-form input {
    width: 100%;
    height: 46px;
    border: 0;
    border-bottom: 1px solid #dce3ea;
    background: transparent;
    outline: 0;
    font-size: 15px;
}

.auth-form .primary-btn {
    margin-top: 48px;
}

.auth-link {
    margin-top: 28px;
    text-align: center;
    color: #8b8f99;
    font-size: 13px;
}

.auth-link a {
    color: #1f53e8;
    text-decoration: none;
    font-weight: 700;
}

.alert {
    margin: 12px 0;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.alert.error {
    background: #fff1f2;
    color: #c02636;
}

.alert.success {
    background: #ecfdf3;
    color: #15803d;
}

.detail-hero {
    margin: 0 -16px;
}

.detail-hero img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.detail-panel {
    background: #fff;
    border-radius: 18px 18px 0 0;
    margin: -18px -16px 0;
    padding: 18px 16px 92px;
    position: relative;
}

.detail-panel h1 {
    font-size: 21px;
    line-height: 1.35;
    margin: 0 0 10px;
}

.detail-copy {
    color: #4b5563;
    line-height: 1.7;
    margin: 14px 0 0;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}

.mini-box {
    background: #f7f8fb;
    border-radius: 10px;
    padding: 12px;
}

.mini-box input,
.mini-box select {
    width: 100%;
    border: 0;
    background: transparent;
    outline: 0;
}

.mini-label {
    color: #8b8f99;
    font-size: 12px;
    margin-bottom: 5px;
}

.fixed-book {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -3px 16px rgba(15, 23, 42, .08);
}

.order-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.order-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.badge {
    color: #1f53e8;
    background: #eef4ff;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    white-space: nowrap;
}

.button-link {
    text-decoration: none;
}

.outline-btn {
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #1f53e8;
    border-radius: 8px;
    background: #fff;
    color: #1f53e8;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.outline-btn.block {
    margin-top: 10px;
}

.hotel-summary {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #fff;
}

.hotel-summary img {
    width: 92px;
    height: 82px;
    border-radius: 10px;
    object-fit: cover;
}

.hotel-summary h1 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.form-panel,
.pay-panel,
.records-panel {
    padding: 16px;
}

.form-panel label {
    display: block;
    margin-bottom: 14px;
}

.form-panel label span {
    display: block;
    color: #7b8190;
    font-size: 12px;
    margin-bottom: 7px;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    outline: 0;
    padding: 0 11px;
    background: #fff;
    color: #111827;
    font-size: 14px;
}

.form-panel textarea {
    padding: 10px 11px;
    resize: vertical;
}

.split-fields {
    display: grid;
    grid-template-columns: .58fr 1fr;
    gap: 10px;
}

.split-fields:first-of-type {
    grid-template-columns: 100px 1fr;
}

.split-fields.thirds {
    grid-template-columns: repeat(3, 1fr);
}

.total-box {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    margin: 4px 0 16px;
    border-radius: 10px;
    background: #f7f9fe;
}

.total-box span {
    color: #7b8190;
    font-size: 13px;
}

.total-box strong {
    color: #e8505b;
    font-size: 20px;
}

.total-box.large {
    margin-top: 18px;
}

.wallet-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f53e8, #4c7dff);
    color: #fff;
    box-shadow: 0 12px 24px rgba(31, 83, 232, .18);
}

.wallet-card span {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
}

.wallet-card strong {
    grid-column: 1 / 2;
    font-size: 28px;
}

.wallet-card a {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    min-width: 84px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #fff;
    color: #1f53e8;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.summary-list {
    margin-top: 12px;
    border-top: 1px solid #eef0f4;
}

.summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #eef0f4;
}

.summary-list span {
    color: #7b8190;
    font-size: 12px;
}

.summary-list strong {
    text-align: right;
    font-size: 13px;
}

.summary-list.compact div {
    padding: 9px 0;
}

.tab-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 -16px 14px;
    background: #fff;
}

.tab-bar a {
    padding: 13px 4px;
    border-bottom: 2px solid transparent;
    color: #7b8190;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.tab-bar a.active {
    border-color: #1f53e8;
    color: #1f53e8;
    font-weight: 800;
}

.empty-panel {
    padding: 32px;
    text-align: center;
    color: #6b7280;
}

.empty-panel.inner {
    padding: 18px 0;
}

.order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.order-actions form {
    margin: 0;
}

.order-actions .primary-btn,
.order-actions .outline-btn {
    height: 42px;
    min-height: 42px;
    font-size: 14px;
}

.order-actions .button-link:only-child {
    grid-column: 1 / -1;
}

.profile-head {
    padding: 14px 0 8px;
    text-align: center;
}

.profile-head h1 {
    margin: 8px 0 4px;
    font-size: 20px;
}

.profile-head p {
    margin: 0;
    color: #7b8190;
    font-size: 13px;
}

.account-card {
    margin-top: 24px;
    padding: 20px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f4;
}

.account-row span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-row i {
    width: 18px;
    color: #1f53e8;
    text-align: center;
}

.link-row {
    color: inherit;
    text-decoration: none;
}

.logout {
    color: #e8505b;
    text-decoration: none;
    font-weight: 800;
}

.copy-box {
    display: grid;
    gap: 8px;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: #f7f9fe;
}

.copy-box span {
    color: #7b8190;
    font-size: 12px;
}

.copy-box strong,
.copy-box pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 13px;
    line-height: 1.5;
}

.copy-box .outline-btn {
    width: 96px;
    min-height: 36px;
}

.records-panel {
    margin-top: 14px;
}

.records-panel h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.record-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #eef0f4;
}

.record-row div {
    display: grid;
    gap: 5px;
}

.record-row div:last-child {
    justify-items: end;
}

.record-row span {
    color: #7b8190;
    font-size: 12px;
}

@media (max-width: 380px) {
    .split-fields,
    .split-fields:first-of-type,
    .split-fields.thirds,
    .order-actions {
        grid-template-columns: 1fr;
    }

    .hotel-summary {
        grid-template-columns: 78px 1fr;
    }

    .hotel-summary img {
        width: 78px;
        height: 74px;
    }
}
