* {
    font-family: "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    color: #222;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fcfcfc;
}

body.nav-open {
    overflow: hidden;
}

main.container {
    flex: 1;
    margin-top: 15px;
}

.page-narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.page-narrow-sm {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.section-spacing {
    margin-bottom: 60px;
}

a {
    text-decoration: none;
    color: #1F75FE;
    transition: 0.2s;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.half-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

header {
    background: #fcfcfc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

:root {
    --color-primary: #1F75FE;
    --color-text: #222;
    --color-bg: #fcfcfc;
    --color-border: #d9d9d9;
    --header-height: 88px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
    gap: 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
}

.logo img {
    width: 290px;
    max-width: 100%;
    height: auto;
    padding: 5px 0 0 0;
    display: block;
}

.nav-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 24px;
    min-width: 0;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

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

.burger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .burger-line:nth-child(2) {
    opacity: 0;
}

body.nav-open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
    display: none;
}

.nav-form {
    margin: 0;
}

.dropdown-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.dropdown-trigger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f5f5f5;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.dropdown-trigger-btn:hover {
    background: #eef5ff;
    border-color: var(--color-primary);
}

.dropdown-chevron {
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.dropdown.is-open .dropdown-chevron {
    transform: rotate(-135deg) translateY(2px);
}

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

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-item {
    color: #222;
    font-weight: 600;
    font-size: 16px;
    transition: 0.2s;
}

.nav-item:hover {
    color: #1F75FE;
}

.navigation-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 280px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 8px;
    list-style: none;
    margin-top: 8px;
}

.dropdown-menu::after {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    display: block;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.dropdown-menu li a {
    color: #222;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #fcfcfc;
    color: #1F75FE;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-blue {
    color: #fff;
    background-color: #1F75FE;
    border-color: #1F75FE;
}

.btn-blue:disabled {
    background-color: #f5f5f5 !important;
    border-color: #d9d9d9 !important;
    color: #686868 !important;
    cursor: default;
    box-shadow: none !important;
    transform: none !important;
}

.btn-blue:hover {
    color: #1F75FE;
    border-color: #1F75FE;
    background-color: transparent;
}

.outline-blue {
    color: #1F75FE;
    border-color: #1F75FE;
    background-color: transparent;
}

.outline-blue:hover {
    color: #fff;
    background-color: #1F75FE;
}

.btn-logout {
    font-family: "Segoe UI", Roboto, sans-serif;
    padding: 8px 20px;
}

.btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}
.btn-success:hover {
    background-color: #157347;
}

.btn-danger {
    color: #fcfcfc;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.width {
    width: 100%;
    display: block;
}

.card {
    background-color: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    margin-bottom: 18px;
}

.card-header {
    padding: 16px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #d9d9d9;
    font-weight: bold;
    border-radius: 7px 7px 0px 0px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 24px;
}

.card-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    border: none;
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #212529;
    background-color: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-family: inherit;
    transition: 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #1F75FE;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.error-text {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
}


.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.auth-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #6c757d;
}

.form-card {
    width: 100%;
    max-width: 400px;
    background: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.custom-table th,
.custom-table td {
    padding: 12px;
    border-bottom: 1px solid #d9d9d9;
    text-align: left;
}
.custom-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}
.badge-secondary { background-color: #6c757d; }
.badge-success { background-color: #198754; }
.badge-primary { background-color: #1F75FE; }

.hero {
    margin-bottom: 48px;
}
.hero-title {
    font-size: 40px;
    font-weight: 700;
}

.block-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid #d9d9d9;
    padding-bottom: 8px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.map-embed {
    width: 100%;
    height: 400px;
    background-color: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.footer-contacts {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item {
    margin-bottom: 16px;
}

.btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.appointment-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.doctor-block {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.doctor-card {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
    background: #fcfcfc;
    display: flex;
    flex-direction: column;
}

.doctor-img {
    background-color: #f5f5f5;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.breadcrumb {
    display: flex;
    list-style: none;
    margin-bottom: 10px;
}
.breadcrumb li::after {
    content: "/";
    margin: 0 10px;
}
.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb li {
    color: #222;
}

footer {
    background-color: #212529;
    color: #fcfcfc;
    padding: 48px 0 24px;
    margin-top: 30px;

}

.footer-logo {
    font-size: 18px;
    font-weight: 500;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
}

.footer-text {
    margin-top: 24px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.footer-head {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fff;
}

.footer-link {
    list-style: none;
}

.footer-link li {
    margin-bottom: 12px;
}

.footer-link a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-link a:hover {
    color: #1F75FE;
}

.tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

.tabs-scroll::-webkit-scrollbar {
    height: 5px;
}

.tabs-scroll::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.tabs-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    gap: 12px;
    margin-bottom: 0;
    padding: 4px 2px 8px;
    width: max-content;
    min-width: 100%;
}

.tabs-nav li {
    list-style: none;
    flex-shrink: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-btn{
    display: inline-block;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.tab-btn.active {
    color: #fff;
    background-color: #1F75FE;
    border-color: #1F75FE;
}

.news-img {
    display: flex;
    width: 300px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    align-self: center;
}

.about-news {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 0 0 8px 8px;
}

.image-form {
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 16px;
}

.image-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.steps-indicator {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.step-item {
    font-size: 18px;
    color: #adb5bd;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.step-item.active {
    color: #222;
    border-bottom: 3px solid #1F75FE;
}

.step-item.completed {
    color: #198754;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spec-card {
    background: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.spec-card:hover {
    border-color: #1F75FE;
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

.spec-card::after {
    content: "→";
    color: #1F75FE;
    font-weight: bold;
}

.doctor-selection-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 15px;
}

.doctor-selection-card:hover {
    border-color: #1F75FE;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.doc-avatar-circle {
    width: 64px;
    height: 64px;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.d-none {
    display: none !important;
}

.cursor-pointer {
    cursor: pointer;
}

#user-profile.active {
    display: flex;
    justify-content: center;
}

.appointment-card {
    padding: 15px;
    gap: 20px;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input[type="number"] {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    color: #212529;
    background-color: #fcfcfc;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-family: inherit;
    transition: 0.2s;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {

}

.file-upload-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 8px;
}

.file-input-hidden {
    display: none;
}

.file-name {
    font-size: 14px;
    color: #6c757d;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/*.form-group input[type="file"] {*/
/*    color: transparent;*/
/*    width: 0.1px;*/
/*    height: 0.1px;*/
/*    opacity: 0;*/
/*    overflow: hidden;*/
/*    position: absolute;*/
/*    z-index: -1;*/
/*}*/

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}


.edit-icon {
    position: absolute;
    right: 12px;
    color: #adb5bd;
    font-size: 18px;
    pointer-events: none;
    transform: scaleX(-1);
    transition: 0.2s;
}

#submit-btn {
    display: none;
    opacity: 0;
    transition: 0.2s;
}

.confirmation-card .btn {
    flex: 1;
    white-space: nowrap;
}

.step-container-centered {
    display: flex;
    justify-content: center;
}

.confirmation-card {
    max-width: 500px;
    width: 100%;
}

.selected-doc-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.auth-card form ul {
    display: block;
    color: #686868;
    margin-top: 5px;
    font-size: 12px;
}

#final-doc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.final-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appt-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.appt-avatar {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-detail-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    align-items: start;
    gap: 30px;
    margin-top: 30px;
}

.doctor-detail-img-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8f9fa;
    height: 310px;
    border: none;
}

.doctor-detail-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.doctor-detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 80px;
}

.experience-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.doctor-info-title {
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.doctor-info-text {
    font-size: 18px;
    margin-bottom: 8px;
}

.doctor-info-label {
    font-weight: 500;
    color: #222;
}

.action-group {
    margin-top: 118px;
    display: flex;
    gap: 15px;
}

.bio-section {
    margin-top: 50px;
}

.bio-list {
    list-style: none;
    padding-left: 0;
}

.bio-item {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.bio-bullet {
    color: #1F75FE;
    margin-right: 10px;
    font-weight: bold;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #1F75FE;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.time-slot {
    padding: 8px 16px;
    border-radius: 8px;
    color: #1F75FE;
    background: #fcfcfc;
    border: 1px solid #1F75FE;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.time-slot:hover,
.time-slot.active {
    border-color: #1F75FE;
    background: #1F75FE;
    color: #fcfcfc;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    padding: 10px 0;
}

.flatpickr-calendar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    font-family: "Segoe UI", Roboto, sans-serif;
}

.flatpickr-months {
    padding: 10px 0;
}

.flatpickr-current-month {
    font-weight: 600;
}

span.flatpickr-weekday {
    color: #999;
    font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #1F75FE !important;
    border-color: #1F75FE !important;
    color: #fff;
}

.flatpickr-day.today {
    border-color: #1F75FE;
    color: #1F75FE;
}

.flatpickr-day.today:hover {
    background: #f0f6ff;
    color: #1F75FE;
}

.flatpickr-day:hover {
    background: #f0f6ff;
    border-color: transparent;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #d1d5db;
    cursor: not-allowed;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #1F75FE !important;
}

.flatpickr-day.startRange, .flatpickr-day.endRange {
    background: #1F75FE !important;
}

.access {
    color: #222222;

}

:root {
    --access-font-size: inherit;
    --access-line-height: inherit;
    --access-kerning: inherit;
}

body.access-slider-active *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    font-size: var(--access-font-size) !important;
    line-height: var(--access-line-height) !important;
    letter-spacing: var(--access-kerning) !important;
}

.access-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 16px !important;
    line-height: normal !important;
    letter-spacing: normal !important;
}

.access-modal-overlay.is-open {
    display: flex;
}

.access-modal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    padding: 24px;
    animation: accessFadeIn 0.25s ease;
}

.access-modal-card * {
    font-family: "Segoe UI", Roboto, sans-serif !important;
}

.access-modal-header h3 {
    margin-bottom: 0;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #222 !important;
}

.access-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #222 !important;
    font-size: 18px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.access-btn-icon:hover {
    background: #eef5ff;
    color: var(--color-primary) !important;
}

.access-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.access-toggle-btn {
    background: #f8f9fa;
    border: 1px solid transparent;
    color: #333 !important;
    padding: 14px 12px;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.access-toggle-btn:hover {
    background: #f0f2f5;
}

.access-toggle-btn.is-active {
    background: #eef5ff;
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
    font-weight: 600 !important;
}

.access-sliders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.access-slider-group {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 12px 16px;
}

.access-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #444 !important;
    margin-bottom: 8px;
}

.access-slider-label :last-child {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
}

.access-slider-group input[type="range"] {
    display: block;
    width: 100%;
    accent-color: var(--color-primary);
    cursor: pointer;
    margin: 4px 0;
}

@keyframes accessFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

body.access-negative *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    filter: invert(1) hue-rotate(180deg) !important;
}

body.access-negative img,
body.access-negative iframe {
    filter: invert(1) hue-rotate(180deg) !important;
}

body.access-negative .access-modal-overlay {
    filter: none !important;
}

body.access-monochrome *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    filter: grayscale(1) !important;
}

body.access-dark-contrast *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}
body.access-dark-contrast a:not(.access-modal-overlay *) {
    color: #00ffff !important;
    text-decoration: underline !important;
}

body.access-light-contrast *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
    box-shadow: none !important;
}
body.access-light-contrast a:not(.access-modal-overlay *) {
    text-decoration: underline !important;
}

body.access-pale *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    filter: contrast(0.7) brightness(1.1) !important;
}

body.access-bright *:not(.access-modal-overlay):not(.access-modal-overlay *) {
    filter: contrast(1.3) brightness(1.15) !important;
}

body.access-links a:not(.access-modal-overlay *) {
    text-decoration: underline !important;
    font-weight: 700 !important;
    color: #0000ee !important;
    background-color: #fff8dd !important;
}

body.access-headers h1:not(.access-modal-overlay *),
body.access-headers h2:not(.access-modal-overlay *),
body.access-headers h3:not(.access-modal-overlay *),
body.access-headers h4:not(.access-modal-overlay *),
body.access-headers h5:not(.access-modal-overlay *),
body.access-headers h6:not(.access-modal-overlay *) {
    background-color: #e6f0ff !important;
    border-left: 5px solid var(--color-primary) !important;
    padding-left: 10px !important;
}

@media (max-width: 992px) {
    :root {
        --header-height: 72px;
    }

    .page-grid,
    .half-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-title {
        font-size: 32px;
    }

    .doctor-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .doctor-info-title {
        font-size: 28px;
    }

    .action-group {
        margin-top: 24px !important;
        flex-wrap: wrap;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .burger {
        display: flex;
    }

    .navigation {
        flex-wrap: wrap;
        align-items: stretch;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .nav-brand {
        width: 100%;
    }

    .logo img {
        width: 220px;
    }

    .nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 20px 24px;
        background: var(--color-bg);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        z-index: 1001;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    body.nav-open .nav-panel {
        transform: translateX(0);
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.nav-open .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-menu > .nav-item {
        display: block;
        width: 100%;
        text-align: left;
        padding: 14px 0;
        border-bottom: 1px solid var(--color-border);
        font-size: 17px;
    }

    .dropdown {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    .dropdown-row {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .dropdown-row .nav-item {
        flex: 1;
        padding: 14px 0;
        border-bottom: none;
        font-size: 17px;
    }

    .dropdown-trigger-btn {
        display: flex;
        width: 48px;
        height: auto;
        min-height: 48px;
        margin: 6px 0;
        margin-right: 0;
        border-radius: 8px;
        border: 1px solid var(--color-border);
        background: #f5f5f5;
    }

    .dropdown-menu {
        position: static;
        display: none;
        min-width: 0;
        width: 100%;
        margin: 0 0 8px;
        padding: 4px 0 8px 12px;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        animation: none;
    }

    .dropdown-menu::before,
    .dropdown-menu::after {
        display: none;
    }

    .dropdown.is-open .dropdown-menu {
        display: block;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.is-open:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 10px 0;
        font-size: 15px;
    }

    .navigation-links {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--color-border);
    }

    .navigation-links .btn,
    .navigation-links .nav-form {
        width: 100%;
    }

    .navigation-links .nav-form button {
        width: 100%;
    }

    .steps-indicator {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    .news-img {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-title,
    .doctor-info-title {
        font-size: 26px;
    }

    .doctor-block,
    .doctors-grid {
        grid-template-columns: 1fr;
    }

    .doctor-card {
        max-width: 100%;
    }

    .doctor-img {
        width: 100%;
        height: 220px;
    }

    .doctor-detail-img-box {
        height: 280px;
    }

    .appointment-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .appointment-card .appt-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .appointment-card .appt-actions .btn {
        width: 100%;
        margin-right: 0 !important;
        text-align: center;
    }

    .review-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px;
    }

    .review-actions {
        margin-left: 0 !important;
        width: 100%;
        flex-wrap: wrap;
    }

    .review-actions .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .doctor-selection-card {
        flex-wrap: wrap;
        gap: 12px;
    }

    .doctor-selection-card > div:last-child {
        width: 100%;
        text-align: right;
    }

    .block-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 14px;
    }

    .map-embed {
        height: 280px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: left;
    }

    .image-container {
        grid-template-columns: 1fr;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .btn-row,
    .appointment-form-actions {
        grid-template-columns: 1fr;
    }

    #user-profile .card {
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 10px 0;
    }

    .custom-table {
        font-size: 14px;
    }

    .custom-table th,
    .custom-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    .card-body:has(.custom-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-dashboard .btn-group,
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 64px;
    }

    .container {
        padding: 0 12px;
    }

    .logo img {
        width: 180px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero {
        margin-bottom: 32px;
    }

    .card-body {
        padding: 16px;
    }

    .auth-card,
    .form-card {
        padding: 20px;
    }

    .step-item {
        font-size: 15px;
    }

    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 8px;
    }

    .navigation-links .btn {
        width: 100%;
    }

    .footer-content {
        text-align: center;
    }

    .footer-link {
        padding: 0;
    }
}
