body {
    background: #f6fbff;
    font-family: 'Segoe UI', sans-serif;
}

/* ===== TEXT ===== */
.seo-section {
    padding: 22px 18px 10px;
}

.seo-section h1 {
    font-size: 26px;
    font-weight: 900;
    color: #0b2a3d;
}

.seo-section h1 span {
    color: #1e88e5;
}

.seo-section p {
    margin-top: 10px;
    font-size: 15px;
    color: #5f7285;
    line-height: 1.7;
}

/* ===== SLIDER BOX ===== */
.slider-box {
    margin: 14px auto 42px;
    width: calc(100% - 12px);
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ===== SLIDER ===== */
.social-slider {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 6px;
    scroll-padding: 10px;
}

.social-slider::-webkit-scrollbar {
    height: 4px;
}

.social-slider::-webkit-scrollbar-thumb {
    background: #cfd8dc;
    border-radius: 10px;
}

/* ===== TAB ===== */
.social-item {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #6b7f90;
    cursor: pointer;
    white-space: nowrap;
}

/* ACTIVE */
.social-item.active {
    background: #eef6fd;
    color: #1e88e5;
}

/* ICON */
.social-item i {
    font-size: 16px;
}

/* ===== SELECT TEXT ===== */
.selected-text {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e88e5;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    margin-top: 40px;
    font-size: 13px;
    color: #555;
    padding: 20px 0;
}

/* ===== FAVORITES WRAPPER (OUTER SPACE CONTROL) ===== */
.fav-wrapper {
    width: calc(100% - 12px);
    margin: 0 auto 32px;
    box-sizing: border-box;
}

/* ===== FAVORITES BUTTON (SMALL PILL LIKE ORIGINAL) ===== */
.fav-box {
    display: inline-flex;
    /* 🔥 KEY FIX (not full width) */
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ffffff;
    /* only button is white */
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    font-weight: 600;
    color: #6b7f90;
}

/* ICON */
.fav-box i {
    color: #ff4d4f;
    font-size: 18px;
}


/* ===== ORDER CARD ===== */
.order-card {
    width: calc(100% - 12px);
    max-width: 100%;
    margin: 32px auto 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;

    box-sizing: border-box;
}


/* 🔥 MOBILE PERFECT FIX */
@media (max-width: 768px) {

    .order-card,
    .slider-box,
    .fav-wrapper {
        width: calc(100% - 6px);
        margin-left: auto;
        margin-right: auto;

        box-sizing: border-box;
    }

    .order-body {
        padding: 14px;
    }

    body {
        overflow-x: hidden;
    }
}

/* HEADER */
.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f4f7;
}

.order-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #2c3e50;
}

/* BLUE ICON BOX (IMPORTANT FIX) */
.order-header-left i {
    background: #e3f2fd;
    color: #1e88e5;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
}

/* SETTINGS ICON */
.order-header i.fa-gear {
    color: #9e9e9e;
}

/* BODY */
.order-body {
    padding: 16px;
}

/* LABEL */
.order-body label {
    font-size: 14px;
    font-weight: 700;
    /* 🔥 makes it bold */
    color: #1f2d3d;
    /* 🔥 dark color */
    margin-bottom: 6px;
    display: block;
}

/* ===== DROPDOWN FIX (MAIN ISSUE) ===== */
.custom-select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e4eaf0;
    background: #f9fbfd;
    font-size: 14px;
    margin-bottom: 14px;
    appearance: none;
}

/* spacing between fields */
.custom-select+label {
    margin-top: 10px;
}


/* ===== CUSTOM DROPDOWN ===== */
.custom-dropdown {
    position: relative;
    margin-bottom: 14px;
}

/* SELECT BOX */
.dropdown-selected {
    background: #f9fbfd;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-selected.active {
    border-color: #c5d0dc;
    box-shadow: 0 0 0 1px #d7e0ea;
}

/* ICON */
.dropdown-selected i {
    color: #6b7f90;
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-5px);
    transition: 0.2s ease;
    pointer-events: none;
    max-height: 220px;
    /* 🔥 ensures all items visible */
    overflow-y: auto;
    z-index: 100;
}

/* ITEMS */
.dropdown-menu div {
    padding: 14px;
    font-size: 14px;
    cursor: pointer;
}

/* HOVER */
.dropdown-menu div:hover {
    background: #f1f5f9;
}

/* ACTIVE ITEM */
.dropdown-menu div.active {
    background: #e3f2fd;
    color: #1e88e5;
    font-weight: 600;
}


.dropdown-selected.active i {
    transform: rotate(180deg);
    transition: 0.2s;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* ===== SERVICE DROPDOWN ===== */
.service-dropdown {
    position: relative;
}

/* Selected box */
.service-selected {
    background: #f9fbfd;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-selected.active {
    border-color: #c5d0dc;
    box-shadow: 0 0 0 1px #d7e0ea;
}

/* left side */
.service-selected-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

/* TEXT TRUNCATE (...) */
.service-selected-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

/* right side */
.service-selected-right {
    display: flex;
    align-items: center;
    gap: 12px;
    /* better spacing like original */
}

/* arrow like original (top right feel) */
.arrow-icon {
    font-size: 14px;
    color: #6b7f90;
}

/* info icon */
.service-selected-right .fa-circle-info {
    color: #9e9e9e;
}

/* Dropdown */
.service-menu {
    position: absolute;
    width: 100%;
    background: #fff;
    border-radius: 14px;
    margin-top: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 200;
}

/* Each item */
.service-item {
    padding: 14px;
    border-bottom: 1px solid #f1f4f7;
    cursor: pointer;
}

/* Top row */
.service-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* Bottom */


/* Active (blue highlight like image) */
.service-item.active {
    background: #e3f2fd;
}


/* faint heart + ID like original */
/* faint only heart + ID part */
.service-selected-left i {
    color: #9aa6b2;
}

/* split ID + title styling */
#selectedServiceText {
    color: #2c3e50;
    /* main text darker */
}

/* make only ID faint */
.selected-id {
    color: #9aa6b2;
    margin-right: 6px;
}

.selected-title {
    color: #1f2d3d;
    /* darker, closer to original */
    font-weight: 500;
}

/* keep main text darker (after ID) */
.service-selected-left span {
    font-weight: 500;
}

/* Info icon */
.info-icon {
    margin-left: auto;
    color: #9e9e9e;
}

.service-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

/* title */
.service-text strong {
    font-weight: 600;
}

/* ID + RATE line */
.service-text .meta {
    font-size: 12px;
    color: #7d8b99;
    margin-top: 2px;
}

.selected-heart {
    color: #9aa6b2;
    /* light grey like original */
    font-size: 14px;
}

.service-meta-bar {
    margin-top: 8px;
    font-size: 12px;
    color: #7d8b99;
    display: flex;
    gap: 14px;
    padding-left: 2px;
    line-height: 1.3;
}

.service-description {
    margin-top: 14px;
    margin-bottom: 18px;
    /* ✅ ADD THIS */
    background: #eaf3fb;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #d6e6f7;
}

.desc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e88e5;
    margin-bottom: 8px;
}

.desc-header i {
    background: #1e88e5;
    color: #fff;
    font-size: 12px;
    padding: 6px;
    border-radius: 50%;
}

.desc-body {
    font-size: 14px;
    color: #445566;
    line-height: 1.6;
}

/* ===== INPUT BOX ===== */
.input-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fbfd;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 48px;
    /* 🔥 FIXED HEIGHT */
    padding: 0 12px;
    /* 🔥 REMOVE vertical padding */
    margin-bottom: 14px;
}

.input-box:focus-within {
    border-color: #c5d0dc;
    box-shadow: 0 0 0 1px #d7e0ea;
}

.input-box i {
    color: #9aa6b2;
}

.input-box input {
    border: none;
    outline: none;
    flex: 1;
    background: transparent;
    font-size: 13px;
}

/* RIGHT TEXT (VIEWS) */
.input-suffix {
    font-size: 12px;
    color: #7d8b99;
    font-weight: 600;
    white-space: nowrap;
}

/* MIN MAX TEXT */
.quantity-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7d8b99;
    margin-bottom: 14px;
}


/* ===== SPEED BUTTONS ===== */
.speed-options {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.speed-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e4eaf0;
    background: #f9fbfd;
    font-size: 13px;
    cursor: pointer;
}

.speed-btn.active {
    background: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}

/* CUSTOM BOX */
.custom-speed {
    margin-bottom: 10px;
}

/* INFO TEXT */
.speed-info {
    font-size: 13px;
    color: #6b7f90;
    margin-bottom: 16px;
}


/* ===== REACTION TOGGLE ===== */
.reaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* toggle */
.toggle-switch {
    width: 46px;
    height: 48px;
    /* 🔥 MATCH INPUT */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* remove gray stretch */
    position: relative;
}

.toggle-switch::before {
    content: "";
    width: 46px;
    height: 26px;
    background: #d1d5db;
    border-radius: 20px;
    position: absolute;
}

.toggle-switch.active::before {
    background: #1e88e5;
}

.reaction-wrap.active .toggle-switch {
    margin-top: 1px;
}

/* circle */
.toggle-switch::after {
    content: "";
    width: 20px;
    height: 20px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch.active::after {
    left: 23px;
}

/* reaction info */
.reaction-info {
    font-size: 12px;
    color: #7d8b99;
    margin-top: 8px;
    margin-bottom: 8px;
    line-height: 1.4;
}

#reactionToggleSection > label {
    display: block;
    margin-bottom: 8px;
}

.reaction-container {
    position: relative;
    margin-bottom: 10px;
}

/* push toggle to right like original */
.reaction-toggle-wrap {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.reaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}


/* ===== FINAL PERFECT ALIGNMENT ===== */

/* OFF state (under text, same start point) */

/* ON state (move toggle to right) */
/* ===== FINAL CORRECT LAYOUT ===== */

.reaction-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 48px;
}

.reaction-wrap.active {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

/* OFF → toggle visible under label */
.reaction-wrap .toggle-switch {
    align-self: flex-start;
    flex-shrink: 0;
}


/* ensure input fills and stays centered */
.reaction-wrap.active .reaction-input {
    display: flex;
    align-items: center;
    height: 48px;
}

/* input takes full width */
.reaction-input {
    flex: 1;
    height: 48px;
    /* match telesmm */
    display: flex;
    align-items: center;
    /* center input text */
}


/* ===== PLACE ORDER BUTTON ===== */
.place-order-wrap {
    margin-top: 28px;
}

.place-order-btn {
    width: 100%;
    background: #1e88e5;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* icon size */
.place-order-btn i {
    font-size: 16px;
}


/* ===== AUTO VIEW OPTIONS ===== */
.auto-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eaeef3;
}

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

.auto-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2d3d;
}

.auto-sub {
    font-size: 13px;
    color: #6b7f90;
    margin-top: 3px;
}

.auto-input {
    margin-top: 10px;
}



/* 🔥 DISABLED SOCIAL */
.social-item.disabled {
    opacity: 0.6;
    pointer-events: none;
    /* ❌ disable click */
    position: relative;
}

/* COMING SOON BADGE */
.coming-badge {
    font-size: 10px;
    background: #e3f2fd;
    color: #1e88e5;
    padding: 4px 8px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 600;
}


.emoji-item {
    text-align: center;
    font-size: 18px;
    padding: 8px;
    /* 🔥 reduced */
    border-radius: 10px;
    cursor: pointer;
    background: #eef2f6;

    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.2s;

    width: 100%;
    /* 🔥 FIX */
    box-sizing: border-box;
    /* 🔥 FIX */
}

/* 🔥 ADD THIS (HOVER EFFECT LIKE TELESMm) */
.emoji-item:hover {
    opacity: 0.85;
}

.emoji-item.active {
    filter: grayscale(0%);
    /* ✅ color restore */
    opacity: 1;
    background: #ffffff;
    border: 2px solid #4f6cff;
}

#quantityInputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    width: 100%;
    align-items: start;
}

/* MOBILE PERFECT */
@media (max-width:480px) {

    #quantityInputs {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    #quantityInputs>div {
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 0 !important;
    }

}

/* ===== VOTE FETCH UI ===== */

.vote-fetch-box {
    margin-top: 14px;
    border-radius: 22px;
    padding: 26px 18px;
    border: 1px solid #e7edf3;
    background: #fff;
}

.vote-fetch-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vote-fetch-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    font-size: 20px;
}

.vote-fetch-icon i {
    font-size: 20px;
}

.vote-fetch-loading .vote-fetch-icon {
    background: #edf4ff;
    color: #3b82f6;
    animation: spinFetch 1.1s linear infinite;
}

.vote-fetch-error .vote-fetch-icon {
    background: #fff1f2;
    color: #ef4444;
}

.vote-fetch-title {
    font-size: 17px;
    font-weight: 800;
    color: #172b3a;
    margin-bottom: 8px;
}

.vote-fetch-error .vote-fetch-title {
    color: #991b1b;
}

.vote-fetch-sub {
    font-size: 14px;
    line-height: 1.7;
    color: #718096;
    max-width: 260px;
}

.vote-fetch-error .vote-fetch-sub {
    color: #7f1d1d;
}

.vote-retry {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
}



/* HIDE GREEN SUCCESS BOX */
.vote-success {
    display: none !important;
}

/* POLL */
.poll-question {
    margin-top: 22px;
}

.poll-question-label {
    font-size: 11px;
    letter-spacing: 1.6px;
    color: #a4adb7;
    font-weight: 700;
    margin-bottom: 10px;
}

.poll-question-text {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;

    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        sans-serif;
}

/* OPTIONS */
.poll-options {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option {
    background: #fff;
    border: 1px solid #eceff3;

    border-radius: 20px;

    padding: 14px;

    display: flex;
    align-items: center;
    gap: 14px;

    width: 100%;
    box-sizing: border-box;
}

/* NUMBER BOX */
.poll-option-number {

    width: 38px;
    height: 38px;
    min-width: 38px;

    border-radius: 12px;

    background: #f4f5f8;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;

    color: #737b87;
}

/* OPTION TEXT */
.poll-option-text {

    flex: 1;

    font-size: 15px;
    font-weight: 600;

    color: #1f2937;

    line-height: 1.35;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    min-width: 0;

    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        sans-serif;
}

/* ===== SELECTABLE POLL ===== */

.selectable-option {
    cursor: pointer;
    transition: 0.2s ease;
}

.selectable-option.active {
    border: 2px solid #3b82f6;
    background: #eef5ff;
}

.selectable-option.active .poll-option-number {
    background: #3b82f6;
    color: #fff;
}

.poll-check {
    width: 28px;
    height: 28px;
    min-width: 28px;

    border-radius: 50%;

    background: #3b82f6;
    color: #fff;

    display: none;
    align-items: center;
    justify-content: center;

    font-size: 12px;
}

.poll-inline-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poll-inline-qty {
    display: flex;
    align-items: center;
}

.poll-inline-qty input {

    width: 65px;
    height: 36px;

    border-radius: 10px;
    border: 1px solid #dbe3ec;

    background: #fff;

    text-align: center;

    font-size: 14px;
    font-weight: 700;

    outline: none;
}

.selectable-option.active .poll-inline-qty input {
    border-color: #3b82f6;
}

.selectable-option.active .poll-check {
    display: flex;
}

.poll-qty-box {
    margin-top: -2px;
    margin-bottom: 10px;
}

@keyframes spinFetch {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* TARGET LINK ERROR */
.input-box.error {
    border-color: #ef4444 !important;
    background: #fff5f5;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.input-error-text {
    color: #ef4444;
    font-size: 12px;
    margin-top: -6px;
    margin-bottom: 14px;
    display: none;
}

/* ===== EXACT MOBILE TELEGRAM POLL UI ===== */
@media (max-width:480px) {

    /* OUTER BOX */
    .vote-fetch-box {
        padding: 18px 14px !important;
        border-radius: 18px !important;
    }

    /* LOADING ICON */
    .vote-fetch-icon {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;

        border-radius: 12px !important;

        margin-bottom: 10px !important;
    }

    .vote-fetch-icon i {
        font-size: 16px !important;
    }

    /* TITLE */
    .vote-fetch-title {
        font-size: 15px !important;
        margin-bottom: 5px !important;
    }

    /* SUBTEXT */
    .vote-fetch-sub {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    /* QUESTION */
    .poll-question {
        margin-top: 16px !important;
    }

    .poll-question-label {
        font-size: 10px !important;
        margin-bottom: 7px !important;
    }

    .poll-question-text {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    /* OPTIONS WRAPPER */
    .poll-options {
        margin-top: 10px !important;
        gap: 8px !important;
    }

    /* SINGLE OPTION */
    .poll-option {

        padding: 10px !important;

        border-radius: 16px !important;

        gap: 10px !important;
    }

    /* 1 2 BOX */
    .poll-option-number {

        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;

        border-radius: 9px !important;

        font-size: 12px !important;
        font-weight: 700 !important;
    }

    /* OPTION TEXT */
    .poll-option-text {

        font-size: 14px !important;
        line-height: 1.4 !important;
    }

    /* RETRY */
    .vote-retry {
        font-size: 13px !important;
        margin-top: 14px !important;
    }

}

/* ===== GLOBAL BUTTON TAP EFFECT ===== */

.place-order-btn {
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.place-order-btn:disabled,
.place-order-btn.is-placing {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    filter: none !important;
}

/* MOBILE TAP */
.place-order-btn:active:not(:disabled):not(.is-placing) {
    transform: scale(0.96);
    filter: brightness(0.88);

    box-shadow:
        inset 0 4px 12px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

/* EXTRA PRESSED LOOK */
.place-order-btn:active::after {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.08);

    border-radius: inherit;
}


/* ===== RECENT HEADER ===== */

.recent-orders-head {

    margin-top: 34px;

    padding-top: 8px;

    padding-left: 22px;

    padding-right: 22px;

    border-top: 1px solid #edf2f8;
}

.recent-orders-top {

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.recent-orders-title {

    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 15px;
    font-weight: 800;

    color: #1f2937;
}

.recent-orders-title i {

    color: #4a7fe2;
}

.recent-orders-service {

    display: flex;
    flex-wrap: wrap;

    align-items: center;

    gap: 8px;

    line-height: 1.5;
}

.service-id-badge {

    background: #eef4ff;

    color: #2f6fe4;

    border: 1px solid #d7e5ff;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}

.recent-service-name {

    color: #5f6b7a;

    font-size: 13px;
    font-weight: 600;
}

.recent-divider {

    height: 1px;

    background: #edf2f8;

    margin: 16px 0 14px;
}

/* ===== STATUS BUTTONS ===== */

.order-status-wrapper {

    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 10px;

    width: 100%;

    margin-top: 4px;

    padding-left: 22px;
    padding-right: 22px;

    box-sizing: border-box;
}

.status-card {

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    height: 38px;

    padding: 0 18px;

    border-radius: 12px;

    text-decoration: none;

    background: #ffffff;

    border: 1px solid #dce8ff;

    color: #4a7fe2;

    white-space: nowrap;

    font-size: 13px;
    font-weight: 700;

    transition: all .16s ease;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.04);
}

.status-card strong {

    font-size: 13px;
    font-weight: 800;

    color: #58729d;
}

.status-card.active {

    background:
        linear-gradient(135deg,
            #eef4ff,
            #ddeaff);

    border: 1px solid #bfd6ff;

    color: #2f6fe4;

    box-shadow:
        0 5px 14px rgba(47, 111, 228, 0.12);
}

.status-card.active strong {
    color: #2f6fe4;
}

.status-card:hover {

    transform: translateY(-2px);

    background: #f8fbff;

    border-color: #aac9ff;

    box-shadow:
        0 8px 18px rgba(47, 111, 228, 0.10);
}

.status-card:active {
    transform: scale(0.98);
}

/* ===== MOBILE ===== */

@media(max-width:768px) {

    .recent-orders-title {

        font-size: 14px;
    }

    .recent-service-name {

        font-size: 12px;
    }

    .order-status-wrapper {

        gap: 7px;
    }

    .status-card {

        height: 34px;

        padding: 0 14px;

        border-radius: 10px;

        font-size: 12px;
    }

    .status-card strong {
        font-size: 12px;
    }

}


/* ===== RECENT ORDERS TABLE ===== */

.recent-orders-table-wrap {

    margin-top: 18px;

    width: 100%;

    padding-left: 22px;
    padding-right: 22px;
    box-sizing: border-box;
}

.recent-orders-scroll {

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border: 1px solid #e7edf6;

    border-radius: 0;

    background: #fff;

    scrollbar-width: thin;
}

.recent-orders-table {

    width: 100%;

    min-width: 760px;

    border-collapse: collapse;
}

.recent-orders-scroll::-webkit-scrollbar {

    height: 8px;
}

.recent-orders-scroll::-webkit-scrollbar-track {

    background: #eef3fb;
}

.recent-orders-scroll::-webkit-scrollbar-thumb {

    background: #c7d7f7;

    border-radius: 20px;
}

.recent-orders-scroll::-webkit-scrollbar-thumb:hover {

    background: #aac3f2;
}

.recent-orders-table thead {

    background: #f8fbff;
}

.recent-orders-table th {

    padding: 18px 20px;

    text-align: left;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: .5px;

    color: #7b8794;

    border-bottom: 1px solid #edf2f7;

    white-space: nowrap;
}

.recent-orders-table td {

    padding: 20px;

    font-size: 14px;
    font-weight: 600;

    color: #2d3748;

    border-bottom: 1px solid #f1f5f9;

    white-space: nowrap;
}

.recent-orders-table tr:last-child td {

    border-bottom: none;
}

.order-link-cell {

    max-width: 260px;
}

.order-link-cell a {

    color: #374151;

    text-decoration: none;

    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    transition: .15s ease;
}

.order-link-cell a:hover {

    color: #2f6fe4;
}

.order-id-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.order-id-num {
    font-weight: 700;
    color: #1f2937;
}

.order-refill-btn {
    appearance: none;
    border: 1px solid #c4b5fd;
    background: #ffffff;
    color: #6d28d9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.order-refill-btn:hover:not(:disabled) {
    background: #f5f3ff;
    border-color: #8b5cf6;
}

.order-refill-btn.is-disabled,
.order-refill-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: #7c3aed;
}

.order-refill-btn.is-busy {
    opacity: 0.7;
    cursor: wait;
}

.order-cancel-btn {
    appearance: none;
    border: none;
    background: #e11d48;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.order-cancel-btn:hover:not(:disabled) {
    background: #be123c;
}

.order-cancel-btn:disabled,
.order-cancel-btn.is-busy {
    opacity: 0.55;
    cursor: wait;
}

.order-qty-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    line-height: 1.35;
    color: #374151;
    text-align: left;
}

.order-qty-meta strong {
    font-weight: 700;
    color: #111827;
}

.table-status {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 95px;

    height: 38px;

    padding: 0 16px;

    border-radius: 12px;

    font-size: 13px;
    font-weight: 700;

    text-transform: capitalize;
}

/* PENDING */

.table-status.pending {

    background: #f5f7fb;

    border: 1px solid #e4e9f2;

    color: #4b5563;
}

/* COMPLETED */

.table-status.completed {

    background: #ecfdf3;

    border: 1px solid #bbf7d0;

    color: #15803d;
}

.table-status.partial {

    background: #fff7ed;

    border: 1px solid #fed7aa;

    color: #c2410c;
}

/* IN PROGRESS */

.table-status.in-progress {

    background: #eef4ff;

    border: 1px solid #cfe0ff;

    color: #2f6fe4;
}

/* FAILED */

.table-status.failed {

    background: #fff1f2;

    border: 1px solid #fecdd3;

    color: #e11d48;
}

/* CANCELLED */

.table-status.cancelled {

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    color: #64748b;
}

/* MOBILE */

@media(max-width:768px) {

    .recent-orders-table th {

        padding: 16px 14px;

        font-size: 12px;
    }

    .recent-orders-table td {

        padding: 18px 14px;

        font-size: 13px;
    }

    .table-status {

        min-width: 88px;

        height: 34px;

        font-size: 12px;
    }

}


/* =========================================
   AUTO SERVICES CARDS (1112 + 1116)
========================================= */

.auto-orders-wrap {
    width: 100%;
    padding: 22px 22px 0;
    box-sizing: border-box;
    display: none;
}

.auto-orders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.auto-order-card {
    background: #fff;
    border: 1px solid #dce8ff;
    border-top: 3px solid #4a7fe2;
    border-radius: 20px;
    padding: 22px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(47, 111, 228, 0.08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.auto-order-card:hover {
    box-shadow: 0 10px 36px rgba(47, 111, 228, 0.15);
    transform: translateY(-3px);
}

.auto-order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.auto-order-left {
    flex: 1;
    min-width: 0;
}

.auto-order-name {
    font-size: 15px;
    font-weight: 800;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.auto-order-link {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-order-link a {
    color: #4a7fe2;
    text-decoration: none;
}

.auto-order-link a:hover {
    text-decoration: underline;
}

.auto-order-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.auto-id-badge {
    background: #eef4ff;
    color: #2f6fe4;
    border: 1px solid #d7e5ff;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.auto-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: .15s ease;
}

.auto-action-btn:hover {
    transform: translateY(-2px);
    border-color: #bfd6ff;
    background: #eef4ff;
    color: #2f6fe4;
}

.auto-stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.auto-stat-box {
    background: #f4f8ff;
    border: 1px solid #dce8ff;
    border-radius: 14px;
    padding: 14px 12px;
    min-width: 0;
    text-align: center;
}

.auto-stat-label {
    font-size: 10px;
    font-weight: 800;
    color: #7b8794;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auto-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
}

.auto-order-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.auto-running {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e9f9ef;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 800;
}

.auto-running::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 1.4s ease infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ===== STATUS TOGGLE ===== */

.status-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.status-toggle-track {
    position: relative;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.status-toggle-track.on {
    background: #22c55e;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.status-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.status-toggle-track.on .status-toggle-thumb {
    transform: translateX(24px);
}

.status-toggle-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #6b7280;
    transition: color .2s ease;
    min-width: 52px;
}

.status-toggle-wrap.on .status-toggle-label {
    color: #15803d;
}

@media(max-width:1024px) {
    .auto-orders-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .auto-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:768px) {

    .auto-orders-wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auto-orders-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .auto-order-card {
        padding: 16px;
        border-radius: 18px;
    }

    .auto-order-actions {
        gap: 6px;
    }

    .auto-action-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .auto-id-badge {
        font-size: 11px;
        padding: 5px 8px;
    }

    .auto-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .auto-stat-box {
        padding: 12px 8px;
        border-radius: 12px;
    }

}

/* =========================================
   DELETE POPUP
========================================= */

.delete-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .18s ease;
}

.delete-popup {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 28px;
    padding: 26px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: popupScale .18s ease;
}

.delete-popup-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fff1f2;
    color: #e11d48;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.delete-popup-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.delete-popup-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
}

.delete-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.delete-btn-cancel,
.delete-btn-confirm {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s ease;
}

.delete-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.delete-btn-confirm {
    background: #ef4444;
    color: #fff;
}

.delete-btn-cancel:hover,
.delete-btn-confirm:hover {
    transform: translateY(-2px);
}

@keyframes popupScale {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ===== PAGINATION ===== */

.recent-pagination {

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 22px;
    margin-bottom: 56px;

    flex-wrap: wrap;
}

.page-btn {

    width: 38px;
    height: 38px;

    border: none;

    border-radius: 12px;

    background: #f4f8ff;

    color: #4a7fe2;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: .15s ease;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-btn:hover {

    transform: translateY(-2px);

    background: #eaf2ff;
}

.page-btn.active {

    background: #2f6fe4;

    color: #fff;

    box-shadow:
        0 8px 18px rgba(47, 111, 228, 0.20);
}

.page-dots {

    color: #94a3b8;

    font-weight: 700;

    padding: 0 2px;
}


/* =========================================
   MODERN EDIT POPUP
========================================= */

.edit-modern-popup {
    width: 100%;
    max-width: 620px;

    background:
        linear-gradient(180deg,
            #ffffff,
            #fbfcff);

    border-radius: 32px;

    border: 1px solid #e8eefc;

    padding: 28px;

    box-shadow:
        0 25px 80px rgba(15, 23, 42, 0.16),
        0 8px 30px rgba(47, 111, 228, 0.10);

    animation: editPopupShow .18s ease;
}

@keyframes editPopupShow {

    from {
        opacity: 0;
        transform: scale(.96) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* HEADER */

.edit-popup-header {

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 16px;

    padding-bottom: 22px;

    border-bottom: 1px solid #edf2f8;
}

.edit-popup-title {

    font-size: 30px;
    font-weight: 900;

    color: #111827;

    line-height: 1.1;

    letter-spacing: -0.5px;
}

.edit-popup-link {

    margin-top: 10px;

    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 600;

    color: #64748b;

    background: #f8fbff;

    border: 1px solid #e5edff;

    padding: 10px 14px;

    border-radius: 14px;

    width: fit-content;

    max-width: 100%;

    overflow: hidden;
}

.edit-popup-link span {

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-popup-link i {

    color: #2f6fe4;

    flex-shrink: 0;
}

/* CLOSE */

.edit-popup-close {

    width: 46px;
    height: 46px;

    border: none;

    border-radius: 16px;

    background: #f3f6fb;

    color: #64748b;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    transition: .16s ease;

    flex-shrink: 0;
}

.edit-popup-close:hover {

    background: #eef4ff;

    color: #2f6fe4;

    transform: rotate(90deg);
}

/* GRID */

.edit-popup-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 18px;

    margin-top: 24px;
}

/* BOX */

.edit-field-box {

    display: flex;
    flex-direction: column;

    gap: 10px;
}

.edit-field-box.full {

    grid-column: 1/-1;
}

.edit-label {

    font-size: 13px;
    font-weight: 800;

    color: #64748b;

    text-transform: uppercase;

    letter-spacing: .7px;
}

/* INPUT */

.edit-modern-input {

    height: 56px;

    border-radius: 18px;

    border: 1px solid #dbe6ff;

    background: #ffffff;

    padding: 0 18px;

    font-size: 15px;
    font-weight: 700;

    color: #111827;

    outline: none;

    transition: .16s ease;

    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.edit-modern-input:focus {

    border-color: #2f6fe4;

    box-shadow:
        0 0 0 4px rgba(47, 111, 228, 0.10);
}

/* STATUS TOGGLE IN EDIT POPUP */

.edit-status-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid #dbe6ff;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.edit-status-toggle-wrap:hover {
    border-color: #aac9ff;
    box-shadow: 0 0 0 3px rgba(47, 111, 228, .07);
}

.edit-status-toggle-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edit-status-toggle-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    transition: color .2s ease;
}

.edit-status-toggle-sub {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    transition: color .2s ease;
}

.edit-status-toggle-wrap.running .edit-status-toggle-title {
    color: #15803d;
}

.edit-status-toggle-wrap.running .edit-status-toggle-sub {
    color: #4ade80;
}

.edit-status-toggle-wrap.running {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.edit-status-toggle-wrap.paused .edit-status-toggle-title {
    color: #b91c1c;
}

.edit-status-toggle-wrap.paused .edit-status-toggle-sub {
    color: #f87171;
}

.edit-status-toggle-wrap.paused {
    border-color: #fecdd3;
    background: #fff1f2;
}

.edit-toggle-track {
    position: relative;
    width: 50px;
    height: 26px;
    border-radius: 999px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    flex-shrink: 0;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.edit-toggle-track.on {
    background: #22c55e;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
}

.edit-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.edit-toggle-track.on .edit-toggle-thumb {
    transform: translateX(24px);
}

/* FOOTER */

.edit-popup-footer {

    display: flex;

    gap: 14px;

    margin-top: 28px;
}

.edit-cancel-btn,
.edit-save-btn {

    flex: 1;

    height: 58px;

    border: none;

    border-radius: 20px;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    transition: .16s ease;
}

.edit-cancel-btn {

    background: #f3f6fb;

    color: #475569;
}

.edit-save-btn {

    background:
        linear-gradient(135deg,
            #2f6fe4,
            #4f8cff);

    color: #fff;

    box-shadow:
        0 12px 28px rgba(47, 111, 228, 0.22);
}

.edit-cancel-btn:hover,
.edit-save-btn:hover {

    transform: translateY(-2px);
}

.edit-save-btn:hover {

    box-shadow:
        0 18px 38px rgba(47, 111, 228, 0.30);
}

/* MOBILE */

@media(max-width:768px) {

    .delete-popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .edit-modern-popup {

        width: 100%;
        max-width: 100%;
        margin: 0 10px;
        box-sizing: border-box;

        padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));

        border-radius: 24px 24px 0 0;

        max-height: 88vh;

        overflow-y: auto;
        overflow-x: hidden;
    }

    .edit-modern-popup::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 999px;
        margin: 0 auto 18px;
    }

    .edit-popup-title {

        font-size: 20px;
    }

    .edit-popup-link {

        font-size: 12px;
        padding: 8px 12px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .edit-popup-header {
        gap: 12px;
        padding-bottom: 16px;
    }

    .edit-popup-close {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .edit-popup-grid {

        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 16px;
    }

    .edit-modern-input {
        height: 50px;
        font-size: 14px;
        border-radius: 14px;
    }

    .edit-status-toggle-wrap {
        height: 50px;
        border-radius: 14px;
    }

    .edit-popup-footer {

        flex-direction: row;
        flex-wrap: nowrap;

        gap: 10px;

        margin-top: 20px;
        padding-top: 16px;

        border-top: 1px solid #edf2f8;

        position: sticky;
        bottom: 0;

        background: #ffffff;
        z-index: 10;
    }

    .edit-cancel-btn,
    .edit-save-btn {

        flex: 1;
        min-width: 0;

        height: 50px;

        font-size: 14px;

        border-radius: 14px;
    }

    .edit-cancel-btn {

        background: #ffffff;
        border: 1.5px solid #dbe6ff;
        color: #334155;
    }

    .edit-save-btn {

        box-shadow: 0 8px 20px rgba(47, 111, 228, 0.18);
    }

}


/* =========================
   EDIT SPEED
========================= */

.edit-speed-options {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.edit-speed-btn {
    flex: 1;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: #f1f5f9;

    border: 1px solid #dbe4f0;

    font-size: 15px;
    font-weight: 700;

    color: #475569;

    cursor: pointer;

    transition: all .18s ease;
}

.edit-speed-btn:hover {
    transform: translateY(-1px);
}

.edit-speed-btn.active {

    background: linear-gradient(135deg,
            #2563eb,
            #3b82f6);

    border-color: #2563eb;

    color: #fff;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, .25);
}




/* =========================================
   EDIT POPUP DESKTOP + MOBILE FIX
========================================= */

.edit-modern-popup {

    width: calc(100vw - 40px);

    max-width: 760px;

    max-height: calc(100vh - 40px);

    overflow-y: auto;

    margin: 20px auto;

    box-sizing: border-box;

    border-radius: 30px;

    position: relative;
}

/* SAFE HEADER */
.edit-popup-header {

    position: sticky;

    top: 0;

    z-index: 20;

    background: #ffffff;

    padding-bottom: 16px;

    border-bottom: 1px solid #edf2f7;
}

/* GRID FIX */
.edit-popup-grid {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin-top: 24px;
}

/* FULL WIDTH ITEMS */
.edit-field-box.full {

    grid-column: 1 / -1;
}

/* MOBILE */
@media (max-width: 768px) {

    .edit-modern-popup {

        width: calc(100vw - 14px);

        max-width: 100vw;

        max-height: calc(100vh - 14px);

        margin: 7px auto;

        border-radius: 26px;

        padding: 18px;
    }

    .edit-popup-grid {

        grid-template-columns: 1fr;

        gap: 14px;
    }

    .edit-popup-header {

        padding-bottom: 14px;
    }

    .edit-popup-title {

        font-size: 22px;
    }

    .edit-popup-link {

        font-size: 13px;

        word-break: break-all;
    }

    .edit-speed-options {

        grid-template-columns: 1fr 1fr;
    }

    .edit-popup-footer {

        flex-direction: row;
        flex-wrap: nowrap;

        gap: 10px;

        margin-top: 20px;
        padding-top: 16px;

        border-top: 1px solid #edf2f8;

        position: sticky;
        bottom: 0;

        background: #ffffff;
        z-index: 10;
    }

    .edit-popup-footer button {

        flex: 1;
        min-width: 0;
        width: auto;
    }

    .edit-cancel-btn {

        background: #ffffff;
        border: 1.5px solid #dbe6ff;
        color: #334155;
    }

    .edit-save-btn {

        box-shadow: 0 8px 20px rgba(47, 111, 228, 0.18);
    }
}