:root {
    --bg: #eef8f1;
    --bg-2: #f8fcf9;
    --card: rgba(255, 255, 255, 0.92);
    --text: #0b2f22;
    --muted: #628074;
    --line: #d2eadc;

    --primary: #137a4b;
    --primary-dark: #0b4f33;
    --primary-soft: #e5f5ec;

    --accent: #58b368;
    --accent-dark: #2f7d46;
    --gold: #c6a15b;

    --danger: #b91c1c;
    --success: #137a4b;

    --shadow: 0 18px 45px rgba(19, 122, 75, 0.12);
    --shadow-soft: 0 8px 22px rgba(19, 122, 75, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(88, 179, 104, .18), transparent 26%),
        radial-gradient(circle at 85% 15%, rgba(19, 122, 75, .13), transparent 24%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
}

a {
    color: inherit;
    text-decoration: none;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    color: var(--primary-dark);
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: "✦";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.nav {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 14px;
    color: #21463a;
}

.nav a {
    padding: 9px 10px;
    border-radius: 12px;
}

.nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(19, 122, 75, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 16px 32px rgba(19, 122, 75, .28);
}

.btn.secondary {
    background: #ffffff;
    color: var(--primary-dark);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 42px 20px;
}

.hero {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 30px;
    align-items: center;
    min-height: 560px;
}

.hero > div:first-child {
    padding: 18px 0;
}

.card {
    background: var(--card);
    border: 1px solid rgba(210, 234, 220, .9);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: rgba(88, 179, 104, .55);
}

h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: .96;
    margin: 0 0 18px;
    letter-spacing: -0.06em;
    color: #073421;
}

h2 {
    font-size: 30px;
    margin: 0 0 16px;
    letter-spacing: -0.04em;
}

h3 {
    margin: 0 0 10px;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.65;
}

.muted {
    color: var(--muted);
}

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

.input,
textarea,
select {
    width: 100%;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin-bottom: 13px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 179, 104, .13);
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(88, 179, 104, .12), transparent 25%),
        linear-gradient(180deg, #f8fcf9, #eef8f1);
}

.sidebar {
    background:
        radial-gradient(circle at 40% 0%, rgba(88, 179, 104, .26), transparent 28%),
        linear-gradient(180deg, #083321, #0a4a31);
    color: #fff;
    padding: 24px;
    box-shadow: 12px 0 40px rgba(8, 51, 33, .18);
}

.sidebar h2 {
    font-size: 25px;
    margin-bottom: 8px;
}

.sidebar p {
    color: rgba(255,255,255,.72);
    margin-bottom: 22px;
}

.sidebar a {
    display: block;
    padding: 13px 14px;
    border-radius: 16px;
    margin-bottom: 9px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,.08);
    transition: .18s ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.16);
    transform: translateX(2px);
}

.main {
    padding: 30px;
}

.chat-box {
    height: 460px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,250,246,.96));
}

.msg {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #eef8f3;
    border: 1px solid #d9eee3;
}

.msg.mine {
    background: #dff3ea;
}

img {
    border-radius: 18px;
}

.card img {
    box-shadow: var(--shadow-soft);
}

.badge,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--line);
}

.product-price {
    display: inline-flex;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff8e7, #f3e5bd);
    color: #6f531d;
    font-weight: 900;
}

@media (max-width: 900px) {
    .header {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .nav {
        flex-wrap: wrap;
    }

    .hero,
    .grid,
    .sidebar-layout {
        grid-template-columns: 1fr !important;
    }

    .main {
        padding: 18px;
    }

    .sidebar {
        min-height: auto;
    }
}

/* === GLOBAL FONT SCALE FIX (50%) === */

html {
    font-size: 50%;
}

/* recalibrare tipografie */
body {
    font-size: 1.6rem;
}

h1 {
    font-size: 3.2rem !important;
}

h2 {
    font-size: 2.4rem !important;
}

h3 {
    font-size: 1.8rem !important;
}

.nav,
.sidebar,
p,
.muted {
    font-size: 1.4rem !important;
}

.btn {
    font-size: 1.4rem !important;
    padding: 1rem 1.6rem !important;
}

.input,
textarea,
select {
    font-size: 1.4rem !important;
    padding: 1.2rem !important;
}

/* chat */
.msg {
    font-size: 1.4rem !important;
}

/* produse */
.card h3 {
    font-size: 1.8rem !important;
}

.product-price {
    font-size: 1.6rem !important;
}

/* sidebar */
.sidebar h2 {
    font-size: 2rem !important;
}

/* responsive fix */
@media (max-width: 900px) {
    html {
        font-size: 48%;
    }
}

/* === MED TKR COMPACT MAXIMUM UI === */

html {
    font-size: 46%;
}

body {
    font-size: 1.45rem;
}

.header {
    padding: 8px 18px !important;
}

.logo {
    font-size: 1.9rem !important;
}

.logo::before {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
}

.nav {
    gap: 6px !important;
    font-size: 1.25rem !important;
}

.nav a {
    padding: 6px 8px !important;
}

.container {
    padding: 18px 14px !important;
}

.hero {
    min-height: auto !important;
    gap: 16px !important;
}

h1 {
    font-size: 2.7rem !important;
    line-height: 1.05 !important;
    margin-bottom: 10px !important;
}

h2 {
    font-size: 2rem !important;
    margin-bottom: 10px !important;
}

h3 {
    font-size: 1.55rem !important;
    margin-bottom: 6px !important;
}

p {
    line-height: 1.45 !important;
    margin-top: 6px !important;
    margin-bottom: 8px !important;
}

.card {
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 8px 20px rgba(19, 122, 75, 0.08) !important;
}

.grid {
    gap: 10px !important;
}

.btn {
    font-size: 1.25rem !important;
    padding: 8px 13px !important;
}

.input,
textarea,
select {
    font-size: 1.25rem !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
}

.sidebar-layout {
    grid-template-columns: 210px 1fr !important;
}

.sidebar {
    padding: 14px !important;
}

.sidebar h2 {
    font-size: 1.75rem !important;
}

.sidebar p {
    font-size: 1.2rem !important;
    margin-bottom: 12px !important;
}

.sidebar a {
    padding: 8px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
    font-size: 1.25rem !important;
}

.main {
    padding: 16px !important;
}

.chat-box {
    height: 360px !important;
    border-radius: 14px !important;
    padding: 10px !important;
}

.msg {
    font-size: 1.25rem !important;
    padding: 9px !important;
    border-radius: 12px !important;
    margin-bottom: 7px !important;
}

.card img {
    height: 130px !important;
    border-radius: 12px !important;
}

.product-price,
.badge,
.pill {
    font-size: 1.15rem !important;
    padding: 5px 8px !important;
}

@media (max-width: 900px) {
    html {
        font-size: 45%;
    }

    .header {
        padding: 8px 12px !important;
    }

    .main {
        padding: 12px !important;
    }

    .sidebar {
        padding: 12px !important;
    }
}

/* === PRODUCT IMAGE PERFECT SQUARE + ZOOM === */

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #f4faf6;
}

/* imagine produs */
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* crop corect */
    object-position: center; /* focus centru */
    transition: transform 0.4s ease;
}

/* zoom hover */
.product-image-wrapper:hover img {
    transform: scale(1.15);
}

/* overlay subtil premium */
.product-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 60%,
        rgba(0,0,0,0.12)
    );
    pointer-events: none;
}

/* optional shadow premium */
.product-image-wrapper {
    box-shadow: 0 10px 25px rgba(19, 122, 75, 0.08);
}


/* === FIX FINAL PRODUCT IMAGE SQUARE + FULL FIT + ZOOM === */

.product-image-wrapper {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    border: 1px solid #d9eee3 !important;
}

.product-image-wrapper img,
.card .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.35s ease !important;
    background: #ffffff !important;
}

.product-image-wrapper:hover img {
    transform: scale(1.12) !important;
}

/* anulează regula veche care micșora toate imaginile din card */
.card img:not(.product-image-wrapper img) {
    height: auto;
}


/* === PRODUCT IMAGE COMPACT + CLICK ZOOM LIGHTBOX === */

.product-image-wrapper {
    width: 50% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 auto 10px auto !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid #d9eee3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: zoom-in !important;
}

.product-image-wrapper img,
.card .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transition: transform 0.25s ease !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.product-image-wrapper:hover img {
    transform: scale(1.08) !important;
}

.med-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 34, 22, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.med-lightbox.active {
    display: flex;
}

.med-lightbox img {
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    cursor: zoom-out;
}


/* === NOTIFICATIONS PREMIUM COMPACT === */
.notifications-panel {
    margin-bottom: 12px;
}

.notifications-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notifications-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #b91c1c;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.15rem;
}

/* === PATIENT REGISTER PREMIUM CENTERED === */
.auth-page {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.auth-card {
    width: min(980px, 100%);
    background: rgba(255,255,255,.94);
    border: 1px solid #d2eadc;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 18px 48px rgba(19,122,75,.12);
}

.auth-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 14px;
}

.auth-head h1 {
    font-size: 2.6rem !important;
    margin: 8px 0 !important;
}

.auth-form label {
    font-weight: 700;
    color: #0b4f33;
    display: block;
    margin-bottom: 4px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.eligibility-box {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #d9eee3;
    border-radius: 16px;
    background: #f7fcf9;
}

.question-row {
    padding: 8px 0;
    border-bottom: 1px solid #e1f0e7;
}

.question-row:last-child {
    border-bottom: 0;
}

.question-row p {
    margin: 0 0 6px !important;
    font-weight: 800;
    color: #0b2f22;
}

.question-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 14px;
    font-weight: 600;
}

.form-alert {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 700;
}

.small-note {
    font-size: 1.15rem !important;
}

@media (max-width: 760px) {
    .auth-shell {
        align-items: flex-start;
        padding: 10px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 14px;
    }
}

/* === PATIENT ID PREVIEW + ZOOM === */
.id-preview-box {
    width: 220px;
    max-width: 100%;
    aspect-ratio: 1.55 / 1;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d9eee3;
    background: #ffffff;
    cursor: zoom-in;
    margin: 10px 0;
    box-shadow: 0 8px 20px rgba(19, 122, 75, 0.08);
}

.id-preview-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #fff;
    transition: transform .25s ease;
}

.id-preview-box:hover img {
    transform: scale(1.06);
}

.id-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 34, 22, .88);
    padding: 18px;
}

.id-lightbox.active {
    display: flex;
}

.id-lightbox img {
    max-width: 92vw !important;
    max-height: 92vh !important;
    object-fit: contain !important;
    background: #fff;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    cursor: zoom-out;
}

.doctor-feedback-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #d9eee3;
}

.doctor-feedback-box h3 {
    font-size: 1.35rem !important;
    margin-bottom: 6px !important;
}

/* === LANDING DROPDOWN MENU === */
.top-dropdowns {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-end;
}

.dropdown {
    position: relative;
}

.dropdown > button {
    cursor: pointer;
    border: 1px solid #d9eee3;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: rgba(255,255,255,.98);
    border: 1px solid #d9eee3;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(19,122,75,.14);
    padding: 8px;
    display: none;
    z-index: 999;
}

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

.dropdown-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 12px;
    font-weight: 800;
    color: #0b4f33;
}

.dropdown-menu a:hover {
    background: #e5f5ec;
}

@media(max-width: 760px) {
    .top-dropdowns {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .dropdown-menu {
        left: 0;
        right: auto;
    }
}

.logo::before { display:none !important; content:none !important; }

/* eliminare pătrat verde lângă logo */
.logo::before,
.logo::after,
.site-logo::before,
.site-logo::after {
    display: none !important;
    content: none !important;
}

.logo-icon,
.logo-dot,
.icon,
.dot {
    display: none !important;
}



/* Med TKR unified brand link */
.brand-home-link{
    display:inline-flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:inherit;
    line-height:1.1;
}

.brand-home-link:hover{
    text-decoration:none;
    opacity:.96;
}

.brand-home-logo{
    width:46px;
    height:46px;
    object-fit:contain;
    border-radius:14px;
    background:#ffffff;
    border:1px solid rgba(15,81,50,.14);
    box-shadow:0 8px 20px rgba(15,81,50,.08);
    padding:6px;
    flex:0 0 auto;
}

.brand-home-text{
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
}

.brand-home-title{
    display:block;
    font-size:22px;
    font-weight:800;
    color:#064e3b;
    letter-spacing:-.02em;
}

.brand-home-subtitle{
    display:block;
    margin-top:3px;
    font-size:13px;
    font-weight:500;
    color:#487060;
}

.sidebar .brand-home-link,
.sidebar-brand{
    display:flex;
    width:100%;
    margin:0 0 12px 0;
    padding:4px 0;
    color:#ffffff;
}

.sidebar .brand-home-logo,
.sidebar-brand .brand-home-logo{
    width:38px;
    height:38px;
    border-radius:11px;
    padding:5px;
    box-shadow:none;
}

.sidebar .brand-home-title,
.sidebar-brand .brand-home-title{
    color:#ffffff;
    font-size:18px;
}

.sidebar .brand-home-subtitle,
.sidebar-brand .brand-home-subtitle{
    color:rgba(255,255,255,.78);
    font-size:12px;
}

@media(max-width:768px){
    .brand-home-logo{
        width:40px;
        height:40px;
    }

    .brand-home-title{
        font-size:19px;
    }

    .brand-home-subtitle{
        font-size:12px;
    }
}






/* TKR_SIDEBAR_COLOR_RESTORE_START */
/* Restaurare culoare meniu Med TKR - verde medical original */
.sidebar {
    background: linear-gradient(180deg, #137a4b 0%, #0b4f33 100%) !important;
    color: #ffffff !important;
}

.sidebar a,
.sidebar .brand-home-link,
.sidebar-brand {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar a:hover,
.sidebar .brand-home-link:hover {
    background: rgba(255, 255, 255, 0.17) !important;
    color: #ffffff !important;
}

.sidebar a.active {
    background: #ffffff !important;
    color: #0b4f33 !important;
}

.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar p,
.sidebar span,
.sidebar strong,
.sidebar .brand-home-title,
.sidebar .brand-home-subtitle {
    color: #ffffff !important;
}
/* TKR_SIDEBAR_COLOR_RESTORE_END */


















/* TKR_TIMES_NEW_ROMAN_FINAL_START */
/*
   Font final:
   - Times New Roman peste tot;
   - 12px text normal;
   - 14px subtitluri / elemente importante;
   - 16px titluri principale.
   Nu modifică: culori, fundaluri, layout, margini, meniuri.
*/

html,
body,
body *,
p,
span,
small,
label,
a,
li,
td,
th,
input,
select,
textarea,
button,
option,
.btn,
.card,
.msg,
.sidebar,
.badge,
.pill,
.muted,
.product-price,
.message-text,
.message-author,
.message-time,
.thread-item {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 12px !important;
}

strong,
h3,
h4,
h5,
h6,
.card h3,
.card h4,
.section-title,
.card-title,
.notifications-title h3 {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 14px !important;
}

h1,
h2,
.page-title,
.hero-title,
.hero h1,
.landing-title,
.headline,
.brand-home-title,
.logo-title,
.site-title {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 16px !important;
}

html {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}
/* TKR_TIMES_NEW_ROMAN_FINAL_END */
