* {
    box-sizing: border-box;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: sans-serif, Arial, Helvetica;
    background: #fff;
    color: #202533;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   HEADER
========================= */

.topbar {
    padding: 18px 20px;
    border-bottom: 1px solid #e5eeee;

    background: linear-gradient(
        to bottom,
        #d9f5f5 0%,
        #eafafa 65%,
        #ffffff 100%
    );

    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;

    width: 40px;
    height: 40px;

    border-radius: 13px;

    color: #fff;
    font-size: 25px;

    background: linear-gradient(
        135deg,
        #ef3340,
        #ff7a00,
        #ffd400,
        #2ebd59,
        #00a8e8,
        #4169e1,
        #8a2be2
    );
}

.brand-text {
    font-size: 22px;

    background: linear-gradient(
        90deg,
        #ef3340,
        #ff7a00,
        #ffd400,
        #2ebd59,
        #00a8e8,
        #4169e1,
        #8a2be2
    );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


/* =========================
   PAGE
========================= */

.page {
    max-width: 920px;
    margin: auto;
    padding: 22px 20px 110px;
}

.hero {
    text-align: center;
    padding: 0px 0 10px;
}

.hero h1 {
    font-size: 34px;
    margin: 0 0 8px;
}

.hero p {
    margin: 2px 0 16px;
}

/* =========================
   CARD
========================= */

.card {
    border: 1px solid #e4e6ea;
    border-radius: 18px;

    padding: 20px;
    margin-bottom: 22px;

    background: #fff;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}


/* =========================
   SEARCH
========================= */

.search {
    display: flex;
    align-items: center;

    width: 100%;
    height: 52px;

    padding: 6px;

    background: #fff;

    border: 1px solid #9bd8cf;
    border-radius: 10px;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.search input {
    flex: 1;

    width: 100%;
    height: 100%;

    padding: 0 16px;

    border: none;
    outline: none;

    background: transparent;

    font-size: 16px;
}

.search input::placeholder {
    color: #999;
}

.search-btn {
    height: 38px;

    padding: 0 26px;

    border: none;
    border-radius: 7px;

    background: #666;
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;
}

.search-btn:hover {
    background: #444;
}


.search-form {
    width: 100%;
}

.search-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 18px;

    margin-bottom: 10px;
}

.filter-option {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    white-space: nowrap;
}

.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;

    margin: 0;
    padding: 0;

    cursor: pointer;
}
/* =========================
   STATUS
========================= */

.status {
    font-weight: 800;
    margin-bottom: 5px;
}

.status.green {
    color: #169447;
}

.status.red {
    color: #e23636;
}

.status.yellow {
    color: #d99a00;
}

.status.gray {
    color: #777;
}


/* =========================
   RESTAURANT LIST
========================= */

.restaurant-grid {
    display: grid;
    gap: 14px;
}

.restaurant-item {
    border: 1px solid #e6e7eb;
    border-radius: 14px;
    padding: 10px 15px;
}

.restaurant-item h3 {
    margin: 0 0 6px;
}

.restaurant-commission {
    margin-top: 7px;
    font-weight: 700;
}

html {
    scroll-behavior: smooth;
}

#stats,
#restaurants {
    scroll-margin-top: 86px;
}

.restaurant-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 8px 5px;
}


.restaurant-category {
    display: inline-block;

    margin-bottom: 0px;
    padding: 4px 8px;

    background: #f1f3f5;

    border-radius: 6px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    color: #555;
}

/* ========================================
   MÀU QUÁN THEO TRẠNG THÁI HOA HỒNG
======================================== */

/* Có hoa hồng */
.restaurant-item.restaurant-status-HasCommission {
    border-color: #36b66a;
    /*background: #f1fbf5;*/
}

.restaurant-item.restaurant-status-HasCommission h3 {
    color: #169447;
}


/* Không hoa hồng */
.restaurant-item.restaurant-status-NoCommission {
    border-color: #e25555;
    /*background: #fff5f5;*/
}

.restaurant-item.restaurant-status-NoCommission h3 {
    color: #e23636;
}


/* Chờ xác nhận */
.restaurant-item.restaurant-status-Pending {
    border-color: #e4ae32;
    /*background: #fffaf0;*/
}

.restaurant-item.restaurant-status-Pending h3 {
    color: #d99a00;
}


/* Chưa rõ */
.restaurant-item.restaurant-status-Unknown {
    border-color: #a9adb3;
    /*background: #f7f7f8;*/
}

.restaurant-item.restaurant-status-Unknown h3 {
    color: #777;
}
/* =========================
   FORM
========================= */

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    border: 1px solid #d6d8dd;
    border-radius: 11px;

    padding: 12px 13px;

    font: inherit;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.forgot-password-row {
    text-align: right;
    margin-top: -7px;
    margin-bottom: 12px;
}

.forgot-password-row a {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.forgot-password-row a:hover {
    text-decoration: underline;
}

/* =========================
   BUTTON
========================= */

.btn {
    display: inline-block;

    border: 0;
    border-radius: 11px;

    padding: 12px 16px;

    background: #111;
    color: #fff;

    font-weight: 700;
    cursor: pointer;
}

.btn.secondary {
    background: #eee;
    color: #222;
}

.btn.danger {
    background: #c92a2a;
}

.btn.warn {
    background: #d48c00;
}


/* =========================
   FLASH MESSAGE
========================= */

.flash {
    padding: 12px 14px;

    border-radius: 10px;

    background: #eef8f0;

    margin-bottom: 16px;
}

.flash.error {
    background: #fff0f0;
    color: #a20f0f;
}


/* =========================
   GENERAL
========================= */

.muted {
    color: #777;
    font-size: 14px;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}


/* =========================
   ADMIN
========================= */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 14px;
}

.stat {
    padding: 15px;
    border: 1px solid #e5e6e9;
    border-radius: 14px;
}

.admin-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.restaurant-item {
    position: relative;
}

.restaurant-main-link {
    display: block;
}


/* Nút sửa Admin */
.restaurant-edit-btn {
    position: absolute;

    top: 5px;
    right: 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background: #f1f3f5;
    color: #555;

    z-index: 5;
}

.restaurant-edit-btn svg {
    width: 18px;
    height: 18px;

    fill: currentColor;
}

.restaurant-edit-btn:hover {
    background: #111;
    color: #fff;
}


/* =========================
   RESTAURANT DETAIL
========================= */

.detail-block {
    margin: 10px 0;
}

.note-box {
    padding: 10px;
    border-radius: 14px;

    background: #f6f7f9;

    margin: 5px 0;
}

.note-box p {
    margin: 10px 0 0;
}

.detail-card {
    position: relative;
    margin-bottom: 22px;
}


/* =========================
   REVIEW
========================= */

.review-section {
    margin-top: 22px;
}

.review-section h2 {
    margin-top: 0;
}

.review-summary {
    display: flex;
    gap: 14px;
    align-items: center;

    padding: 16px;
    border-radius: 14px;
    background: #f6f7f9;
    margin-top: 20px;

    position: relative;
}

.review-views {
    position: absolute;

    right: 12px;
    bottom: 8px;

    color: #777;
    font-size: 14px;

    white-space: nowrap;
}

.score {
    font-size: 30px;
    font-weight: 800;
}

.review-editor,
.review-login-box,
.review-list {
    margin-top: 18px;
}

.review-card {
    border: 1px solid #e6e7eb;
    border-radius: 14px;

    padding: 16px;
    margin-top: 14px;
}

.review-hidden {
    opacity: 0.65;
    background: #fafafa;
}

.stars {
    color: #f3aa00;
    font-size: 19px;
}

.review-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;

    margin-top: 10px;
}

.review-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 12px;

    font-size: 14px;
}


/* =========================
   TABLE
========================= */

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;

    padding: 10px;

    border-bottom: 1px solid #eee;

    vertical-align: top;
}


/* =========================
   BOTTOM NAVIGATION
========================= */

.bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    background: #fff;

    border-top: 1px solid #ddd;

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    padding: 8px 8px 10px;

    z-index: 20;
}

.bottom-nav a {
    text-align: center;
    font-size: 18px;
}

.bottom-nav small {
    display: block;

    font-size: 11px;

    margin-top: 4px;
}

.plus {
    display: grid !important;
    place-items: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: #111;
    color: #fff;

    font-size: 30px;

    margin: -25px auto 2px;
}

.bottom-icon {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0 auto 4px;
    fill: currentColor;
}

/* =========================
   REMEMBER LOGIN
========================= */

.remember-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 7px !important;

    width: 100% !important;

    margin: 12px 0 16px 0 !important;
}

.remember-row input[type="checkbox"] {
    display: inline-block !important;

    width: 16px !important;
    height: 16px !important;

    min-width: 16px !important;
    max-width: 16px !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 16px !important;
}

.remember-row label {
    display: inline-block !important;

    width: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: none !important;

    font-weight: 400 !important;

    white-space: nowrap;

    cursor: pointer;
}
/* ========================================
   INPUT CÓ NÚT DÁN
======================================== */

.paste-input {
    position: relative;
    width: 100%;
}


.paste-input input {
    width: 100%;
}


/* Nút Dán mặc định ẩn */

.paste-btn {
    position: absolute;

    top: 50%;
    right: 6px;

    transform:
        translateY(-50%)
        scale(.92);

    border: 0;
    border-radius: 7px;

    padding: 7px 11px;

    background: #eee;
    color: #333;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .15s ease,
        transform .15s ease,
        visibility .15s;
}


/* Khi focus mới hiện */

.paste-btn.show {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(-50%)
        scale(1);
}


/* Chừa khoảng trống cho nút */

.paste-input:focus-within input {
    padding-right: 55px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {

    .page {
        padding: 16px 12px 100px;
    }

    .card {
        padding: 16px 16px 16px 16px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .review-section {
        margin-top: 18px;
    }

    .detail-card {
        margin-bottom: 18px;
    }
}

/* Trang chi tiết quán */
.detail-card .status {
    margin-bottom: 5px;
}

.detail-card h1 {
    margin-top: 0;
    margin-bottom: 14px;
}

/* Phần đầu trang chi tiết quán */
.detail-card h1 {
    margin: 0 0 0px 0;
}

.detail-card .restaurant-category {
    margin: 0 0 0px 0;
}

.detail-card .restaurant-category + .detail-block {
    margin-top: 0;
}

/* */
.restaurant-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.restaurant-info-row .detail-block {
    margin: 8px 0;
}

.added-by {
    margin-left: auto !important;
    text-align: right;
}


