*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #9b135f;
    --primary-bright: #ff0b7b;
    --primary-light: #fdf0f7;
    --primary-bg: #f8e5f1;
    --text: #222;
    --text-light: #666;
    --text-muted: #999;
    --bg: #f3f0ed;
    --card: #ffffff;
    --border: #efefef;
    --border-light: #f1eef4;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    --radius: 24px;
    --radius-sm: 16px;
    --radius-xs: 12px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

body {
    font-family: "Noto Sans Georgian" !important;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}



h1 {
    font-size: 23px;
}


h5 {
    font-size: 17px;
}




.results-table.pdf-style tbody tr:nth-child(even) {
    background: #fdf5f9;
}

.results-table.pdf-style tbody tr:nth-child(odd) {
    background: #fff;
}

.results-table.pdf-style tbody tr:hover {
    background: #f8e5f1;
}







/* ========================================
   TERMS AND CONDITIONS - Modal Box

   ======================================== */

.checkbox-row{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.checkbox-row input{
  cursor:pointer;
}

/* MODAL */
.terms-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
}
.terms-modal.active{
  display:block;
}

.terms-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
}

.terms-box{
  position:relative;
  z-index:2;
  width:90%;
  max-width:70%;
  margin:10vh auto;
  background:#fff;
  border-radius:14px;
  padding:20px;
  box-shadow:0 20px 50px rgba(0,0,0,.2);
}

.terms-close{
  position:absolute;
  top:10px;
  right:12px;
  font-size:26px;
  border:none;
  background:none;
  cursor:pointer;
}

 

.terms-accept{
  margin-top:15px;
      font-family: "Noto Sans Georgian";
  width:100%;
  padding:12px;
  border:none;
  border-radius:10px;
  background:#8f1d57;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

.terms-accept:hover {
 background: #ea008a;
}

.terms-content {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}


/* ========================================
   TEST RESULTS — Mobile Cards
   ======================================== */

.test-card {
    background: #fff;
    border: 1px solid #f0eef4;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.test-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.test-card-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    word-break: break-word;
}

.test-card-status {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.test-card-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    font-size: 13px;
}

.test-card-date {
    display: flex;
    gap: 6px;
}

.test-card-label {
    color: #888;
    flex-shrink: 0;
}

.test-card-actions {
    display: flex;
    gap: 8px;
}

.test-card-actions .btn-outline,
.test-card-actions .btn-normal {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}



/* ========================================
   LAYOUT
   ======================================== */

.page-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
    padding-top: calc(24px + var(--safe-top));
    padding-bottom: calc(24px + var(--safe-bottom));
}

.main-full {
    grid-column: 1 / -1;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    display: flex;
}

.profile-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-wrapper {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 4px solid #d3197b;
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-label {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-name {
    font-weight: 600;
    font-size: 15px;
    /* word-break: break-word; */
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.nav-link {
    font-size: 15px;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 0;
}

.nav-link:hover {
    color: var(--primary-bright);
}

.nav-link.active {
    font-weight: 600;
    color: var(--primary-bright);
}

.nav-link.disabled {
    color: #d3cfd6;
    cursor: default;
}

.primary-btn-link {
    text-decoration: none;
}

.primary-btn {
    margin-top: auto;
    padding: 14px 20px;
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    width: 100%;
    font-family: "Noto Sans Georgian", sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(155, 19, 95, 0.28);
    background: var(--primary-bright);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.logout-btn {
    border: none;
    background: transparent;
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    -webkit-tap-highlight-color: transparent;
}

.logout-icon {
    font-size: 16px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.main-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.main-card-center {
    align-items: center;
}

.main-header {
    display: block;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.top-header a {
    color: #fff;
}

.main-header-center {
    justify-content: center;
}

.main-header-center-inner {
    text-align: center;
}

.main-title {
    font-size: 20px;
    font-weight: 600;
}

.main-subtitle {
    font-size: 14px;
    color: #777;
    margin-top: 4px;
}

.dropdown-btn {
    border-radius: 999px;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    background: var(--primary-bg);
    color: #8c0050;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.chevron {
    font-size: 12px;
}

/* ========================================
   HOME COLORED CARDS
   ======================================== */

.home-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-card {
    border-radius: var(--radius);
    padding: 18px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-card-green {
    background: #18863a;
}

.home-card-blue {
    background: #2267f2;
}

.home-card-icon {
    font-size: 24px;
}

.home-card-date {
    font-size: 24px;
    font-weight: 700;
}

.home-card-text {
    font-size: 15px;
}

.home-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.home-card-list {
    list-style: disc;
    padding-left: 18px;
    font-size: 14px;
    margin-top: 4px;
}

.home-card-arrow {
    position: absolute;
    right: 18px;
    bottom: 16px;
    font-size: 18px;
}

/* ========================================
   CHARTS
   ======================================== */

.charts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chart-card {
    background: #fafafa;
    border-radius: 20px;
    padding: 18px 20px 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03);
}

.chart-card-bright {
    background: var(--primary-bright);
    color: #fff;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
}

.chart-title.light {
    color: #fff;
}

.dots-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
}

.dots-btn.light {
    color: #fff;
}

.chart-body {
    position: relative;
    width: 100%;
    height: 220px;
}

.chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-footer {
    margin-top: 6px;
}

.axis-labels {
    list-style: none;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #777;
}

.axis-labels.light li {
    color: #ffe2f2;
}

/* ========================================
   TABLES
   ======================================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.results-table thead {
    background: #faf5fb;
}

.results-table th,
.results-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}

.results-table th {
    font-weight: 600;
    color: #555;
}

.results-table tbody tr:hover {
    background: #fdf7ff;
}

.results-table.pdf-style th {
    background: #9c1d4f;
    color: #fff;
    padding: 10px;
    text-align: left;
}

.results-table.pdf-style td {
    padding: 10px;
    vertical-align: middle;
}

.results-table .latin {
    font-size: 12px;
    opacity: .6;
    margin-top: 2px;
}

.results-table .mini-state {
    font-size: 12px;
    opacity: .7;
    margin-top: 4px;
}

.result-value {
    font-weight: 700;
}

.comment-row td {
    background: #faf5f7;
    border-top: 0;
    font-size: 13px;
    line-height: 1.5;
    padding-top: 0;
 
}


.text-right {
    text-align: right;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-outline {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--primary-bright);
    background: #fff;
    color: var(--primary-bright);
    font-size: 13px;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
    font-family: "Noto Sans Georgian", sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-outline.btn-slim {
    padding: 8px 10px;
    white-space: nowrap;
}

.btn-normal {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease, background .12s ease;
    font-family: "Noto Sans Georgian", sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: inline-block;
}

.btn-normal:hover {
    background: var(--primary-bright);
    transform: translateY(-2px);
    opacity: .9;
    border: 1px solid var(--primary-bright);
}

/* ========================================
   TILES
   ======================================== */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.tile-card {
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.tile-card:active {
    transform: scale(0.97);
}

.tile-card-dark {
    background: #92175f;
}

.tile-card-bright {
    background: var(--primary-bright);
}

/* ========================================
   INFO CARD
   ======================================== */

.info-card {
    padding: 8px 4px 4px;
    font-size: 14px;
}

.info-title {
    font-size: 22px;
    font-weight: 700;
    color: #92175f;
    margin-bottom: 16px;
}

.info-card p {
    margin-bottom: 10px;
}

.info-card ul {
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 6px;
}

.align-right {
    margin-left: auto;
    margin-top: 18px;
}

/* ========================================
   FORMS
   ======================================== */

.form-card {
    max-width: 520px;
}

.form-card-center {
    margin: 0 auto;
    width: 100%;
}

.form-card-small {
    max-width: 420px;
}

.form-card-narrow {
    max-width: 420px;
}

.form-row {
    margin-bottom: 14px;
}

.form-row-inline {
    display: grid;
    grid-template-columns: minmax(0, 2fr) auto;
    gap: 8px;
}

.form-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #e2dce7;
    padding: 13px 18px;
    font-size: 15px;
    outline: none;
    background: #fbf9fd;
    font-family: "Noto Sans Georgian", sans-serif;
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: #d3197b;
    background: #fff;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.checkbox-row a {
    color: #d3197b;
}

.form-submit {
    margin-top: 10px;
}

.auth-helper {
    margin-top: 16px;
    font-size: 13px;
    text-align: center;
}

.auth-helper a {
    color: #d3197b;
}

/* ========================================
   ORDER HEADER
   ======================================== */

.order-header-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.order-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-title {
    font-size: 20px;
    font-weight: 700;
}

.order-status {
    background: #e11d48;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.order-header-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.order-block {
    background: #fafafa;
    border-radius: var(--radius-xs);
    padding: 12px 14px;
}

.order-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.order-value {
    font-size: 14px;
    font-weight: 600;
}

.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    font-size: 14px;
}

.order-comment {
    margin-top: 12px;
    opacity: .85;
    font-size: 14px;
}

/* ========================================
   MSG
   ======================================== */

#msg {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 15px;
    color: #f81111 !important;
    font-weight: 700;
}

/* ========================================
   FOOTER
   ======================================== */

.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 12px 16px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-left {
    font-size: 13px;
    color: var(--text-light);
}

.footer-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: transform .12s ease, opacity .12s ease;
    -webkit-tap-highlight-color: transparent;
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: .9;
}

.social-btn i {
    line-height: 1;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.mobile-menu-btn {
      display: none;
    position: static;
    z-index: 1;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   OTP VERIFICATION PAGE
   ======================================== */

.otp-page {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 32px;
}

.otp-icon-wrapper {
    margin-bottom: 16px;
}

.otp-phone-display {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    direction: ltr;
}

.otp-input-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 8px 0 24px;
}

.otp-digit {
    width: 60px;
    height: 68px;
    border: 2px solid #e2dce7;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    font-family: "Noto Sans Georgian", monospace;
    outline: none;
    background: #fbf9fd;
    color: var(--text);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    caret-color: var(--primary-bright);
    -webkit-appearance: none;
}

.otp-digit:focus {
    border-color: var(--primary-bright);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(211, 25, 123, 0.1);
}

.otp-verify-btn {
    margin-top: 0;
    font-size: 16px;
    padding: 16px 24px;
}

.otp-msg {
    text-align: center;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-xs);
    font-weight: 600;
    animation: otpMsgIn 0.3s ease;
}

.otp-msg-error {
    background: #fef2f2;
    color: #dc2626;
}

.otp-msg-success {
    background: #f0fdf4;
    color: #16a34a;
}

@keyframes otpMsgIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.otp-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.otp-resend-link {
    border: none;
    background: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Noto Sans Georgian", sans-serif;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}

.otp-resend-link:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.otp-timer {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.otp-back-link {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.otp-back-link:hover {
    color: var(--text);
}

/* ========================================
   RESPONSIVE HELPERS
   ======================================== */

.desktop-only { display: block; }
.mobile-only  { display: none; }

/* ========================================
   MOBILE PARAMETER CARDS
   ======================================== */

.param-card {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.param-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.param-title span {
    font-weight: 400;
    opacity: .6;
    margin-left: 6px;
}

.param-row {
    font-size: 14px;
    margin-bottom: 4px;
}

.param-date {
    margin-top: 6px;
    font-size: 12px;
    opacity: .6;
    text-align: right;
}


.footer-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-menu a {
    color: #999 !important;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: #d1007d !important;
}


/* ========================================
   RESPONSIVE — Tablet (≤ 1024px)
   ======================================== */

@media (max-width: 1024px) {
    .page-wrapper {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .main-card {
        padding: 20px 18px 22px;
    }

    .tile-card {
        padding: 30px 18px;
    }

    .terms-box {
        max-width: 90%;
    }
}

/* ========================================
   RESPONSIVE — Mobile (≤ 768px)
   ======================================== */

@media (max-width: 768px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        padding: 12px;
        padding-top: calc(12px + var(--safe-top));
        padding-bottom: calc(12px + var(--safe-bottom));
        gap: 12px;
    }

    /* Sidebar as overlay drawer */
   .mobile-menu-btn {
        display: block;
    }

    .top-logo {
       /* flex: 1;*/

        text-align: center;
    }

    .top-logo img {
        max-width: 130px;
    }

    .top-title {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        width: 300px;
        max-width: 85vw;
        background: var(--card);
        z-index: 1100;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 40px rgba(0, 0, 0, .15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: var(--safe-top);
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    /* When sidebar is a drawer, restore full profile */
    .sidebar .profile-card {
        flex-direction: column;
        border-radius: 0;
        min-height: 100%;
    }

    .sidebar .divider,
    .sidebar .sidebar-nav,
    .sidebar .logout-btn {
        display: flex;
    }

    .sidebar .sidebar-nav {
        flex-direction: column;
    }

    /* Main content adjustments */
    .main {
        order: 1;
        padding-left: 0 !important;
    }

    .main-card {
        padding: 18px 16px 20px;
        border-radius: 20px;
        gap: 18px;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-title {
        font-size: 18px;
    }

    .main-subtitle {
        font-size: 13px;
    }

    .dropdown-btn {
        align-self: stretch;
        justify-content: space-between;
    }

    /* Tiles single column */
    .tile-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tile-card {
        padding: 28px 20px;
        font-size: 17px;
    }

    /* Forms fill width */
    .form-card,
    .form-card-narrow,
    .form-card-center {
        max-width: 100%;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 16px; /* prevents iOS zoom */
    }

    /* Home grid stack */
    .home-top-grid {
        grid-template-columns: 1fr;
    }

    /* Order */
    .order-header-grid {
        grid-template-columns: 1fr;
    }

    .order-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Table scroll hint */
    .table-wrapper {
        position: relative;
    }

    .table-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .table-wrapper.has-scroll::after {
        opacity: 1;
    }

    .results-table th,
    .results-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .terms-box {
        max-width: 90%;
    }

    /* Responsive helpers */
    .desktop-only { display: none; }
    .mobile-only  { display: block; }

    /* Param cards on mobile */
    .param-card {
        border: 1px solid rgba(0, 0, 0, .08);
        border-radius: 14px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .param-title {
        font-weight: 800;
        margin-bottom: 6px;
    }

    .param-title span {
        font-weight: 500;
        opacity: .6;
        margin-left: 6px;
    }

    .param-sub {
        font-size: 12px;
        opacity: .6;
        margin-bottom: 8px;
    }

    .param-big {
        font-size: 20px;
        font-weight: 800;
        margin: 10px 0;
    }

    .param-big span {
        font-size: 14px;
        font-weight: 600;
        opacity: .7;
    }

    .param-row {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .param-comment {
        margin-top: 10px;
        font-size: 13px;
        opacity: .85;
        line-height: 1.35;
    }

    /* Footer stack on narrow */
    .page-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 12px 8px 0;
    }

    /* OTP page mobile */
    .otp-page {
        padding: 28px 20px;
        max-width: 100%;
    }

    .otp-digit {
        width: 56px;
        height: 62px;
        font-size: 26px;
        border-radius: 14px;
    }

    .otp-input-wrapper {
        gap: 10px;
    }
}

/* ========================================
   RESPONSIVE — Small phones (≤ 480px)
   ======================================== */

@media (max-width: 480px) {
    .page-wrapper {
        padding: 8px;
        gap: 8px;
    }





    .main-card {
        padding: 16px 14px 18px;
        border-radius: 18px;
    }

    .chart-body {
        height: 180px;
    }

    .tile-card {
        font-size: 16px;
        padding: 22px 14px;
        border-radius: 18px;
    }

    .profile-card {
        padding: 16px;
        border-radius: 18px;
    }

    .avatar-wrapper {
        width: 56px;
        height: 56px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 15px;
    }

    .profile-label {
        font-size: 12px;
    }

    /* OTP smaller on very small screens */
    .otp-digit {
        width: 50px;
        height: 56px;
        font-size: 24px;
        border-radius: 12px;
    }

    .otp-input-wrapper {
        gap: 8px;
    }

    .otp-page .main-title {
        font-size: 18px;
    }

    .otp-verify-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Form inputs bigger touch targets */
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }

    .primary-btn {
        padding: 14px 20px;
        font-size: 16px;
    }

    .btn-outline,
    .btn-normal {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Footer */
    .footer-left {
        font-size: 12px;
    }

    .social-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

/* ========================================
   RESPONSIVE — Very small (≤ 360px)
   ======================================== */

@media (max-width: 360px) {
    .otp-digit {
        width: 44px;
        height: 50px;
        font-size: 22px;
    }

    .otp-input-wrapper {
        gap: 6px;
    }

    .home-card-date {
        font-size: 20px;
    }

    .home-card-title {
        font-size: 16px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-card {
    animation: fadeIn 0.4s ease;
}

/* ========================================
   TOP BAR — Responsive header
   ======================================== */

.top-bar {
    margin: 24px 24px 0 24px;
    border-radius: var(--radius);
    background: #95225F;
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #fff;
    flex-wrap: wrap;
}

.top-header a {
    color: #fff;
}

.top-logo img {
    display: block;
    max-width: 180px;
    height: auto;
}

.top-title {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.top-phone i {
    font-size: 13px;
}

.lang-switch {
    display: flex;
    gap: 6px;
}

.lang-switch .btn-outline.btn-slim {
     color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    padding: 6px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.lang-switch .btn-outline.btn-slim.active {
   background: rgb(255 255 255);
    border-color: #fff;
    color: var(--primary);
}


.page-footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-menu {
        gap: 12px;
    }
    .footer-menu a {
        font-size: 12px;
    }

    

/* Top bar mobile */
@media (max-width: 768px) {
    .top-bar {
        margin: 8px 8px 0 8px;
        padding: 14px 16px;
        border-radius: 18px;
    }

h1 {
   font-size: 15px;
        text-align: center;
}

        .top-header {
        gap: 10px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-content: center;
        align-items: center;
        /* justify-content: space-evenly; */
    }

    .top-logo img {
        max-width: 130px;
    }

    .top-title {
        display: none;
    }

    .top-phone-text {
        display: none;
    }

    .top-phone i {
        font-size: 18px;
    }

    .top-right {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        margin: 4px 4px 0 4px;
        padding: 12px 12px;
        border-radius: 16px;
    }

    .top-logo img {
        max-width: 110px;
    }
}



/* ===== ABNORMAL INDICATOR (abnormal_indicator field) ===== */

.abn-legend{
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
    font-size: 15px;
    color: var(--text-sub);
    justify-content: center;
}
.abn-legend-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.ind{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:6px;
  font-size:13px;
  font-weight:700;
  line-height:1;
}
.ind-up{ color:#ef4444; }
.ind-down{ color:#2563eb; }
.ind-ast{ color:#0ea5e9; }

.val-high{ color:#ef4444; font-weight:700; }
.val-low{ color:#2563eb; font-weight:700; }
.val-ast{ color:#0ea5e9; font-weight:700; }

/* ===== ტექსტური (არა-რიცხვითი) პასუხები: value_text / value_text_geo ===== */

.result-text{
  font-weight:600;
  text-transform:none;
}


 