/* ============================================================================
   QR Ticketing Service — спільні стилі оболонки (шапка, футер, сітка, картки).
   Раніше лежали інлайном у templates/base.html.

   Порядок каскаду збережено: <link> стоїть рівно там, де був <style>, тож
   правила з окремих сторінок і далі перекривають ці, як і раніше.

   Секції нижче — у тому ж порядку, що й у файлі:
     :root / скидання      — токени кольорів, типографіки, тіней
     Типографіка           — заголовки, абзаци
     Шапка                 — .header, .logo, .nav, .user-nav, бургер
     Сповіщення            — дзвінок і випадний список
     Контент               — .container, .main, .card, сітки
     Кнопки і форми        — .btn, .form-*, таблиці
     Футер                 — .footer
     Адаптив (<=768px)     — один медіа-запит на всю оболонку
   ============================================================================ */

:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Тло за межами сторінки малює <html>, а не body. Якщо його не задати, браузер
   бере тло з body, тобто біле — і коли iOS «відтягує» сторінку за нижній край
   (rubber band) або ховає свою панель, під чорним футером видно білу смугу.
   Футер і шапка чорні, тож чорне полотно лягає під них непомітно з обох боків.
   Це доповнює min-height:100dvh нижче: dvh тримає футер унизу, а це прибирає
   просвіт у ті моменти, коли висота вікна змінюється. */
html {
    background-color: var(--color-black);
}

body {
    font-family: var(--font-family);
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.5;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-black);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

/* Header */
.header {
    background: var(--color-black);
    color: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--color-white);
    color: var(--color-black);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: var(--color-white);
    color: var(--color-black);
}

/* Бургер: на десктопі його немає взагалі, вмикається лише в медіа-запиті нижче. */
.nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Три смужки одним елементом — середня це сам span, крайні псевдоелементи. */
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: '';
    position: absolute;
}

.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after  { transform: translateY(6px); }

/* Відкрите меню — смужки складаються в хрестик. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: rotate(-45deg); }

.nav-toggle-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

/* User navigation */
.user-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-bell-wrap {
    position: relative;
}
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--color-white);
    text-decoration: none;
}
.notification-bell:hover, .notification-bell.open {
    background: rgba(255,255,255,0.15);
}
.notification-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 380px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 200;
    overflow: hidden;
    color: #171717;
}
.notif-dropdown.open { display: block; }
.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
    transform: rotate(45deg);
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}
.notif-header-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #171717;
}
.notif-read-all {
    font-size: 0.75rem;
    color: #3b82f6;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.notif-read-all:hover { text-decoration: underline; }
.notif-list {
    max-height: 400px;
    overflow-y: auto;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover { background: #fafafa; }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}
.notif-body { flex: 1; min-width: 0; }
.notif-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #404040;
    margin-bottom: 0.2rem;
}
.notif-ticket {
    font-size: 0.8125rem;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time {
    font-size: 0.7rem;
    color: #a3a3a3;
    margin-top: 0.15rem;
}
.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #a3a3a3;
    font-size: 0.875rem;
}
.notif-footer {
    padding: 0.625rem 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.notif-footer a {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
}
.notif-footer a:hover { text-decoration: underline; }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.user-name {
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.25;
}

.btn-primary {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.btn-primary:hover {
    background: var(--color-gray-800);
    border-color: var(--color-gray-800);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-gray-300);
}

.btn-secondary:hover {
    background: var(--color-gray-50);
    border-color: var(--color-gray-400);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-black);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 100vh на iOS рахується разом зі схованою панеллю браузера, тож футер
   опинявся нижче видимої області й «відклеювався». dvh рахує реальну
   висоту; на десктопі dvh дорівнює vh, тож там нічого не змінюється. */
@supports (min-height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

.main {
    flex: 1;
    padding: 3rem 0;
}

/* Cards */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-bottom: 1px solid var(--color-gray-200);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-black);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-gray-900);
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--color-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 6rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* QR Code Display */
.qr-display {
    background: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.qr-image {
    max-width: 300px;
    margin: 0 auto 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}

.qr-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Messages/Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #f0f9f0;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
}

.table th {
    font-weight: 600;
    color: var(--color-gray-900);
    background: var(--color-gray-50);
}

.table tr:hover {
    background: var(--color-gray-50);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-new { background: var(--color-gray-100); color: var(--color-gray-800); }
.badge-open { background: #dbeafe; color: #1d4ed8; }
.badge-in-progress { background: #fef3c7; color: #d97706; }
.badge-resolved { background: #dcfce7; color: #166534; }
.badge-closed { background: var(--color-gray-200); color: var(--color-gray-600); }

/* Footer */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 2rem 0;
    border-top: 1px solid var(--color-gray-200);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--color-gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Шапка на вузькому екрані: логотип окремим рядком, навігація під ним.
       height:4rem була фіксованою — перенесені пункти вилазили за межі
       контейнера й обрізались. */
    .header-container {
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 4rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    /* «Viyar Ticketing» не має ламатись на два рядки */
    .logo span {
        white-space: nowrap;
    }

    /* Шапка прибита до верху через fixed, а не sticky.

       ЧЕСНО ПРО ПРИЧИНУ: симптом («шапка відклеюється при скролі») знято
       з реального iPhone, але відтворити його не вдалось — у Safari на
       macOS sticky тримається і з backdrop-filter (заміряно: top=0 після
       скролу). Тобто поведінка iOS-специфічна: найімовірніше інерційний
       скрол або динамічна панель браузера, чого настільний Safari не має.
       fixed у цьому сценарії передбачуваніший, тому лишаємо його.

       Блюр вимкнено з двох причин: на суцільно чорному фоні він і так
       невидимий, а backdrop-filter створює containing block, через що
       position:fixed усередині шапки рахувався б від неї, а не від екрана. */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* fixed виходить із потоку — компенсуємо висотою шапки, інакше вміст
       ховається під нею. box-sizing:border-box, тож зайвого скролу немає. */
    body {
        padding-top: 4rem;
    }

    /* Шапка — один рядок: логотип і бургер. Усе інше згортається, інакше
       навігація з'їдає три рядки й пів екрана. */
    .header-container {
        flex-wrap: nowrap;
        position: relative;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav {
        display: none;
    }

    /* Розгорнуте меню — панель під шапкою на всю ширину. */
    .nav.is-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 60;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.5rem 1rem 1rem;
        background: var(--color-black);
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    }

    .nav.is-open .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.9375rem;
        /* У стовпчику текст читається зліва, а не по центру. */
        justify-content: flex-start;
    }

    /* Блок користувача — окремою групою внизу панелі. */
    .nav.is-open .user-nav {
        margin: 0.5rem 0 0;
        padding: 0.75rem 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    /* У панелі місця вистачає — імʼя показуємо. */
    .nav.is-open .user-name {
        display: inline;
    }

    /* Дропдаун сповіщень: 380px, прибиті до дзвінка через right:-8px, на
       телефоні йшли за лівий край. Тому кріпимо до вікна і даємо власний скрол.

       top і max-height ЗАДАЄ JS (placeDropdownBelowBell) від позиції дзвінка:
       у бургер-меню кнопка стоїть унизу панелі, тож будь-яке стале значення
       відкривало б список угору, поверх меню. Значення нижче — лише запасні,
       якщо скрипт не відпрацював. */
    .notif-dropdown {
        position: fixed;
        top: 4.25rem;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-name {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* iOS Safari примусово зумить сторінку при фокусі, якщо шрифт поля < 16px.
       Ставимо 16px усім полям — інакше кожен тап у форму «стрибає». */
    input,
    textarea,
    select {
        font-size: 16px;
    }

    /* Зони натискання: 44px — мінімум, нижче якого палець систематично промахується. */
    .nav-link,
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .notification-bell {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-gray-300);
    border-radius: 50%;
    border-top-color: var(--color-black);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
    


/* ---------------------------------------------------------------------------
   Поп-ап оцінки виконання заявки. Кольори шкали — як у макеті: 0–6 червоні,
   7–8 жовті, 9–10 зелені. Ті самі три пороги використовує підсвітка оцінки
   в картці заявки та в аналітиці, щоб цифра всюди читалась однаково.
   --------------------------------------------------------------------------- */
.rating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rating-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.rating-header {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.rating-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.rating-subtitle {
    font-size: 0.8125rem;
    color: #737373;
    margin: 0.25rem 0 0;
}

.rating-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #737373;
    cursor: pointer;
}

.rating-body {
    padding: 1.5rem;
}

.rating-question + .rating-question {
    margin-top: 2rem;
}

.rating-question-text {
    font-size: 0.9375rem;
    margin-bottom: 0.875rem;
}

.rating-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rating-dot {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s, transform 0.15s;
}

.rating-dot:hover {
    opacity: 0.8;
}

.rating-dot.is-selected {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.rating-dot.score-0,
.rating-dot.score-1,
.rating-dot.score-2,
.rating-dot.score-3,
.rating-dot.score-4,
.rating-dot.score-5,
.rating-dot.score-6 {
    background: #f0655b;
}

.rating-dot.score-7,
.rating-dot.score-8 {
    background: #f5c344;
}

.rating-dot.score-9,
.rating-dot.score-10 {
    background: #3fc4a5;
}

.rating-error {
    margin-top: 1.25rem;
    color: #dc2626;
    font-size: 0.875rem;
}

.rating-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.rating-submit {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.625rem 2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
}

.rating-submit:hover {
    background: #2563eb;
}

/* Показ уже виставленої оцінки — у картці заявки та в списку */
.ticket-score {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    cursor: help;
}

.ticket-score.score-low {
    background: #f0655b;
}

.ticket-score.score-mid {
    background: #f5c344;
}

.ticket-score.score-high {
    background: #3fc4a5;
}

.ticket-score-empty {
    color: #9ca3af;
    font-size: 0.8125rem;
}

@media (max-width: 480px) {
    .rating-dot {
        width: 2.125rem;
        height: 2.125rem;
        font-size: 0.8125rem;
    }
}
