@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --cm-primary: #5b3ff1;
    --cm-primary-dark: #21336f;
    --cm-cyan: #08b6d8;
    --cm-green: #12b981;
    --cm-orange: #ff8a1f;
    --cm-pink: #e94d8b;
    --cm-ink: #102344;
    --cm-muted: #64748b;
    --cm-border: #dbeafe;
    --cm-soft: #f5f9ff;
    --cm-card: rgba(255, 255, 255, 0.92);
    --cm-shadow: 0 22px 55px rgba(20, 43, 86, 0.14);
    --cm-shadow-soft: 0 14px 34px rgba(20, 43, 86, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #eef6ff;
    width: 100%;
    overflow-x: hidden;
    touch-action: pan-y;
}

body {
    margin: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    color: var(--cm-ink);
    background-color: #eef6ff !important;
    background:
        radial-gradient(circle at 8% 4%, rgba(91, 63, 241, 0.16), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(18, 185, 129, 0.18), transparent 26%),
        linear-gradient(135deg, #f8fbff 0%, #eef6ff 48%, #f7fbff 100%) !important;
    width: 100%;
    max-width: 100%;
    padding-top: calc(78px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
    touch-action: pan-y;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(91, 63, 241, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 182, 216, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
    z-index: -1;
}

header {
    left: 0 !important;
    right: 0 !important;
    top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
    width: min(calc(100% - 24px), 980px) !important;
    margin: 0 auto;
    transform: none;
    min-height: 62px;
    padding: 10px 14px !important;
    border: 1px solid rgba(219, 234, 254, 0.9) !important;
    border-radius: 0 0 22px 22px;
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: var(--cm-shadow-soft) !important;
    backdrop-filter: blur(18px);
}

.app-logo,
.sidebar-logo {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(20, 43, 86, 0.16);
}

.app-logo {
    width: 58px !important;
    height: 46px;
    object-fit: contain;
    padding: 4px;
    background: #fff;
}

.icon-button {
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 63, 241, 0.16) !important;
    border-radius: 15px;
    color: var(--cm-primary) !important;
    background: linear-gradient(145deg, #ffffff, #f0f6ff) !important;
    box-shadow: 0 10px 22px rgba(91, 63, 241, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-2px);
    color: #fff !important;
    background: linear-gradient(135deg, var(--cm-primary), var(--cm-cyan)) !important;
    box-shadow: 0 16px 30px rgba(91, 63, 241, 0.25);
}

.account-avatar-button {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#account-profile-img,
.account-profile-img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: block !important;
    object-fit: cover !important;
    border: 2px solid rgba(91, 63, 241, 0.22);
    border-radius: 15px !important;
    background: #fff;
    box-shadow: 0 10px 22px rgba(91, 63, 241, 0.12);
}

.account-avatar-button .account-profile-img {
    display: none !important;
}

.account-avatar-button.has-profile-photo .icon-button {
    display: inline-flex !important;
    color: transparent !important;
    font-size: 0 !important;
    background-color: #fff !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.account-avatar-button.has-profile-photo .icon-button::before {
    content: "" !important;
}

.icon-container {
    margin-left: 10px !important;
}

.dropdown-menu {
    margin-top: 12px;
    border: 1px solid rgba(219, 234, 254, 0.95) !important;
    border-radius: 18px !important;
    box-shadow: var(--cm-shadow) !important;
    overflow: hidden;
}

.dropdown-menu a {
    color: var(--cm-ink) !important;
    font-weight: 700;
}

.dropdown-menu a:hover {
    background: #eef6ff !important;
    color: var(--cm-primary) !important;
}

#sidebar {
    width: 0;
    position: fixed !important;
    top: 0 !important;
    padding-top: calc(18px + env(safe-area-inset-top, 0px)) !important;
    z-index: 5000 !important;
    background:
        radial-gradient(circle at 20% 0%, rgba(8, 182, 216, 0.32), transparent 28%),
        linear-gradient(180deg, #11265a 0%, #26315f 42%, #121b3f 100%) !important;
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.28) !important;
}

#sidebar.open {
    width: min(315px, 86vw) !important;
    z-index: 5000 !important;
}

.sidebar-header {
    padding: 0 14px 12px !important;
    gap: 10px;
    box-sizing: border-box;
}

.sidebar-logo-container {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 0 !important;
}

.sidebar-logo {
    display: block;
    width: min(108px, 100%) !important;
    max-width: 108px !important;
    height: auto !important;
    object-fit: contain;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
}

.sidebar-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    line-height: 1;
}

.sidebar-menu {
    padding: 8px 14px 18px !important;
    margin-top: 4px !important;
}

#sidebar a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 5px 0;
    padding: 13px 14px !important;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.86) !important;
    font-size: 15px !important;
    font-weight: 700;
    letter-spacing: 0;
    background: transparent;
}

#sidebar a.cm-auth-hidden {
    display: none !important;
}

#sidebar a i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0 !important;
    border-radius: 12px;
    color: #dff9ff;
    background: rgba(255, 255, 255, 0.1);
}

#sidebar a:hover,
#sidebar a:focus {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(91, 63, 241, 0.95), rgba(8, 182, 216, 0.75)) !important;
    box-shadow: 0 14px 28px rgba(8, 182, 216, 0.18);
    transform: translateX(3px);
}

.sidebar-contact {
    margin: 14px !important;
    padding: 16px !important;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.86) !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-contact p {
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.sidebar-footer {
    margin: 0 14px 16px;
    padding: 14px !important;
    border: 0 !important;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.64) !important;
    background: rgba(255, 255, 255, 0.07);
}

main {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 14px 14px 22px !important;
    text-align: initial !important;
}

.container,
.form-container,
.contact-container,
.popup-content,
#health {
    border: 1px solid rgba(219, 234, 254, 0.95) !important;
    border-radius: 24px !important;
    background: var(--cm-card) !important;
    box-shadow: var(--cm-shadow-soft) !important;
    backdrop-filter: blur(12px);
}

.container,
.form-container,
.contact-container {
    max-width: 980px !important;
    padding: clamp(18px, 4vw, 34px) !important;
}

h1,
h2,
h3,
.section-title {
    color: var(--cm-ink) !important;
    letter-spacing: 0 !important;
}

h1,
.section-title {
    font-weight: 800 !important;
    border-bottom: 0 !important;
}

h1::after,
.section-title::after {
    content: "";
    display: block;
    width: 58px;
    height: 4px;
    margin-top: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cm-primary), var(--cm-cyan), var(--cm-green));
}

.slider-container {
    max-width: 100% !important;
    margin: 10px auto 18px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--cm-shadow) !important;
    background: #fff;
}

.slider img {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.nav-dot {
    width: 24px !important;
    height: 8px !important;
    border-radius: 999px !important;
    background: rgba(91, 63, 241, 0.2) !important;
}

.nav-dot.active {
    background: linear-gradient(90deg, var(--cm-primary), var(--cm-cyan)) !important;
}

.service-card,
.feature-button,
.extra-btn,
.tutorial-button,
.franchise-button {
    position: relative;
    overflow: hidden;
    min-height: 82px;
    border: 1px solid rgba(255, 255, 255, 0.62) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 38px rgba(20, 43, 86, 0.16) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.service-card::after,
.feature-button::after,
.extra-btn::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -32px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.service-card:hover,
.feature-button:hover,
.extra-btn:hover,
.tutorial-button:hover,
.franchise-button:hover {
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow: 0 24px 52px rgba(20, 43, 86, 0.22) !important;
    filter: saturate(1.06);
}

.service-card i,
.feature-button i,
.extra-btn i {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
}

.doctor {
    background: linear-gradient(135deg, #4f46e5, #08b6d8) !important;
}

.ambulance {
    background: linear-gradient(135deg, #f43f5e, #fb7b33) !important;
}

.medicine {
    background: linear-gradient(135deg, #12b981, #14b8a6) !important;
}

.nurse {
    background: linear-gradient(135deg, #8b5cf6, #e94d8b) !important;
}

.checkup {
    background: linear-gradient(135deg, #f59e0b, #22c55e) !important;
}

.extra-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px !important;
    margin: 16px 15px !important;
    padding: 0 !important;
}

.video-btn {
    background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
}

.franchise-btn {
    background: linear-gradient(135deg, #059669, #84cc16) !important;
}

#health {
    margin: 18px 15px !important;
    padding: 18px !important;
}

form {
    width: 100%;
}

label {
    color: var(--cm-ink);
    font-weight: 700;
}

input,
select,
textarea,
.form-control {
    min-height: 46px;
    border: 1px solid #cfe0f8 !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--cm-ink) !important;
    padding: 10px 13px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    outline: none !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea {
    min-height: 110px;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: rgba(91, 63, 241, 0.62) !important;
    box-shadow: 0 0 0 4px rgba(91, 63, 241, 0.12) !important;
}

input[type="radio"],
input[type="checkbox"] {
    min-height: auto;
    width: 18px;
    height: 18px;
    accent-color: var(--cm-primary);
    padding: 0 !important;
}

button,
.submit-btn,
.payment-btn,
.close-popup-btn,
.btn-filter {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0 !important;
    border-radius: 15px !important;
    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--cm-primary), var(--cm-cyan)) !important;
    box-shadow: 0 14px 28px rgba(91, 63, 241, 0.24) !important;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover,
.submit-btn:hover,
.payment-btn:hover,
.close-popup-btn:hover,
.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(91, 63, 241, 0.32) !important;
    filter: saturate(1.08);
}

button:disabled,
.payment-btn:disabled {
    background: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(20, 43, 86, 0.08);
}

thead,
table tr:first-child {
    background: linear-gradient(90deg, #eef6ff, #ecfeff);
}

th {
    color: var(--cm-ink) !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td,
th {
    padding: 14px 12px !important;
    border-bottom: 1px solid #e6eef8 !important;
}

tbody tr,
table tr {
    transition: background-color 0.18s ease;
}

tbody tr:hover {
    background: #f8fbff;
}

.popup {
    background: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(10px);
}

.popup-content {
    width: min(92vw, 720px) !important;
    max-height: 82vh !important;
}

footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(calc(100% - 22px), 980px) !important;
    margin: 0 auto;
    transform: none;
    padding: 8px 10px !important;
    border: 1px solid rgba(219, 234, 254, 0.95) !important;
    border-bottom: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: var(--cm-shadow-soft) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1200 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    box-sizing: border-box !important;
}

footer a {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1 1 0;
    padding: 8px 9px;
    border-radius: 16px;
    color: var(--cm-muted) !important;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

footer a:hover {
    color: var(--cm-primary) !important;
    background: #eef6ff;
    transform: translateY(-2px);
}

footer a i {
    font-size: 19px !important;
    margin-bottom: 4px !important;
}

footer a span {
    max-width: 100%;
    white-space: nowrap;
    line-height: 1;
    font-size: clamp(9px, 2.45vw, 12px);
    letter-spacing: 0;
}

.dev-credit {
    color: var(--cm-muted) !important;
    font-weight: 700;
}

.dev-credit span {
    color: var(--cm-primary) !important;
}

@media (max-width: 720px) {
    body {
        padding-top: calc(74px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        background:
            radial-gradient(circle at 0% 0%, rgba(91, 63, 241, 0.12), transparent 30%),
            radial-gradient(circle at 100% 0%, rgba(18, 185, 129, 0.14), transparent 28%),
            linear-gradient(135deg, #f8fbff 0%, #eef6ff 52%, #f7fbff 100%) !important;
        background-attachment: scroll !important;
    }

    body::before {
        position: absolute;
        min-height: 100%;
        opacity: 0.7;
        mask-image: none;
        -webkit-mask-image: none;
    }

    header,
    footer {
        width: calc(100% - 16px) !important;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.97) !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    header {
        top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
        min-height: 58px;
        padding-block: 7px !important;
    }

    footer {
        position: fixed !important;
        bottom: 0 !important;
        padding: 7px 6px !important;
        gap: 2px;
        padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 20px 20px 0 0 !important;
    }

    footer a {
        min-width: 0;
        padding: 7px 2px;
        font-size: 11px;
    }

    footer a i {
        font-size: clamp(16px, 4.4vw, 19px) !important;
    }

    main {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 12px !important;
        overflow-x: hidden;
    }

    .service-card {
        margin-inline: 8px !important;
    }

    .extra-buttons {
        margin-inline: 8px !important;
    }

    .extra-buttons {
        grid-template-columns: 1fr;
    }

    .container,
    .form-container,
    .contact-container {
        padding: 18px !important;
    }

    table {
        font-size: 13px;
    }

    td,
    th {
        padding: 11px 9px !important;
    }
}

@media (max-width: 380px) {
    footer a span {
        font-size: 9px;
    }

    footer a {
        padding-inline: 1px;
    }
}
