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

/* Скролбарът винаги е резервиран — иначе при зареждане на дълга
   страница той се появява по средата на рендера, viewport-ът се
   стеснява с ~15px и цялото центрирано съдържание (вкл. менюто)
   се измества/пренарежда за момент. */
html {
    overflow-y: scroll;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url(images/background.jpg);
    background-repeat: repeat;
    background-size: contain;
    background-attachment: fixed;
    background-position: center;
}

hr {
background: url(../images/hr.gif) repeat-x;
border: none;
height: 2px;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #212529;      /* същото ненатрапчиво сиво като в редактора за ιστορικό */
  opacity: 1;          /* Firefox иначе го прави полупрозрачен и по-блед */
}
::-webkit-input-placeholder { /* по-стари WebKit браузъри */
  color: #212529;
}

select, input, textarea {
    font-size: 14px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

select:hover, input:hover, textarea:hover {
    border-color: #80bdff;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.25);
}

input.button, button {
    color: #ffffff;
    background: linear-gradient(135deg, #4e9ff5, #3771c8);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

input.button:hover, button:hover {
    background: linear-gradient(135deg, #66b8ff, #559ce8);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

h1 {
    font: 2.5em "Georgia", serif;
    color: #333;
    margin: 0;
    text-align: center;
    padding: 20px;
}

h1 small {
    font-size: 0.6em;
    letter-spacing: 0.15em;
    color: #555;
}

#comunsite {
width: 85%;
text-align: center;
border: 1px solid #c5c5c5;
color: #212529;
font-size: 12px;
padding: 0px;
background-color: rgba(255, 255, 255, 0.91); /* леко прозрачнo */
}

#header {
background-image: url(images/header_dnevnik.jpg);
background-size: cover; /* Ensures background image covers the entire div */
  background-position: center center; /* Keeps the background centered */
  margin: 0 auto;
  border: none;
  width: 100%; /* Make the width responsive */
  height: auto; /* Let height adjust based on the width */
  max-height: 300px; /* Optional: Set a maximum height */
  aspect-ratio: 1450 / 187; /* Maintain the same aspect ratio */
}

#headerzoo {
background-image: url(images/header_zoo.jpg);
background-size: cover; /* Ensures background image covers the entire div */
  background-position: center center; /* Keeps the background centered */
  margin: 0 auto;
  border: none;
  width: 100%; /* Make the width responsive */
  height: auto; /* Let height adjust based on the width */
  max-height: 300px; /* Optional: Set a maximum height */
  aspect-ratio: 1450 / 187; /* Maintain the same aspect ratio */
}

#menutab {
background: url(../images/menutab.jpg) no-repeat;
height: 35px;
color: #FFFFFF;
font-size: 17px;
border: none;
}

#menutabig {
    background-color: #cdf5ff; /* Light blue background */
    height: 40px; /* Slightly taller for modern design */
    font-size: 14px;
    font-weight: bold;
    color: #005f73; /* Complementary text color */
    text-align: center; /* Center the text */
    line-height: 40px; /* Vertically align text */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transitions */
}

#menutabig:hover {
    background-color: #99dcff; /* Slightly darker on hover */
    color: #003845; /* Darker text for better contrast */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhance shadow on hover */
    transform: translateY(-2px); /* Slight lift effect */
    cursor: pointer;
}

#leftcol {
float:left;
width:265px;
}

#rightcol {
	width:85%; 
	
}
img {
border: 0px;
}

ul#topnav {
margin: 1px 0 20px;
padding: 0;
list-style: none;
font-size: 1.1em;
clear: both;
float: left;
background-image: url(../images/menuback.gif);
background-repeat: repeat-x;
width: 925px;
}

ul#topnav li{
margin: 0;
padding: 0;
overflow: hidden;
float: left;
height:40px;
}

ul#topnav a, ul#topnav span {
padding: 10px 20px;
float: left;
text-decoration: none;
color: #fff;
text-transform: uppercase;
clear: both;
height: 20px;
line-height: 20px;
background: #1d1d1d;
}

ul#topnav a {
color: #7bc441;
}

ul#topnav span {
display: none;
}

ul#topnav.v2 span{
background: url(../images/menuhover.gif) repeat-x left top;
}

ul#topnav.v2 a{
color: #555;
background: url(../images/menuhover.gif) repeat-x left bottom;
}

#kolichka{
	position:absolute;
	right:0px;
	height:72px;
	top: 27px;
	width: 175px;
	background-image: url(../images/kolichka.png);
	background-repeat: no-repeat;
}

#productite{
padding-left: 74px;
padding-top: 11px;
}

#id2{
    display:none;
}

.patient-header{font-size:24px;font-weight:600;margin:4px 0;}
      .patient-subtitle{font-size:12px;color:#6b7280;margin-bottom:10px;}

      /* Картичка за търсачката – бяло заоблено поле, като при пациентите */
      .patient-search-card{
        border:1px solid #e5e7eb;
        border-radius:12px;
        background:#fff;
        box-shadow:0 1px 2px rgba(15,23,42,.04);
        padding:10px 12px;
        margin-top:10px;
      }

      /* ТЪРСАЧКА – всичко на един ред, центрирано */
      .patient-search-bar{
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        align-items:center;
        justify-content:center;
        margin:0;
      }
      .patient-search-bar input[type="text"]{
        width:260px;
      }
      .patient-search-bar select{
        height:32px;
        border-radius:999px;
        border:1px solid #d1d5db;
        padding:0 10px;
        background:#fff;
        font-size:13px;
      }
      .patient-search-bar .button{
        height:32px;
        border-radius:999px;
        padding:0 16px;
        font-size:13px;
      }
      .patient-search-id{
        display:flex;
        align-items:center;
        gap:4px;
        font-size:12px;
        color:#4b5563;
      }
      .patient-search-id input[type="checkbox"]{
        width:16px;
        height:16px;
      }

      .patient-list{margin-top:12px;display:flex;flex-direction:column;gap:6px;}

      .patient-card{border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);}
      .patient-card--compact{padding:6px 10px;}
      .patient-card-main{display:flex;align-items:center;gap:10px;}

      .patient-id-col{
        width:45px;
        font-size:11px;
        color:#6b7280;
        text-align:center;
        border-right:1px solid #e5e7eb;
        padding-right:6px;
        flex-shrink:0;
      }
      .patient-animal{width:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
      .patient-primary{flex:1 1 auto;min-width:0;}

      .patient-top-row{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
        margin-bottom:2px;
      }
      .patient-name-row{
        display:flex;
        align-items:center;
        gap:6px;
        font-size:14px;
        font-weight:600;
        min-width:0;
      }
      .patient-name{
        color:#111827;
        text-decoration:none;
      }
      .patient-name:hover{text-decoration:underline;}
      .patient-lastvisit{
        white-space:nowrap;
        font-size:11px;
        color:#9ca3af;
      }

      .patient-second-row{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
      }
      .patient-tags{
        display:flex;
        flex-wrap:wrap;
        gap:4px;
        font-size:11px;
        color:#4b5563;
      }
      .patient-tag-pill{
        display:inline-flex;
        align-items:center;
        gap:4px;
        padding:2px 6px;
        border-radius:999px;
        background:#f3f4f6;
      }

      .patient-owner-block{
        display:flex;
        flex-wrap:wrap;
        gap:6px;
        align-items:center;
        justify-content:flex-end;
        font-size:12px;
      }
      .patient-owner-link{
        color:#2563eb;
        text-decoration:none;
        font-weight:500;
      }
      .patient-owner-link:hover{text-decoration:underline;}

      /* Баджове */
      .owner-badge{
        padding:2px 6px;
        border-radius:999px;
        font-size:11px;
        display:inline-flex;
        align-items:center;
        gap:4px;
      }
      .owner-badge--normal{background:#eef2ff;color:#4f46e5;}
      .owner-badge--regular{background:#ecfdf3;color:#16a34a;}
      .owner-badge--vip{background:#fef3c7;color:#b45309;}
      .owner-badge--relative{background:#eff6ff;color:#2563eb;}
      .owner-badge--hard{background:#fef2f2;color:#b91c1c;}
      .owner-badge--nopay{background:#fef2f2;color:#b91c1c;}
      .owner-badge--crf{background:#ecfeff;color:#0e7490;}
      .owner-badge--hunter{background:#ecfccb;color:#4d7c0f;}

      .pet-badge{
        padding:2px 6px;
        border-radius:999px;
        font-size:11px;
        display:inline-flex;
        align-items:center;
        gap:4px;
      }
      .pet-badge--normal{background:#f3f4f6;color:#374151;}
      .pet-badge--aggressive{background:#fef2f2;color:#b91c1c;}
      .pet-badge--dirty{background:#eff6ff;color:#2563eb;}
      .pet-badge--demon{background:#f3e8ff;color:#7e22ce;}

      /* Бутоните Επι / Pet / Δες – по-малки, на един ред */
      .patient-actions{
        display:flex;
        flex-direction:row;
        gap:6px;
        align-items:center;
        margin-left:8px;
        flex-shrink:0;
      }

      .buttonposesh-style {
        flex:0 0 auto;
        min-width:70px;
        padding:6px 10px;
        font-size:13px;
        border-radius:8px;
        text-decoration:none;
        text-align:center;
        display:flex;
        align-items:center;
        justify-content:center;
        line-height:1.2;
        color:white;
        border:none;
        cursor:pointer;
        transition:all 0.3s ease;
        position:relative;
        overflow:hidden;
      }
      .buttonposesh-style:hover {
        transform:translateY(-2px);
        box-shadow:0 6px 14px rgba(0,0,0,0.18);
        color:white !important;
      }
      .buttonposesh-style::after{
        content:"";
        position:absolute;
        top:0;
        left:-75%;
        width:50%;
        height:100%;
        background:rgba(255,255,255,0.2);
        transform:skewX(-20deg);
        transition:0.5s;
      }
      .buttonposesh-style:hover::after{
        left:130%;
      }
      .btn-green{background:#16a34a;}
      .btn-blue{background:#2563eb;}
      .btn-grey{background:#6b7280;}


.purple {
    background: linear-gradient(135deg, #7d28ae, #9437ca); /* Slightly darker but balanced */
    color: #ffffff;
    font-weight: normal;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-radius: 8px; /* Optional: rounded corners */
    transition: all 0.3s ease; /* Smooth hover effect */
}

.purple:hover {
    background: linear-gradient(135deg, #9437ca, #7d28ae); /* Reversed gradient */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}


.blue {
    background: linear-gradient(135deg, #4b9cd6, #377ab7); /* Slightly darker but balanced */
    color: #ffffff;
    font-weight: bold;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-radius: 8px; /* Optional: rounded corners */
    transition: all 0.3s ease; /* Smooth hover effect */
}

.blue:hover {
    background: linear-gradient(135deg, #377ab7, #4b9cd6); /* Reversed gradient */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.orange {
    background: linear-gradient(135deg, #f0a94d, #d98a30); /* Slightly darker but balanced */
    color: #ffffff;
    font-weight: bold;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-radius: 8px; /* Optional: rounded corners */
    transition: all 0.3s ease; /* Smooth hover effect */
}

.orange:hover {
    background: linear-gradient(135deg, #d98a30, #f0a94d); /* Reversed gradient */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}


.menu-wrapper {
    margin: 20px auto;
    width: fit-content;
    padding: 10px;
    border: 1px solid #d4d4d4;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.menu-table {
    margin: 0 auto;
    border-spacing: 10px;
    font-weight: 600;
    cursor: pointer;
}

.menu-table td {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-table td:hover {
    background-color: #e9f7ec;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.menu-table td.active {
    background-color: #e9f7ec; /* същия зелен фон като hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.menu-button {
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    color: #393f45;
    border-radius: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu-button:hover {
    color: #198754;
}

.menutabc {
padding-left: 5px;
padding-top:3px;
padding-right:5px;
padding-bottom:3px;
font-size:14px;
}

.inputoblig {
    background-color: #e9f7ec;
    border-color: #28a745;
}

.petshop {
    background-color: #f6ffe5; /* Softer pastel green */
    border: 1px solid #a3d9a5; /* Slightly thicker, modern border */
    border-radius: 8px; /* Rounded corners for a smoother look */
    font-size: 14px;
    padding: 8px; /* Slightly increased padding for a better visual */
    transition: all 0.3s ease; /* Smooth transitions for hover effects */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.petshop:hover {
    background-color: #eaffd3; /* Slightly darker green on hover */
    border-color: #7cc47e; /* Change border color for hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.petshopoblig {
    background-color: #eef9ff; /* Soft pastel blue */
    border: 1px solid #96c5db; /* Slightly thicker, modern border */
    border-radius: 8pxpx; /* Rounded corners for a smoother look */
    font-size: 14px;
    padding: 8px; /* Slightly increased padding for better spacing */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.petshopoblig:hover {
    background-color: #dff4ff; /* Slightly darker blue on hover */
    border-color: #65a4c8; /* Change border color for hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

.container {
width: 925px;
height: 330px;
position: absolute;
top: 50%; left: 50%;
margin: -165px 0 0 -210px;
overflow: hidden;
background-image: url(../images/menuback.gif);
background-repeat: repeat-x;
}

.prdiv {
color: #ffffff;
text-decoration: none;
}

.prdiv:hover{
color: #ffffff;
text-decoration: underline;
}

.orders {
border: 0px #dbdbdb solid;
font-size: 14px;
background-color:#e9ffae;
padding: 2px;
color: #373737;
font-weight: bold;
}

.ordersb {
border: 0px #d4dbe7 solid;
font-size: 14px;
background-color:#cdeaff;
padding: 2px;
color: #373737;
font-weight: bold;
}

.ordersdown {
border: 0px #dbdbdb solid;
background-color:#f1ffda;
padding: 2px;
color: #373737;
}

.opacity {
filter:alpha(opacity=50); 
-moz-opacity: 0.5; 
opacity: 0.5;
border: 0px;
}

.opacity:hover {
filter:alpha(opacity=100);   
-moz-opacity: 1.0;   
opacity: 1.0;
border: 0px;
}

.izchisti {
color: #ff3535;
background-color: #e4eeff;
text-decoration: none;
}

.izchisti:hover {
color: #e4eeff;
background-color: #ff3535;
text-decoration: none;
}

.orderexec {
font-size: 15px;
font-weight: bold;
color:#4faeff;
text-decoration: none;
}

.orderexec:hover {
font-size: 15px;
font-weight: bold;
background-color: #87c7ff;
color:#ffffff;
text-decoration: none;
}

.labkniga {
font-size: 14px;
font-weight: bold;
background-color: #ffffff;
color: #6699ff;
text-decoration: none;
}

.labkniga:hover {
font-size: 14px;
font-weight: bold;
background-color: #6699ff;
color: #ffffff;
text-decoration: none;
}

.pacient {
background-color: #f1fcff;
border: 1px #d9d9d9 solid;
border-radius: 10px;
width: 65%;
font-size:14px; 
padding: 25px;
}

.done {
    background-color: #def6eb;
    color: #0f5132;
    border: 0px;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.done1 {
    background-color: #def6eb;
    color: #0f5132;
    border: 1px solid #badbcc;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.error1 {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.error {
    background-color: #f8d7da;
    color: #842029;
    border: 0px;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

/* =====================================================================
   МОДЕРНО МЕНЮ („Liquid Glass“) — прехвърлено от nav_modern.php
   JavaScript-ът (плъзгащите се капки, общият контур, темите) остава в nav_modern.php.
   ===================================================================== */
:root{
  --lg-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",Roboto,sans-serif;
  --lg-ink:#1d1d1f; --lg-ink2:#4b5563; --lg-green-d:#0b7a44;
  --lg-top:rgba(255,255,255,.80); --lg-bot:rgba(255,255,255,.58);      /* стъклото: горе по-плътно, долу по-прозрачно */
  --lg-glass:linear-gradient(180deg,var(--lg-top),var(--lg-bot));
  --lg-edge:rgba(255,255,255,.9);
  --lg-shadow:0 22px 44px -22px rgba(30,64,175,.30),0 4px 12px -6px rgba(16,24,40,.10),inset 0 1px 0 rgba(255,255,255,.98),inset 0 -1px 0 rgba(30,64,175,.05);
  --lg-spring:cubic-bezier(.34,1.36,.52,1);
}

/* ============ СВЕТЛИНА: без размазани петна — тънък светлинен ръб + отблясък под курсора ============ */
.menu-with-sub{position:relative !important;background:none !important;border:none !important;box-shadow:none !important;isolation:isolate;padding-bottom:46px !important;}
.menu-with-sub::before,.menu-with-sub::after{content:none !important;}

/* ============ ГЛАВНОТО МЕНЮ — стъклена капсула ============ */
.menu-with-sub .menu-table{position:relative;display:inline-flex !important;align-items:center;width:auto !important;margin:12px auto 0 !important;padding:6px !important;gap:0;
  background:var(--lg-glass) !important;-webkit-backdrop-filter:blur(24px) saturate(185%);backdrop-filter:blur(24px) saturate(185%);
  border:1px solid transparent !important;border-radius:26px !important;
  border-collapse:separate !important;border-spacing:0 !important;z-index:2;}
.menu-with-sub .menu-table{cursor:pointer;--mx:50%;--my:50%;transition:box-shadow .6s ease;}
/* цветна „контактна“ сянка: синя в покой, зелена при посочване */
.menu-with-sub .menu-table{box-shadow:0 0 0 0 rgba(16,185,129,0),inset 0 1px 0 rgba(255,255,255,.98),inset 0 -1px 0 rgba(30,64,175,.04) !important;}
.menu-with-sub.lg-hot .menu-table{box-shadow:0 18px 36px -22px rgba(15,23,42,.30),inset 0 1px 0 rgba(255,255,255,.98),inset 0 -1px 0 rgba(15,23,42,.04) !important;}
/* светлинен ръб (1.5px) — преливащ градиент; синьо → зелено при посочване */
.menu-with-sub .menu-table::before{content:'';position:absolute;inset:-1px;border-radius:inherit;padding:1.5px;pointer-events:none;z-index:0;
  background:linear-gradient(110deg,rgba(255,255,255,.9) 0%,rgba(96,165,250,.55) 22%,rgba(255,255,255,.95) 45%,rgba(56,189,248,.55) 70%,rgba(255,255,255,.9) 100%);background-size:220% 100%;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  opacity:0;animation:lgRim 6s linear infinite;animation-play-state:paused;transition:opacity .55s ease;}
/* светлинният ръб се появява плавно само при посочване (в зелената гама) */
.menu-with-sub .menu-table::before{content:none !important;}
.menu-with-sub.lg-hot .menu-table::before{opacity:1;animation-play-state:running;
  background-image:linear-gradient(110deg,rgba(255,255,255,.9) 0%,rgba(52,211,153,.6) 22%,rgba(255,255,255,.95) 45%,rgba(45,212,191,.55) 70%,rgba(255,255,255,.9) 100%);}
@keyframes lgRim{to{background-position:220% 0;}}
/* отблясък, който следва курсора по стъклото */
.menu-with-sub .menu-table::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;opacity:0;transition:opacity .4s ease;
  background:radial-gradient(160px 70px at var(--mx) var(--my),rgba(255,255,255,.85),rgba(255,255,255,0) 70%);mix-blend-mode:soft-light;}
.menu-with-sub.lg-hot .menu-table::after{opacity:1;}
.menu-with-sub .menu-table tbody,.menu-with-sub .menu-table tr{display:contents;}
.menu-with-sub .menu-table td{position:relative;z-index:1;display:block !important;padding:0 !important;margin:0 !important;border:none !important;background:transparent !important;
  border-radius:20px !important;cursor:pointer;box-shadow:none !important;width:auto !important;height:auto !important;-webkit-tap-highlight-color:transparent;}
.menu-with-sub .menu-table td .menu-button{display:flex !important;align-items:center;gap:8px;padding:11px 17px !important;margin:0 !important;background:none !important;border:none !important;box-shadow:none !important;
  font:600 14px/1 var(--lg-font) !important;letter-spacing:-.01em;color:var(--lg-ink2) !important;white-space:nowrap;text-shadow:none !important;transition:color .25s ease;}

/* стъклени разделители между бутоните (светъл „шев“ с лек релеф) */
.menu-with-sub .menu-table td + td::before{content:'';position:absolute;left:0;top:22%;bottom:22%;width:2px;margin-left:-1px;border-radius:2px;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.95) 50%,rgba(255,255,255,0)),
             linear-gradient(90deg,rgba(30,64,175,.14) 0 50%,transparent 50%);
  box-shadow:1px 0 0 rgba(255,255,255,.6);transition:opacity .3s ease;}
.menu-with-sub .menu-table td.lg-nosep::before{opacity:0;}

/* иконки */
.menu-with-sub .menu-table td .menu-button::before{content:'';flex:0 0 auto;width:17px;height:17px;background:currentColor;opacity:.85;
  -webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;transition:transform .4s var(--lg-spring);}
.menu-with-sub .menu-table td:nth-child(1){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M19 8v6M22 11h-6'/></svg>");}
.menu-with-sub .menu-table td:nth-child(2){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2z'/><path d='M22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/></svg>");}
.menu-with-sub .menu-table td:nth-child(3){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='8' y='2' width='8' height='4' rx='1'/><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><path d='M12 11h4M12 16h4M8 11h.01M8 16h.01'/></svg>");}
.menu-with-sub .menu-table td:nth-child(4){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/><path d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/></svg>");}
.menu-with-sub .menu-table td:nth-child(5){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v18h18'/><path d='M18 17V9M13 17V5M8 17v-3'/></svg>");}
.menu-with-sub .menu-table td:nth-child(6){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='3'/><path d='M16 2v4M8 2v4M3 10h18'/><path d='M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01'/></svg>");}

.menu-with-sub .menu-table td:hover .menu-button,.menu-with-sub .menu-table td.lg-hov .menu-button{color:var(--lg-ink) !important;}
.menu-with-sub .menu-table td:hover .menu-button::before,.menu-with-sub .menu-table td.lg-hov .menu-button::before{transform:scale(1.14) rotate(-5deg);}
.menu-with-sub .menu-table td.active .menu-button{color:var(--lg-ink) !important;}
.menu-with-sub .menu-table td.active .menu-button::before{opacity:1;}
.menu-with-sub .menu-table td:active .menu-button{transform:scale(.97);}

/* „стъклената капка“ — плъзга се към посочения бутон и се връща на активния */
.lg-drop{position:absolute;z-index:0;top:6px;left:6px;height:0;width:0;border-radius:20px;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,rgba(255,255,255,1),rgba(255,255,255,.82));
  box-shadow:0 10px 22px -10px rgba(15,157,88,.5),0 2px 5px rgba(16,24,40,.08),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(255,255,255,.75),inset 0 -3px 8px rgba(15,157,88,.07);
  transition:left .5s var(--lg-spring),width .5s var(--lg-spring),top .5s var(--lg-spring),height .5s var(--lg-spring),opacity .25s ease,box-shadow .3s ease,background .3s ease;}
.lg-drop.on{opacity:1;}
.lg-drop.hover-only{background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,.55));box-shadow:0 8px 18px -10px rgba(16,24,40,.28),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(255,255,255,.6);}
.menu-with-sub .menu-table:not(.lg-ready) td.active{background:linear-gradient(180deg,#fff,rgba(255,255,255,.82)) !important;box-shadow:0 8px 20px -8px rgba(15,157,88,.45),inset 0 1px 0 #fff !important;}

/* ============ МИНИ МЕНЮ — „разтича се“ от голямото като капка ============ */
.menu-with-sub .mini-nav-wrapper{top:var(--lg-mini-top,auto) !important;bottom:auto !important;z-index:3 !important;
  padding:9px 16px 7px !important;gap:2px 8px !important;border-radius:0 0 22px 22px !important;
  background:linear-gradient(180deg,rgba(248,251,255,.97),rgba(255,255,255,.80)) !important;-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);
  border:1px solid transparent !important;border-top:none !important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.9) !important;
  transform-origin:50% 0;animation:lgDrip .35s cubic-bezier(.2,.7,.2,1) both;}
/* вдлъбнатите „шийки“, с които капката се слива с менюто отгоре */
.menu-with-sub .mini-nav-wrapper::before,.menu-with-sub .mini-nav-wrapper::after{content:'';position:absolute;top:0;width:18px;height:18px;pointer-events:none;}
.menu-with-sub .mini-nav-wrapper::before{left:-18px;background:radial-gradient(circle at 0 100%,transparent 17.5px,rgba(248,251,255,.97) 18px);}
.menu-with-sub .mini-nav-wrapper::after{right:-18px;background:radial-gradient(circle at 100% 100%,transparent 17.5px,rgba(248,251,255,.97) 18px);}
/* деликатно „изтичане“: леко спускане и появяване, без отскок */
@keyframes lgDrip{
  0%  {opacity:0;transform:translateX(-50%) translateY(-4px) scale(.97,.9);}
  100%{opacity:1;transform:translateX(-50%) translateY(0) scale(1,1);}
}
.menu-with-sub .mini-nav-link{position:relative;z-index:1;font-family:var(--lg-font) !important;font-weight:600 !important;letter-spacing:-.005em;font-size:12.5px !important;transition:color .25s ease !important;}
.menu-with-sub .mini-nav-link:hover{background:transparent !important;}
.menu-with-sub .mini-nav-link.active{background:transparent !important;box-shadow:none !important;}
/* плъзгаща се стъклена капка и в мини менюто */
.lg-mdrop{position:absolute;z-index:0;left:0;top:0;width:0;height:0;border-radius:999px;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,rgba(255,255,255,1),rgba(255,255,255,.8));
  box-shadow:0 6px 14px -8px rgba(16,24,40,.30),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(226,232,240,.8);
  transition:left .45s var(--lg-spring),width .45s var(--lg-spring),top .45s var(--lg-spring),height .45s var(--lg-spring),opacity .2s ease;}
.lg-mdrop.on{opacity:1;}
.lg-mdrop.act{box-shadow:0 6px 14px -8px rgba(15,157,88,.45),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(187,247,208,.9);}
.menu-with-sub .mini-nav-sep{width:1px;height:14px;font-size:0 !important;background:linear-gradient(180deg,transparent,rgba(30,64,175,.18),transparent);}

/* ============ ЗООМАГАЗИН — стъклено „езиче“ над менюто, слято с него (огледално на капката отдолу) ============ */
#comunsite td.menutabc{padding:0 !important;}
#comunsite tr:has(> td#menutabig){display:flex !important;width:max-content;max-width:96vw;margin:10px auto 0;padding:6px 26px 4px;gap:0;position:relative;z-index:3;
  background:linear-gradient(180deg,rgba(255,255,255,.66),rgba(255,255,255,.80));-webkit-backdrop-filter:blur(24px) saturate(185%);backdrop-filter:blur(24px) saturate(185%);
  border:1px solid transparent;border-bottom:none;border-radius:22px 22px 0 0;box-shadow:inset 0 1px 0 rgba(255,255,255,.98);transform:translateY(var(--lg-zoo-shift,0px));}
/* вдлъбнати „шийки“ — езичето е от същото стъкло и се влива в менюто */
#comunsite tr:has(> td#menutabig)::before,#comunsite tr:has(> td#menutabig)::after{content:'';position:absolute;bottom:0;width:18px;height:18px;pointer-events:none;}
#comunsite tr:has(> td#menutabig)::before{left:-18px;background:radial-gradient(circle at 0 0,transparent 17.5px,rgba(255,255,255,.80) 18px);}
#comunsite tr:has(> td#menutabig)::after{right:-18px;background:radial-gradient(circle at 100% 0,transparent 17.5px,rgba(255,255,255,.80) 18px);}
#comunsite td#menutabig{position:relative;z-index:1;display:block !important;width:auto !important;background:none !important;border:none !important;height:auto !important;padding:0 !important;}
#comunsite td#menutabig + td#menutabig::before{content:'';position:absolute;left:0;top:26%;bottom:26%;width:1px;background:linear-gradient(180deg,transparent,rgba(30,64,175,.16),transparent);transition:opacity .25s;}
#comunsite td#menutabig.lg-nosep::before{opacity:0;}
#comunsite td#menutabig span{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 32px 8px 28px;border-radius:16px;cursor:pointer;background:none !important;
  color:var(--lg-ink2) !important;font:600 13.5px/1 var(--lg-font) !important;letter-spacing:-.01em;transition:color .25s ease;}
#comunsite td#menutabig span::before{content:'';width:16px;height:16px;background:#0ea5e9;opacity:.85;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;transition:transform .4s var(--lg-spring);}
#comunsite td#menutabig:nth-of-type(1){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/><path d='M3 6h18'/><path d='M16 10a4 4 0 0 1-8 0'/></svg>");}
#comunsite td#menutabig:nth-of-type(2){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/></svg>");}
#comunsite td#menutabig:nth-of-type(3){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/></svg>");}
#comunsite td#menutabig:hover span{color:var(--lg-ink) !important;}
#comunsite td#menutabig:hover span::before{transform:scale(1.14) rotate(-5deg);}
html body #comunsite td#menutabig.active span{color:var(--lg-ink) !important;-webkit-text-fill-color:currentColor;}
html body #comunsite td#menutabig.active span::before{opacity:1;}
/* плъзгащата се капка в зоомагазина — синкава */
.lg-zdrop{position:absolute;z-index:0;left:0;top:0;width:0;height:0;border-radius:16px;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.7));
  box-shadow:0 6px 14px -8px rgba(16,24,40,.25),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(255,255,255,.7);
  transition:left .5s var(--lg-spring),width .5s var(--lg-spring),top .5s var(--lg-spring),height .5s var(--lg-spring),opacity .25s ease,box-shadow .3s ease;}
.lg-zdrop.on{opacity:1;}
.lg-zdrop.act{background:linear-gradient(180deg,#fff,rgba(240,249,255,.9));box-shadow:0 8px 18px -10px rgba(2,132,199,.55),inset 0 1px 0 #fff,inset 0 0 0 1px rgba(186,230,253,.7);}

/* ============ ОБЩ МЕК БЯЛ КОНТУР около трите части (езиче + меню + капка) — рисува се с SVG ============ */
.lg-outline{position:absolute;left:0;top:0;pointer-events:none;z-index:5;overflow:visible;opacity:0;transition:opacity .8s ease;}
.lg-outline.ready{opacity:1;}
.lg-outline .o1{fill:none;stroke:rgba(15,23,42,.085);stroke-width:2.6;filter:blur(1px);}
.lg-outline .o2{fill:none;stroke:#fff;stroke-width:1;}
.lg-outline .o3{display:none;}
.lg-outline .o1{transition:stroke .5s ease;}
.lg-outline.hot .o1{stroke:rgba(15,23,42,.12);}

/* главното меню — без горно отстояние, за да се долепи до езичето */
.menu-with-sub .menu-table{margin-top:0 !important;}
.menu-with-sub{margin-top:0 !important;padding-top:0 !important;}
.menu-with-sub::before,.menu-with-sub::after{top:-34px;height:120px;}


/* =====================================================================
   ТЕМИ за избрания бутон (капката). Превключване: ?lgtheme=graphite | aqua | mint | ocean
   (запомня се в браузъра); по подразбиране — $LG_THEME горе във файла.
   ===================================================================== */
.menu-with-sub .menu-table td .menu-button,#comunsite td#menutabig span,.menu-with-sub .mini-nav-link{transition:color .3s ease !important;}


/* ---------- 0) SOFT (по подразбиране) — избраната страница: деликатен градиент изумруд→океан;
               посочване: тиха сива капка (без сянка), която се плъзга отделно ---------- */
.lg-sel{position:absolute;z-index:0;pointer-events:none;display:none;border-radius:20px;}
html.lg-t-soft .lg-sel{display:block;
  /* течно стъкло: бяла „леща“ с блик отгоре, фин вътрешен кант и мека дълбочина */
  background:linear-gradient(180deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.62) 55%,rgba(255,255,255,.80) 100%);
  -webkit-backdrop-filter:blur(10px) saturate(190%);backdrop-filter:blur(10px) saturate(190%);
  box-shadow:0 1px 1px rgba(15,23,42,.04),0 8px 18px -10px rgba(14,116,144,.30),
             inset 0 1px 0 #fff,inset 0 -1px 1px rgba(14,116,144,.08),inset 0 0 0 .5px rgba(15,23,42,.10),inset 0 6px 10px -8px rgba(255,255,255,.9);}
html.lg-t-soft .lg-sel.z{border-radius:16px;}
html.lg-t-soft .lg-drop,html.lg-t-soft .lg-zdrop{background:rgba(15,23,42,.05) !important;box-shadow:none !important;}
html.lg-t-soft .lg-drop:not(.hover-only),html.lg-t-soft .lg-zdrop.act{opacity:0 !important;}
/* буквите и иконката на избраната страница — синьо-зелен градиент */
html.lg-t-soft .menu-with-sub .menu-table td.active .menu-button,
html.lg-t-soft #comunsite td#menutabig.active span{
  background:linear-gradient(90deg,#0f9f78 0%,#0e9cc4 60%,#2f7fe0 100%) !important;-webkit-background-clip:text !important;background-clip:text !important;
  color:transparent !important;-webkit-text-fill-color:transparent !important;font-weight:700 !important;}
html.lg-t-soft .menu-with-sub .menu-table td.active .menu-button::before,
html.lg-t-soft #comunsite td#menutabig.active span::before{background:linear-gradient(135deg,#10b981,#0ea5e9) !important;opacity:1;}
html.lg-t-soft .menu-with-sub .menu-table td.lg-under:not(.active) .menu-button{color:var(--lg-ink) !important;}
/* ---------- 1) GRAPHITE — плътна графитена капка, бял текст (като macOS / Linear) ---------- */
html.lg-t-graphite .lg-drop,html.lg-t-graphite .lg-drop.hover-only,
html.lg-t-graphite .lg-zdrop,html.lg-t-graphite .lg-zdrop.act{
  background:linear-gradient(180deg,#34343a 0%,#1c1c21 100%) !important;
  box-shadow:0 8px 18px -8px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.4) !important;}
html.lg-t-graphite .menu-with-sub .menu-table td.lg-under .menu-button,
html.lg-t-graphite #comunsite td#menutabig span.lg-under{color:#fff !important;-webkit-text-fill-color:#fff;}
html.lg-t-graphite #comunsite td#menutabig span.lg-under::before{background:#7dd3fc;}

/* ---------- 2) AQUA — матово стъкло: бяла „леща“ с фин вътрешен кант (като iOS / visionOS) ---------- */
html.lg-t-aqua .lg-drop,html.lg-t-aqua .lg-zdrop.act{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.78)) !important;
  box-shadow:0 1px 1px rgba(15,23,42,.04),0 6px 16px -8px rgba(15,23,42,.22),inset 0 1px 0 #fff,inset 0 -1px 2px rgba(15,23,42,.06),inset 0 0 0 .5px rgba(15,23,42,.10) !important;}
html.lg-t-aqua .lg-drop.hover-only,html.lg-t-aqua .lg-zdrop{background:rgba(255,255,255,.55) !important;box-shadow:inset 0 0 0 .5px rgba(15,23,42,.06) !important;}
html.lg-t-aqua .menu-with-sub .menu-table td.lg-under .menu-button{color:var(--lg-ink) !important;}
html.lg-t-aqua .menu-with-sub .menu-table td.lg-under .menu-button::before{background:#0a84ff;opacity:1;}
html.lg-t-aqua #comunsite td#menutabig span.lg-under{color:var(--lg-ink) !important;}

/* ---------- 3) MINT — тих оттенък на марката (без сенки), като Stripe / Notion ---------- */
html.lg-t-mint .lg-drop,html.lg-t-mint .lg-zdrop.act{
  background:#e9f8ef !important;box-shadow:inset 0 0 0 1px rgba(16,185,129,.22) !important;}
html.lg-t-mint .lg-drop.hover-only,html.lg-t-mint .lg-zdrop{background:rgba(15,23,42,.05) !important;box-shadow:none !important;}
html.lg-t-mint .menu-with-sub .menu-table:not(.lg-away) td.active .menu-button{color:#047857 !important;}
html.lg-t-mint .menu-with-sub .menu-table td.lg-under .menu-button{color:var(--lg-ink) !important;}
html.lg-t-mint .menu-with-sub .menu-table:not(.lg-away) td.active.lg-under .menu-button{color:#047857 !important;}
html.lg-t-mint #comunsite td#menutabig.active span{color:#047857 !important;}

/* ---------- 4) OCEAN — жив градиент изумруд→океан с бял текст, лек „блик“ отгоре ---------- */
html.lg-t-ocean .lg-drop,html.lg-t-ocean .lg-drop.hover-only,
html.lg-t-ocean .lg-zdrop,html.lg-t-ocean .lg-zdrop.act{
  background:linear-gradient(135deg,#10b981 0%,#0ea5e9 100%) !important;
  box-shadow:0 10px 22px -12px rgba(14,165,233,.75),inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 6px rgba(3,105,161,.25) !important;}
html.lg-t-ocean .lg-drop::before,html.lg-t-ocean .lg-zdrop::before{content:'';position:absolute;left:3%;right:3%;top:1px;height:50%;border-radius:inherit;opacity:.6;
  background:linear-gradient(180deg,rgba(255,255,255,.35),rgba(255,255,255,0));pointer-events:none;}
html.lg-t-ocean .menu-with-sub .menu-table td.lg-under .menu-button,
html.lg-t-ocean #comunsite td#menutabig span.lg-under{color:#fff !important;-webkit-text-fill-color:#fff;}
html.lg-t-ocean #comunsite td#menutabig span.lg-under::before{background:#fff;}

/* мини менюто — във всички теми светла стъклена капка (LAB и др. имат свои цветове) */
.lg-mdrop.act{box-shadow:0 6px 14px -8px rgba(15,23,42,.30),inset 0 1px 0 #fff,inset 0 0 0 .5px rgba(15,23,42,.10) !important;}

@media (max-width:760px){
  .menu-with-sub .menu-table{display:flex !important;flex-wrap:wrap;justify-content:center;border-radius:22px !important;}
  .menu-with-sub .menu-table td + td::before{display:none;}
  .menu-with-sub .menu-table td .menu-button{padding:9px 12px !important;font-size:13px !important;}
  #comunsite tr:has(> td#menutabig){flex-wrap:wrap;}
}
@media (prefers-reduced-motion:reduce){ .lg-drop,.menu-with-sub .mini-nav-wrapper,.menu-with-sub .menu-table td .menu-button::before,#comunsite td#menutabig span{transition:none !important;animation:none !important;} }

/* =====================================================================
   МОДЕРЕН ВИД НА САЙТА — рамка, хедър, преход към менюто
   ===================================================================== */
/* Рамката около целия сайт: мек преливащ се градиентен кант + дълбока мека сянка */
#comunsite{
    width:85%;
    margin:22px auto 30px;
    border:1.5px solid transparent;
    border-radius:26px;
    background:
        linear-gradient(rgba(255,255,255,.93),rgba(255,255,255,.93)) padding-box,
        linear-gradient(120deg,#a7f3d0 0%,#bae6fd 22%,#c7d2fe 45%,#e9d5ff 60%,#bae6fd 78%,#a7f3d0 100%) border-box;
    background-size:100% 100%,300% 300%;
    animation:siteFrame 18s ease-in-out infinite alternate;
    box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 30px 70px -35px rgba(15,23,42,.35),0 8px 24px -16px rgba(14,116,144,.25);
}
@keyframes siteFrame{ from{background-position:0 0,0% 50%;} to{background-position:0 0,100% 50%;} }
@media (prefers-reduced-motion:reduce){ #comunsite{animation:none;} }

/* Хедърът: заоблени горни ъгли и плавно „разтваряне“ надолу към менюто */
#header,#headerzoo{
    border-radius:24px 24px 0 0;
    -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 62%,rgba(0,0,0,.55) 82%,transparent 100%);
            mask-image:linear-gradient(180deg,#000 0%,#000 62%,rgba(0,0,0,.55) 82%,transparent 100%);
}
/* менюто се издърпва леко нагоре в избледняващата част на хедъра */
#comunsite > div[style*="position:relative"]:first-child,#comunsite > div[style*="position: relative"]:first-child{margin-bottom:-16px;position:relative;z-index:0;}

/* Неутрализиране на старите стилове за менюто (по-горе в този файл), които пречат на новото */
#comunsite td#menutabig,#comunsite td#menutabig:hover{box-shadow:none !important;transform:none !important;line-height:normal !important;height:auto !important;background:none !important;}
.menu-with-sub .menu-table td,.menu-with-sub .menu-table td:hover,.menu-with-sub .menu-table td.active{transform:none !important;box-shadow:none !important;background:transparent !important;}
.menu-with-sub .menu-table td .menu-button:hover{color:inherit;}
.menu-with-sub{width:fit-content;margin-left:auto !important;margin-right:auto !important;}

/* Разстояние меню → съдържание: по-малко, с деликатна „хоризонт“ линия отдолу */
#comunsite .menu-wrapper.menu-with-sub{margin-bottom:6px !important;padding-bottom:64px !important;
  background:
    radial-gradient(40% 3px at 50% calc(100% - 1px),rgba(56,189,248,.28),transparent 70%) bottom/100% 6px no-repeat,
    linear-gradient(90deg,transparent 0%,rgba(148,163,184,.40) 25%,rgba(148,163,184,.40) 75%,transparent 100%) bottom/100% 1px no-repeat !important;}

/* Гръцка версия: различен ред на бутоните → иконки за 3/4/5
   (Σύντομη επίσκεψη / Προσκομίσεις ημέρας / Χρωστούμενα) */
.menu-with-sub .menu-table td:nth-child(3){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/></svg>");}
.menu-with-sub .menu-table td:nth-child(4){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='8' y='2' width='8' height='4' rx='1'/><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/><path d='M12 11h4M12 16h4M8 11h.01M8 16h.01'/></svg>");}
.menu-with-sub .menu-table td:nth-child(5){--ic:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/><path d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/></svg>");}
/* мини менюто тук е по-дълго (7 линка) — по-сбити разстояния */
.menu-with-sub .mini-nav-wrapper{gap:2px 4px !important;}

/* по-малка дупка между бележките горе и рамката на сайта */
.notify-stack{margin-bottom:0 !important;}
.notify-stack ~ div > #comunsite{margin-top:8px;}


/* ================= ПРОИЗВОДИТЕЛНОСТ =================
   1) Рамката на сайта — статичен градиент. Анимацията прерисуваше ЦЕЛИЯ сайт на всеки кадър
      (на дълги страници като Дневник посещения това беше основната причина да „лагва“). */
#comunsite{animation:none !important;background-position:0 0,35% 50% !important;}
/* 2) Пулсирането на LAB / Напомняния / Стационар — вместо анимирана сянка (прерисуване на всеки кадър)
      се анимира само мащаб/прозрачност на тънък пръстен → върви на видеокартата, без товар. */
.mini-nav-link.lab-alert,.mini-nav-link.rem-alert,.mini-nav-link.nos-alert{animation:none !important;position:relative;}
.mini-nav-link.lab-alert::after,.mini-nav-link.rem-alert::after,.mini-nav-link.nos-alert::after{
  content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 2px var(--lg-pulse,rgba(220,38,38,.45));
  opacity:0;animation:lgPulse 2.2s ease-out infinite;will-change:transform,opacity;}
.mini-nav-link.rem-alert::after{--lg-pulse:rgba(37,99,235,.40);}
.mini-nav-link.nos-alert::after{--lg-pulse:rgba(249,115,22,.50);animation-duration:2s;}
@keyframes lgPulse{0%{transform:scale(1);opacity:.9;}70%{transform:scale(1.12,1.4);opacity:0;}100%{transform:scale(1.12,1.4);opacity:0;}}
@media (prefers-reduced-motion:reduce){ .mini-nav-link::after{animation:none !important;} }

/* по-малко разстояние между футъра и фиксираната лента „Следващи часове“ долу */
html body:has(.upn){padding-bottom:46px !important;}
body:has(.upn) #comunsite{margin-bottom:8px;}


/* рамката на сайта — мек сив кант (еднакво в BG и GR) */
#comunsite{background:
    linear-gradient(rgba(255,255,255,.93),rgba(255,255,255,.93)) padding-box,
    linear-gradient(120deg,#e2e8f0 0%,#cbd5e1 50%,#e2e8f0 100%) border-box !important;
  background-size:100% 100%,100% 100% !important;}
/* мини менюто: избраната страница винаги е със зелен надпис — и когато има брояч (LAB, Телефони, Напомняния, Стационар) */
.mini-nav-link.lab-alert.active,.mini-nav-link.rem-alert.active,.mini-nav-link.nos-alert.active,.mini-nav-link.nos-done.active{color:#198754 !important;}

/* =====================================================================
   МОБИЛНА ВЕРСИЯ (телефон) — всичко под 760px ширина
   (изисква <meta name="viewport"> в lbook.php / zoomagazin.php)
   ===================================================================== */
@media (max-width:760px){
  html,body{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
  body{overflow-x:hidden;}
  /* рамката на сайта — почти на цял екран */
  #comunsite{width:calc(100% - 12px) !important;margin:6px auto 8px !important;border-radius:18px !important;overflow:clip;}
  .notify-stack ~ div > #comunsite{margin-top:6px !important;}
  .notify-stack{width:calc(100% - 12px) !important;margin-top:6px !important;}
  /* хедърът — по-нисък, снимката запълва */
  #header,#headerzoo{aspect-ratio:auto !important;height:92px !important;border-radius:16px 16px 0 0 !important;}
  /* менюто започва малко по-ниско — не закрива логото в хедъра */
  #comunsite > div[style*="position:relative"]:first-child,#comunsite > div[style*="position: relative"]:first-child{margin-bottom:-4px !important;}
  /* БАБХ бутонът — по-малък */
  #babh-float{transform:scale(.8);transform-origin:top right;}

  /* главната таблица-скелет на сайта (менюто + съдържанието са в нея) → обикновени блокове на цялата ширина */
  #comunsite > table,#comunsite > table > tbody,#comunsite > table > tbody > tr:not(:has(> td#menutabig)),#comunsite td.menutabc{display:block !important;width:100% !important;box-sizing:border-box;}
  #comunsite td.menutabc > div{width:100% !important;}
  /* ---------- МЕНЮ ---------- */
  .lg-outline{display:none !important;}
  .menu-with-sub{width:100% !important;padding:0 8px 12px !important;margin-bottom:4px !important;box-sizing:border-box;}
  #comunsite .menu-wrapper.menu-with-sub{padding-bottom:12px !important;margin-bottom:4px !important;}
  /* зоомагазин — три равни бутона в стъклена лента */
  #comunsite tr:has(> td#menutabig){width:auto !important;max-width:none !important;margin:0 8px 6px !important;padding:4px !important;border-radius:16px !important;transform:none !important;
    border:1px solid rgba(255,255,255,.9) !important;box-shadow:0 6px 16px -10px rgba(15,23,42,.25),inset 0 1px 0 #fff !important;}
  #comunsite tr:has(> td#menutabig)::before,#comunsite tr:has(> td#menutabig)::after{display:none !important;}
  #comunsite td#menutabig{flex:1 1 0 !important;min-width:0;}
  #comunsite td#menutabig span{display:flex !important;flex-direction:column;gap:3px !important;padding:7px 2px !important;font-size:11.5px !important;line-height:1.15 !important;white-space:normal;text-align:center;border-radius:12px !important;}
  #comunsite td#menutabig span::before{width:15px !important;height:15px !important;}
  /* главното меню — 3 × 2 плочки (иконка над текста) */
  .menu-with-sub .menu-table{display:grid !important;grid-template-columns:repeat(3,1fr);width:100% !important;margin:0 !important;padding:5px !important;border-radius:20px !important;
    box-shadow:0 10px 24px -16px rgba(15,23,42,.35),inset 0 1px 0 #fff !important;border:1px solid rgba(255,255,255,.9) !important;box-sizing:border-box;}
  .menu-with-sub .menu-table td{min-width:0;border-radius:15px !important;}
  .menu-with-sub .menu-table td + td::before{display:none !important;}
  .menu-with-sub .menu-table td .menu-button{flex-direction:column;justify-content:center;gap:5px !important;padding:9px 3px !important;min-height:56px;
    font-size:12px !important;line-height:1.15 !important;white-space:normal !important;text-align:center;}
  .menu-with-sub .menu-table td .menu-button::before{width:19px !important;height:19px !important;}
  .lg-sel{border-radius:15px !important;}
  .lg-drop{display:none !important;}
  /* мини менюто — хоризонтална лента, която се плъзга с пръст */
  .menu-with-sub .mini-nav-wrapper{position:relative !important;left:auto !important;top:auto !important;bottom:auto !important;transform:none !important;animation:none !important;
    width:100% !important;max-width:100% !important;margin:6px 0 0 !important;justify-content:flex-start !important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;border-radius:999px !important;padding:5px 8px !important;box-sizing:border-box;
    border:1px solid rgba(255,255,255,.9) !important;box-shadow:0 6px 16px -12px rgba(15,23,42,.3),inset 0 1px 0 #fff !important;}
  .menu-with-sub .mini-nav-wrapper::-webkit-scrollbar{display:none;}
  .menu-with-sub .mini-nav-wrapper::before,.menu-with-sub .mini-nav-wrapper::after{display:none !important;}
  .menu-with-sub .mini-nav-link{flex:0 0 auto;padding:6px 10px !important;font-size:12.5px !important;}
  /* ---------- ФОРМИ (Добави пациент / посещение / профил) ---------- */
  .page-wrap{padding:0 8px !important;margin-top:6px !important;}
  .card{padding:12px !important;border-radius:14px !important;}
  .grid,.grid-3,.grid-4,.grid-5{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  /* 16px в полетата → iPhone не „зумва“ страницата при писане */
  #comunsite input[type=text],#comunsite input[type=date],#comunsite input[type=time],#comunsite input[type=number],#comunsite input[type=tel],
  #comunsite input[type=email],#comunsite input[type=search],#comunsite input[type=password],#comunsite select,#comunsite textarea{font-size:16px !important;max-width:100%;}
  #comunsite input[type=text],#comunsite input[type=date],#comunsite input[type=number],#comunsite select{min-height:40px;}
  .inline .unit{flex:0 0 76px !important;}
  /* ---------- ТАБЛИЦИ СЪС ЗАПИСИ → КАРТИ (класът .mtable се слага от mobile.php) ---------- */
  #comunsite .table-scroll-wrapper{max-width:100% !important;overflow:visible !important;}
  #comunsite .table-scroll-inner{overflow:visible !important;}
  table.mtable{display:block !important;width:100% !important;min-width:0 !important;max-width:100% !important;margin:8px 0 !important;border-spacing:0 !important;border:none !important;background:none !important;box-shadow:none !important;}
  table.mtable > thead,table.mtable tr.mt-head{display:none !important;}
  table.mtable > tbody,table.mtable > tfoot{display:block !important;width:100% !important;}
  table.mtable tr{display:block !important;position:relative;width:auto !important;height:auto !important;margin:0 0 10px !important;padding:4px 12px !important;
    background:#fff !important;border:1px solid #e5e7eb !important;border-left:4px solid var(--mt-accent,#e5e7eb) !important;border-radius:14px !important;
    box-shadow:0 1px 3px rgba(15,23,42,.06) !important;transform:none !important;}
  table.mtable td{display:block;position:relative;width:auto !important;min-width:0 !important;max-width:none !important;height:auto !important;
    padding:7px 0 7px 96px !important;margin:0 !important;border:none !important;border-bottom:1px solid #f1f5f9 !important;border-radius:0 !important;background:none !important;box-shadow:none !important;
    text-align:left !important;font-size:13.5px !important;line-height:1.35;word-break:break-word;min-height:30px;}
  table.mtable td:last-child{border-bottom:none !important;}
  table.mtable td::before{content:attr(data-label);position:absolute;left:0;top:8px;width:86px;font-size:10px;font-weight:800;color:#94a3b8;text-transform:uppercase;letter-spacing:0;line-height:1.25;overflow-wrap:break-word;hyphens:auto;}
  table.mtable td[data-label=""]{padding-left:0 !important;}
  table.mtable td[data-label=""]::before{display:none;}
  table.mtable td.mt-empty,table.mtable td.hidden-column{display:none;}
  table.mtable td.hidden-column[style*="table-cell"]{display:block !important;}
  table.mtable td > div,table.mtable td > span,table.mtable td > p{text-align:left !important;}
  table.mtable td img{max-width:100%;height:auto;}
  table.mtable tr.mt-wide td{padding-left:0 !important;}
  table.mtable tr.mt-wide td::before{display:none;}
  /* широки таблици, които не са „карти“ — плъзгат се хоризонтално, вместо да чупят страницата */
  #comunsite table:not(.mtable):not(.menu-table){max-width:100%;}
  /* полета/блокове с фиксирана ширина в % (70%, 50% …) → цяла ширина на телефона */
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:40%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:45%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:50%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:55%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:60%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:65%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:70%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:75%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:80%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:85%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width:90%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 40%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 50%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 60%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 70%"],
  #comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 80%"],#comunsite :is(div,form,textarea,fieldset,section,ul,table)[style*="width: 90%"],
  #comunsite table[width="80%"],#comunsite table[width="70%"],#comunsite table[width="60%"],#comunsite table[width="50%"],#comunsite table[width="90%"]{width:100% !important;}
  /* ---------- ПАЦИЕНТНА КНИГА (списък пациенти) ---------- */
  .patient-card{position:relative;}
  .patient-card--compact{padding:10px 12px !important;}
  .patient-card-main{display:grid !important;grid-template-columns:32px minmax(0,1fr);grid-template-areas:"ani pri" "act act";gap:6px 10px !important;align-items:start !important;}
  .patient-animal{grid-area:ani;padding-top:2px;}
  .patient-primary{grid-area:pri;padding-right:44px;}
  .patient-id-col{position:absolute;top:10px;right:12px;width:auto !important;border:none !important;padding:0 !important;font-size:11px !important;color:#94a3b8 !important;}
  .patient-top-row,.patient-second-row{flex-wrap:wrap;justify-content:flex-start !important;gap:4px 8px !important;}
  .patient-name-row{font-size:15px !important;flex-wrap:wrap;}
  .patient-lastvisit{white-space:normal !important;width:100%;}
  .patient-owner-block{justify-content:flex-start !important;font-size:13px !important;}
  .patient-actions{grid-area:act;display:grid !important;grid-template-columns:repeat(3,1fr);gap:6px !important;margin:4px 0 0 !important;}
  .patient-actions .buttonposesh-style{min-width:0 !important;width:100%;min-height:38px;font-size:13.5px !important;}
  /* ---------- ГРАФИК (седмица → един ден, избира се от бутоните отгоре; виж mobile.php) ---------- */
  .m-days{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 2px 8px;margin:4px 0 2px;-webkit-overflow-scrolling:touch;}
  .m-days::-webkit-scrollbar{display:none;}
  .m-day{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:1px;min-width:52px;padding:6px 8px;margin:0;border-radius:12px;border:1px solid #e2e8f0;background:#fff;color:#334155;
    font:600 11px/1.2 var(--lg-font);cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.04);width:auto;height:auto;}
  .m-day b{font-size:12.5px;font-weight:800;}
  .m-day i{font-style:normal;font-size:10.5px;font-weight:800;border-radius:999px;padding:0 6px;margin-top:2px;}
  .m-day .m-cnt-free{background:#dcfce7;color:#166534;} .m-day .m-cnt-some{background:#fef9c3;color:#854d0e;} .m-day .m-cnt-busy{background:#fee2e2;color:#991b1b;} .m-day .m-cnt-closed{background:#f1f5f9;color:#94a3b8;}
  .m-day.on{background:#0f172a;border-color:#0f172a;color:#fff;box-shadow:0 6px 14px -8px rgba(15,23,42,.6);}
  .sch-grid[data-mday]{width:100% !important;table-layout:fixed;}
  .sch-grid[data-mday] tr > :first-child{width:58px !important;}
  .sch-grid[data-mday] td,.sch-grid[data-mday] th{font-size:13px;}
  .sch-toolbar{flex-wrap:wrap;gap:6px !important;justify-content:center;}
  .sch-grid[data-mday="2"] tr > :not(:first-child):not(:nth-child(2)){display:none !important;}
  .sch-grid[data-mday="3"] tr > :not(:first-child):not(:nth-child(3)){display:none !important;}
  .sch-grid[data-mday="4"] tr > :not(:first-child):not(:nth-child(4)){display:none !important;}
  .sch-grid[data-mday="5"] tr > :not(:first-child):not(:nth-child(5)){display:none !important;}
  .sch-grid[data-mday="6"] tr > :not(:first-child):not(:nth-child(6)){display:none !important;}
  .sch-grid[data-mday="7"] tr > :not(:first-child):not(:nth-child(7)){display:none !important;}
  .sch-grid[data-mday="8"] tr > :not(:first-child):not(:nth-child(8)){display:none !important;}
  /* ---------- ДВЕ КОЛОНИ → ЕДНА ---------- */
  .unpaid-header,.ep2-cards,.ep2-grid-2,.two-col,.lead-wrap,.imp-grid,.turnover-grid,.owp-top{grid-template-columns:minmax(0,1fr) !important;}
  #comunsite [style*="grid-template-columns:1fr 1fr"],#comunsite [style*="grid-template-columns: 1fr 1fr"],
  #comunsite [style*="grid-template-columns:repeat(3"],#comunsite [style*="grid-template-columns: repeat(3"]{grid-template-columns:minmax(0,1fr) !important;}
  .unpaid-wrap{width:100% !important;}
  .unpaid-card .card-head{flex-wrap:wrap;gap:6px;}
  .unpaid-card .card-head .title{font-size:16px !important;}
  .patient-card,.patient-card *{text-align:left;}
  /* ---------- ЦЕНОРАЗПИС (Справки) — компактни редове ---------- */
  #priceTable thead{display:none;}
  #priceTable td:nth-child(3){display:none;}
  #priceTable td{padding:9px 6px !important;font-size:13.5px;}
  #priceTable td:first-child{width:34px;color:#94a3b8;font-size:12px;}
  #priceTable td:last-child{width:92px;white-space:nowrap;}
  /* ---------- ФУТЪР ---------- */
  #footer{flex-direction:column;align-items:flex-start !important;gap:10px;padding:14px 16px !important;border-radius:0 0 16px 16px;}
  #footer > div{text-align:left !important;}
  .pay-tg{position:relative;}
  .pay-tg input{width:1px !important;height:1px !important;min-height:0 !important;}
  /* мини календарът (Запази час / Добави посещение) — дните в равни колони */
  .mini-grid{width:100% !important;table-layout:fixed;}
  .mini-grid .mini-time-h,.mini-grid .mini-time{width:44px !important;}
  /* работният график на екипа (30 дни) — плъзга се хоризонтално, имената остават видими */
  table.staff-grid{display:block !important;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch;}
  table.staff-grid th,table.staff-grid td{min-width:34px;}
  table.staff-grid tr > :first-child{position:sticky;left:0;z-index:2;background:#fff;min-width:96px;box-shadow:1px 0 0 #e5e7eb;}
  /* действия в картите (сума + „Промени“ + „Платено“ …) се пренареждат, вместо да излизат извън картата */
  table.mtable td > div,table.mtable td > form,table.mtable td > span{flex-wrap:wrap;max-width:100%;}
  table.mtable td input[type=text],table.mtable td input[type=number]{max-width:120px;}
  /* карти: скрити колони, животно + стопанин на един ред, сумата винаги отдолу */
  table.mtable td.mt-hide{display:none !important;}
  table.mtable tr.mt-grid{display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px;}
  table.mtable tr.mt-grid > td{grid-column:1 / -1;}
  table.mtable tr.mt-grid > td.mt-half{grid-column:auto;padding-left:0 !important;}
  table.mtable td.mt-half::before{position:static;display:block;width:auto;margin-bottom:3px;}
  table.mtable td.mt-sum,table.mtable td.mt-sum.hidden-column{display:block !important;background:#f8fafc !important;margin:4px -12px -4px !important;padding:9px 12px 9px 108px !important;border-radius:0 0 12px 12px !important;border-top:1px solid #eef2f7 !important;}
  table.mtable td.mt-sum::before{left:12px;top:11px;color:#16a34a;}
  table.mtable tr.mt-grid > td.mt-sum{grid-column:1 / -1;}
  /* Дневник посещения — таблицата както на компютър, плъзга се хоризонтално вътре в рамката */
  html.m-amb #comunsite .table-scroll-wrapper{max-width:100% !important;width:100% !important;overflow:hidden !important;}
  html.m-amb #comunsite .table-scroll-inner{overflow-x:auto !important;overflow-y:hidden !important;-webkit-overflow-scrolling:touch;max-width:100% !important;}
  html.m-amb #comunsite .table-scroll-inner table{max-width:none !important;}
  html.m-amb #comunsite table.amb-m{width:auto !important;min-width:0 !important;}
  table.amb-m > thead > tr > th,table.amb-m > tbody > tr > td{width:auto !important;}
  table.amb-m > * > tr > :nth-child(3),table.amb-m > * > tr > :nth-child(4){width:165px !important;min-width:165px;}
  table.amb-m > * > tr > :nth-child(5){width:95px !important;min-width:95px;}
  table.amb-m > * > tr > :nth-child(6){min-width:110px;}
  table.amb-m td.amb-m-first{width:175px !important;min-width:175px;padding:10px 8px !important;}
  table.amb-m .amb-m-ani{margin-top:8px;padding-top:8px;border-top:1px solid #eef2f7;font-size:13px;font-weight:800;}
  table.amb-m .amb-m-own{margin-top:8px;padding-top:8px;border-top:1px solid #eef2f7;font-size:12px;}
  table.amb-m .amb-m-dia{margin-top:8px;padding-top:6px;border-top:1px dashed #d1fae5;}
  table.amb-m .amb-m-sub{font-weight:600;opacity:.75;margin-top:2px;}
  /* Дневник зоомагазин — като на компютър, по-малко колони, плъзга се в рамката */
  .zoo-m-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;}
  #comunsite table.zoo-m{width:100% !important;min-width:540px !important;max-width:none !important;margin:12px 0 !important;}
  table.zoo-m td.zoo-m-first{width:145px;min-width:145px;}
  table.zoo-m .zoo-m-ani,table.zoo-m .zoo-m-buy{margin-top:7px;padding-top:7px;border-top:1px solid #eef2f7;font-weight:700;}
  table.zoo-m .zoo-m-tel{margin-top:2px;font-size:12px;color:#475569;}
  table.zoo-m .zoo-m-dat{margin-top:2px;font-size:12px;color:#475569;}
  table.zoo-m .zoo-m-cat{display:block;width:fit-content;margin:6px auto 0;padding:1px 8px;border-radius:999px;background:#e0f2fe;color:#0369a1;font-size:11px;font-weight:700;}
  /* клинични данни — по-тясна колона, показва повече редове (до 10), за да запълни височината на реда */
  table.amb-m .amb-m-clin{width:190px !important;min-width:190px;max-width:190px;}
  table.amb-m .amb-m-clin .diag-wrap{-webkit-line-clamp:10;font-size:12.5px;line-height:1.35;}
  table.amb-m .amb-m-clin .diag-wrap.expanded{-webkit-line-clamp:unset;}
  /* Лаборатория — дата·час на един ред, пациент | стопанин (вдясно), широк бутон „Готово“ */
  table.lab-m .lab-m-dt{font-size:13px;font-weight:700;color:#475569;}
  table.mtable td.mt-stack{padding-left:0 !important;}
  table.mtable td.mt-stack::before{position:static;display:block;width:auto;margin-bottom:4px;}
  table.mtable td.mt-half-r,table.mtable td.mt-half-r *{text-align:right !important;}
  table.mtable td.mt-half-r .m-phone{margin-top:2px;font-size:13px;color:#475569;}
  table.lab-m td.lab-m-done{padding:10px 0 6px !important;}
  table.lab-m td.lab-m-done a,table.lab-m td.lab-m-done button{display:block !important;width:100% !important;box-sizing:border-box;text-align:center !important;padding:12px 10px !important;font-size:15px !important;border-radius:10px !important;}
  /* Профил — посещенията */
  table.mtable tr.mt-emptyrow{display:none !important;}
  table.mtable .pv-m-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;font-size:13px;}
  /* горната лента на посещението — зеленикав фон като заглавията на таблицата на компютър */
  table.mtable td:has(> .pv-m-top){background:#e2f5e6 !important;margin:-4px -12px 4px !important;padding:9px 12px !important;border-radius:12px 12px 0 0 !important;border-bottom:1px solid #cfe9d6 !important;}
  table.mtable .pv-m-no{font-weight:800;color:#0f172a;}
  table.mtable .pv-m-no img{width:16px;vertical-align:-3px;}
  table.mtable .pv-m-dt{color:#475569;font-weight:700;}
  table.mtable td.pv-doc,table.mtable td.pv-sum{display:flex !important;align-items:center;gap:8px;border-top:1px solid #eef2f7 !important;border-bottom:none !important;padding-top:10px !important;font-size:13px !important;}
  table.mtable td.pv-sum{justify-content:flex-end;flex-wrap:wrap;}
  table.mtable td.pv-doc .pv-doc-ic{width:22px;height:22px;flex:0 0 auto;}
  /* Телефони / Напомняния — животно | стопанин | телефон на един ред, действията центрирани */
  table.mtable tr.mt-grid3{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:10px;}
  table.mtable tr.mt-grid3 > td{grid-column:1 / -1;}
  table.mtable tr.mt-grid3 > td.mt-third{grid-column:auto;padding-left:0 !important;font-size:13px !important;}
  table.mtable td.mt-third::before{position:static;display:block;width:auto;margin-bottom:3px;}
  table.mtable td.mt-third,table.mtable td.mt-third *{text-align:center !important;}
  table.mtable td.mt-third > *{justify-content:center;}
  table.mtable td.mt-center{padding-left:0 !important;text-align:center !important;display:flex !important;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;}
  table.mtable td.mt-center > *{text-align:center !important;}
  /* Дневник посещения — прозорец с обобщение за деня (от лентата на най-горната карта) */
  table.mtable .m-sum-trigger{cursor:pointer;position:relative;}
  table.mtable .m-sum-ic{margin-left:4px;font-size:14px;padding:2px 7px;border-radius:999px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.12);}
  .m-sum-ov{position:fixed;inset:0;z-index:4000;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:16px;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:mSumIn .18s ease;}
  @keyframes mSumIn{from{opacity:0;}to{opacity:1;}}
  .m-sum-card{width:100%;max-width:380px;max-height:85vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 20px 50px -12px rgba(15,23,42,.45);padding:16px;font-family:var(--lg-font);text-align:left;color:#0f172a;}
  .m-sum-head{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;}
  .m-sum-head b{font-size:17px;}
  .m-sum-head span{font-size:12.5px;color:#64748b;}
  .m-sum-big{display:flex;justify-content:space-between;align-items:baseline;background:#e2f5e6;border-radius:12px;padding:12px 14px;margin-bottom:8px;}
  .m-sum-big span{font-weight:700;color:#166534;}
  .m-sum-big b{font-size:22px;color:#14532d;}
  .m-sum-row{display:flex;justify-content:space-between;gap:10px;padding:9px 4px;border-bottom:1px solid #f1f5f9;font-size:14px;}
  .m-sum-row b{white-space:nowrap;}
  .m-sum-red b,.m-sum-red span{color:#dc2626;}
  .m-sum-sluj span{color:#1d4ed8;font-weight:600;}
  .m-sum-list{display:flex;flex-direction:column;gap:6px;padding:8px 4px;font-size:12.5px;}
  .m-sum-list .sluj-pop-title{display:none;}
  .m-sum-list .sluj-pop-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;padding:6px 8px;border-radius:8px;background:#eff6ff;}
  .m-sum-list .sluj-pop-meta{width:100%;font-size:11px;color:#64748b;}
  .m-sum-list .sluj-pop-foot{font-weight:700;color:#1d4ed8;}
  .m-sum-close{display:block;width:100%;margin-top:12px;padding:11px;border:0;border-radius:12px;background:#0f172a;color:#fff;font-size:15px;font-weight:700;cursor:pointer;}
  table.mtable .zoo-m-cat{display:inline-block;margin-top:6px;padding:1px 8px;border-radius:999px;background:#e0f2fe;color:#0369a1;font-size:11px;font-weight:700;}
  /* зоомагазин — лентата „№ · дата · час“ е синя (както заглавията на таблиците на зоомагазина) */
  table.zoo-card td:has(> .pv-m-top){background:#d5f4fe !important;border-bottom-color:#b3e5f7 !important;}
  /* „Плащане с карта“ в мрежа от полета → на отделен ред, центриран (иначе рамката се реже в тясната колона) */
  #comunsite :is(.grid,.grid-2,.grid-3,.grid-4,.grid-5,.row) > div:has(> label.pay-tg){grid-column:1 / -1 !important;display:flex !important;justify-content:center;width:100% !important;flex:1 1 100% !important;}
  #comunsite label.pay-tg{max-width:100%;flex:0 0 auto;}
  /* Сума + Неплатено — на един ред, компактни; превключвателят за плащане (или изборът) — отдолу, центриран */
  #comunsite :is(.grid-3,.totals-grid):has(#grandTotalField,#grandTotalFieldDisabled,#petTotalField,input[name=totalpetshop]){display:flex !important;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:8px 10px !important;}
  #comunsite :is(.grid-3,.totals-grid):has(#grandTotalField,#grandTotalFieldDisabled,#petTotalField,input[name=totalpetshop]) > div{flex:1 1 110px !important;max-width:165px;width:auto !important;min-width:0;text-align:center;white-space:nowrap;}
  #comunsite :is(.grid-3,.totals-grid):has(#grandTotalField,#grandTotalFieldDisabled,#petTotalField,input[name=totalpetshop]) > div:nth-child(n+3){flex:1 1 100% !important;max-width:none;display:flex !important;justify-content:center;flex-wrap:wrap;gap:8px;}
  #comunsite :is(.grid-3,.totals-grid):has(#grandTotalField,#grandTotalFieldDisabled,#petTotalField,input[name=totalpetshop]) > div input[type=text]{width:calc(100% - 18px) !important;min-width:0;}
  #comunsite .totals-grid:has(#grandTotalField) > div input[type=text]{width:100% !important;}
  #comunsite :is(.grid-3,.totals-grid):has(#grandTotalField,#grandTotalFieldDisabled,#petTotalField,input[name=totalpetshop]) > div select{width:auto !important;max-width:100%;}
  /* addposeshtenie — „Последни 3 посещения“: карти без цветна лента, отначало само последното посещение */
  table.mtable.lastv-m td.lv-m-dt{text-align:center !important;padding:4px 0 8px !important;border-bottom:1px solid #eef2f7 !important;}
  table.mtable.lastv-m td > .lv-m-top{text-align:center !important;font-size:13px;font-weight:700;color:#475569;}
  table.mtable.lastv-m td.pv-sum{color:#15803d;font-weight:800;}
  table.mtable.lastv-m td.pv-sum img{width:20px !important;}
  table.mtable.lastv-m td.lv-m-solo{grid-column:1 / -1 !important;}
  table.mtable.lastv-m:not(.lv-m-open) tr.lv-m-more{display:none !important;}
  .lv-m-btn{display:block;width:100%;margin:8px 0 0;padding:10px 12px;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc;color:#334155;font-weight:700;font-size:13px;cursor:pointer;}
  /* Профил на стопанина — таблиците имат собствени display:table !important → тук ги превръщаме в карти */
  table.mtable.owp-vtable{display:block !important;}
  table.mtable.owp-vtable thead{display:none !important;}
  table.mtable.owp-vtable tbody{display:block !important;}
  table.mtable.owp-vtable tr{display:block !important;background:#fff !important;}
  table.mtable.owp-vtable tr.mt-grid{display:grid !important;}
  table.mtable.owp-vtable td{display:block !important;max-width:none !important;white-space:normal !important;}
  table.mtable.owp-vtable td.mt-hide,table.mtable.owp-vtable td.mt-empty{display:none !important;}
  table.mtable.owp-vtable td.pv-doc,table.mtable.owp-vtable td.pv-sum{display:flex !important;white-space:normal !important;font-size:13px !important;color:#475569;}
  table.mtable.owp-vtable .owp-petlink{white-space:normal;padding:0;background:none;border:none;}
  /* животно — лента с име, пол, # и статус */
  table.mtable.owp-m-pets td:has(> .owp-m-top){background:#eaf1ff !important;margin:-4px -12px 4px !important;padding:9px 12px !important;border-radius:12px 12px 0 0 !important;border-bottom:1px solid #d6e3fb !important;}
  table.mtable.owp-m-pets tr.owp-m-dead td:has(> .owp-m-top){background:#f1f5f9 !important;border-bottom-color:#e2e8f0 !important;}
  table.mtable .owp-m-top{display:flex !important;align-items:center;justify-content:space-between;gap:8px;}
  table.mtable .owp-m-name{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;font-size:15px;}
  table.mtable .owp-m-name .owp-petlink{font-size:15px;}
  table.mtable .owp-m-gen{width:14px !important;}
  table.mtable .owp-m-id{font-size:11px;color:#94a3b8;font-weight:600;}
  table.mtable td.owp-m-alrg{color:#b91c1c !important;font-weight:600;}
  table.mtable td.owp-m-reg{text-align:right !important;font-size:11px !important;color:#94a3b8 !important;min-height:0;padding-top:6px !important;}
  /* посещение — лентата: животното (линк) · дата · час */
  table.mtable.owp-m-visits .pv-m-no a{font-size:14px;}
  table.mtable.owp-m-visits td.pv-sum > div{display:inline;}
  /* мини менюто (LAB, Телефони, Напомняния, Стационар) — на телефона не мига: без пулсиране, преходи и „светване“ при докосване */
  html body .mini-nav-link,html body .menu-with-sub .mini-nav-link,html body .menu-with-sub .mini-nav-link.lab-alert{animation:none !important;transition:none !important;-webkit-tap-highlight-color:transparent;}
  .mini-nav-link::after,.mini-nav-link::before{animation:none !important;content:none !important;display:none !important;}
  .lg-mdrop{transition:none !important;}
  table.mtable.owp-m-debt td:has(> .pv-m-top){background:#fee2e2 !important;border-bottom-color:#fecaca !important;}
  table.mtable td.owp-m-sums{display:flex !important;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:13px !important;}
  table.mtable td.owp-m-sums > *{text-align:left !important;}
  table.mtable td.owp-m-act{text-align:center !important;padding-top:8px !important;}
  table.mtable td.owp-m-act a{display:block;padding:9px 12px;border-radius:10px;background:#fff1f2;border:1px solid #fecaca;color:#b91c1c !important;font-weight:700;text-decoration:none;text-align:center !important;}
  /* финансова справка — двете суми една до друга */
  .owp-card-body:has(> .owp-stat .money-protected){grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  div:has(> div > table.owp-m-debt){margin-bottom:16px !important;}
  /* търсачката в „Всички посещения“ — полето на цял ред, обхват + бутон под него */
  form:has(> input[name=vsearch]){display:grid !important;grid-template-columns:minmax(0,1fr) auto;gap:8px !important;width:100%;}
  form:has(> input[name=vsearch]) > input[name=vsearch]{grid-column:1 / -1;min-width:0 !important;width:100%;box-sizing:border-box;}
  form:has(> input[name=vsearch]) > select{min-width:0;width:100%;}
  /* Неплатени — лента „№ · дата · час“, действията центрирани */
  table.mtable.unp-m td:has(> .pv-m-top){background:#fee2e2 !important;border-bottom-color:#fecaca !important;}
  table.mtable td.unp-m-act::before{text-align:center;}
  table.mtable td.unp-m-act .cell-actions{flex-wrap:wrap !important;justify-content:center !important;row-gap:8px;}
  table.mtable td.unp-m-act .cell-actions form[style*="inline-flex"]{justify-content:center;}
  /* Профил на пациента — данните в картите „животно“ и „стопанин“ центрирани */
  .op-info-card div[style*="text-align:left"],.op-info-card div[style*="text-align: left"]{text-align:center !important;}
  .op-info-card .lb-field-html span{-webkit-box-decoration-break:clone;box-decoration-break:clone;}
  .op-info-card .lb-field-editor{justify-content:center;}
  /* Профил на стопанина — разстояние между картата и статистиките; „Име (ID)“ на един ред */
  .owp-top .owp-header{margin-bottom:14px !important;}
  .owp-header h1 .owp-m-hid{font-size:.7em;font-weight:600;color:#94a3b8;white-space:nowrap;}
  .owp-header .owp-id-line.owp-m-idline{display:none !important;}
  .owp-header h1:has(.owp-m-hid){margin-bottom:10px !important;line-height:1.2;}
  table.mtable .unp-m-row{display:flex !important;align-items:center;justify-content:space-between;gap:10px;}
  table.mtable .unp-m-row .name-link{display:inline-flex;align-items:center;gap:6px;min-width:0;font-weight:700;}
  table.mtable .unp-m-row .unp-m-ic{width:24px;height:24px;flex:0 0 auto;}
  table.mtable .unp-m-own{text-align:right !important;font-size:12.5px;color:#475569;line-height:1.35;flex:0 1 auto;}
  /* Δήμοι — карти: зелена лента с отметка, животно | община, лекар долу; бутонът за списъка закачен горе */
  table.mtable.dim-m{width:auto !important;margin:6px 0 16px !important;box-shadow:none !important;border:none !important;}
  table.mtable.dim-m td{border-left:none !important;border-right:none !important;border-top:none !important;}
  table.mtable.dim-m tr{background:#fff !important;}
  table.mtable.dim-m tr.dim-m-on{box-shadow:0 0 0 2px #22c55e !important;}
  table.mtable .dim-m-top{cursor:pointer;-webkit-user-select:none;user-select:none;}
  table.mtable .dim-m-top input.dimos-cb{width:20px;height:20px;margin:0 4px 0 0;accent-color:#16a34a;flex:0 0 auto;}
  table.mtable td.dim-m-pet{font-size:14px !important;font-weight:700;text-align:left !important;}
  table.mtable td.dim-m-pet img{width:24px !important;vertical-align:-6px;margin-right:4px;}
  table.mtable td.dim-m-own{font-size:13px !important;}
  table.mtable.dim-m td.dim-m-doc{display:flex !important;align-items:center;gap:8px;border-top:1px solid #eef2f7 !important;padding-top:10px !important;font-size:13px !important;color:#475569;}
  table.mtable.dim-m td.dim-m-done{padding:10px 0 6px !important;border-bottom:none !important;}
  table.mtable.dim-m td.dim-m-done button{display:block !important;width:100% !important;box-sizing:border-box;margin:0 !important;text-align:center !important;padding:12px 10px !important;font-size:15px !important;font-weight:700;border-radius:10px !important;}
  .dim-m-bar{position:fixed;left:14px;right:auto;bottom:calc(12px + env(safe-area-inset-bottom));z-index:60;width:calc(100vw - 28px) !important;min-width:0 !important;max-width:calc(100vw - 28px) !important;box-sizing:border-box;margin:0 !important;}
  body:has(.upn) .dim-m-bar{bottom:calc(56px + env(safe-area-inset-bottom));}
  form:has(> .dim-m-bar){padding-bottom:70px;}
  .dim-m-bar button[name=mark_lista]{width:100% !important;box-sizing:border-box;padding:11px 12px !important;font-size:15px !important;box-shadow:0 6px 16px -8px rgba(20,83,45,.45);}
  .dim-m-bar .dim-m-n{display:inline-block;min-width:22px;margin-left:6px;padding:1px 7px;border-radius:999px;background:#16a34a;color:#fff;font-size:13px;}
  .dim-m-all{display:flex;align-items:center;gap:8px;margin:4px 2px 8px;font-size:14px;font-weight:700;color:#14532d;cursor:pointer;}
  .dim-m-all input{width:20px;height:20px;accent-color:#16a34a;}
  .dim-m-all span{color:#64748b;font-weight:600;}
  /* „пръст“ — без hover ефекти, които залепват след докосване */
  .menu-with-sub .menu-table td:hover .menu-button::before{transform:none !important;}
}

/* =====================================================================
   НАСТОЛНА ВЕРСИЯ (над 760px) — допълнения
   ===================================================================== */
@media (min-width:761px){
  /* менюто на клиниката (Нов пациент, Книга … График) — ~40% по-високо от първоначалното */
  html body .menu-with-sub .menu-table td .menu-button{padding-top:19px !important;padding-bottom:19px !important;}
  /* бутоните на зоомагазина — много лек светлосин фон (прозрачен, за да се вижда и капката под избрания) */
  html body #comunsite td#menutabig span{background:rgba(224,242,254,.55) !important;box-shadow:inset 0 0 0 1px rgba(186,230,253,.45);}
  html body #comunsite td#menutabig:hover span{background:rgba(224,242,254,.85) !important;}
  html body #comunsite td#menutabig + td#menutabig::before{opacity:0;}
  html body #comunsite tr:has(> td#menutabig){gap:6px;}
  /* гръцката: цялото меню — една идея по-нагоре */
  html body .menu-wrapper.menu-with-sub{margin-top:-8px !important;}
}

/* LAB / Телефони / Напомняния / Стационар — по-меко „дишане“ вместо рязко пулсиране:
   бавно (4 с), тънък и бледен пръстен, който едва се разширява */
.mini-nav-link.lab-alert::after,.mini-nav-link.rem-alert::after,.mini-nav-link.nos-alert::after{
  box-shadow:0 0 0 1.5px var(--lg-pulse,rgba(220,38,38,.28)) !important;animation:lgBreath 4s ease-in-out infinite !important;}
.mini-nav-link.rem-alert::after{--lg-pulse:rgba(37,99,235,.26);}
.mini-nav-link.nos-alert::after{--lg-pulse:rgba(249,115,22,.30);animation-duration:4.4s !important;}
@keyframes lgBreath{0%,100%{transform:scale(1);opacity:0;}50%{transform:scale(1.05,1.18);opacity:.75;}}

/* openprofile — „Епикриза“: дискретно хапче над иконката на парите (основният вид е в самия бутон — style='…') */
a.ep-open{transition:background .2s,border-color .2s,color .2s;}
a.ep-open:hover{background:#fff !important;border-color:rgba(77,124,98,.45) !important;color:#166534 !important;}

/* To do (горе, до Υπενθυμίσεις) — същото меко „дишане“, в жълто */
.mini-nav-link.td-alert{position:relative;}
.mini-nav-link.td-alert::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:0 0 0 1.5px rgba(234,179,8,.55);opacity:0;animation:lgBreath 4s ease-in-out infinite;}
@media (max-width:760px){ .mini-nav-link.td-alert::after{content:none !important;animation:none !important;} }
