.ts-virtual-page { padding-top: 6px; }

.ts-page-head {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 26px 28px;
    margin: 0 0 20px;
    text-align: center;
}
.ts-page-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px;
    text-align: center;
    letter-spacing: 0.2px;
}
.ts-page-subtitle {
    color: #aaaaaa;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
    text-align: center;
}
.ts-page-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}
.ts-page-note__label {
    display: block;
    color: #4a9fd4;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 6px;
    text-align: center;
}
.ts-page-head__back {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
}
.ts-page-head__back .ts-btn {
    max-width: 100%;
}


.ts-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2c2c2c;
    border: none;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 0 20px;
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ts-notice a { color: #4a9fd4; text-decoration: none; font-weight: 600; }
.ts-notice a:hover { color: #7bb8e0; }
.ts-notice.ts-success { background: #2c2c2c; }
.ts-notice.ts-error   { background: #2c2c2c; }


.ts-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    animation: ts-overlay-in 0.25s ease-out both;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.ts-notice-overlay.ts-notice--hiding {
    animation: ts-overlay-out 0.25s ease-in forwards;
    pointer-events: none;
}

html.ts-notice-locked,
body.ts-notice-locked {
    overflow: hidden !important;
}
body.ts-notice-locked {
    position: fixed;
    top: var(--ts-scroll-lock-top, 0);
    left: 0;
    right: 0;
    width: 100%;
}

.ts-notice--modal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;

    width: 100%;
    max-width: 400px;

    background: #2c2c2c;
    border: none;
    border-radius: 14px;
    padding: 26px 24px;
    margin: 0;

    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.55;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);

    animation: ts-modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ts-notice-overlay.ts-notice--hiding .ts-notice--modal {
    animation: ts-modal-out 0.25s ease-in forwards;
}

.ts-notice--modal .ts-notice__title {
    margin: 0;
    text-align: center;
    color: #ffffff;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.ts-notice--modal .ts-notice__text {
    text-align: center;
    font-size: 1rem;
    line-height: 1.55;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ts-notice--modal .ts-notice__ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 6px;
    background: #0073aa;
    border: 1px solid #0073aa;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    user-select: none;
}
.ts-notice--modal .ts-notice__ok:hover {
    background: #005177;
    border-color: #005177;
}
.ts-notice--modal .ts-notice__ok:active {
    transform: translateY(1px);
}

@keyframes ts-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ts-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes ts-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes ts-modal-out {
    from { opacity: 1; transform: translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateY(10px) scale(0.96); }
}


.ts-login-wrap,
.ts-register-wrap,
.ts-dashboard,
.ts-my-tickets,
.ts-notifications-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 40px;
}
.ts-dashboard,
.ts-my-tickets { max-width: 900px; }
.ts-notifications-wrap { max-width: 720px; }


.ts-card {
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
}
.ts-card-body {
    padding: 28px 22px;
    text-align: center;
}


.ts-notifications-wrap .ts-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.ts-notifications-wrap .ts-card-body {
    background: #2a2a2a;
    border-radius: 12px;
}


.ts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 0 24px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
    white-space: nowrap;
    user-select: none;
}
.ts-btn:active { transform: translateY(1px); }

.ts-btn > svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
    display: block;
}

.ts-btn-primary { background: #0073aa; border: 1px solid #0073aa; color: #fff; }
.ts-btn-primary:hover { background: #005177; border-color: #005177; color: #fff; }
.ts-btn-secondary { background: transparent; border: 2px solid #555555; color: #e0e0e0; }
.ts-btn-secondary:hover { background: #333333; border-color: #777777; color: #e0e0e0; }
.ts-btn-danger { background: transparent; border: 2px solid #d63638; color: #ff8a8c; }
.ts-btn-danger:hover { background: rgba(214, 54, 56, 0.12); border-color: #e05a5c; color: #ff8a8c; }
.ts-btn-warn { background: transparent; border: 2px solid #f0c33c; color: #f0c33c; }
.ts-btn-warn:hover { background: rgba(240, 195, 60, 0.12); border-color: #f5d05c; color: #f0c33c; }


.ts-tg-login {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 28px 26px;
    text-align: center;
}
.ts-btn-tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 0 28px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    user-select: none;
    color: #fff;
    background: #229ED9;
    border: 1px solid #229ED9;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}
.ts-btn-tg:hover:not(:disabled) { background: #1b7fb0; border-color: #1b7fb0; }
.ts-btn-tg:active:not(:disabled) { transform: translateY(1px); }
.ts-btn-tg:disabled { opacity: 0.7; cursor: wait; }
.ts-tg-icon { flex-shrink: 0; display: block; }
.ts-tg-note { margin: 18px 0 0; color: #aaaaaa; font-size: 0.9rem; line-height: 1.55; text-align: center; }
.ts-tg-note b { color: #e0e0e0; font-weight: 600; }

.ts-tg-status {
    display: none;
    margin: 24px auto 0;
    padding: 0;
    background: transparent;
    border: none;
    width: 100%;
    text-align: center;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.ts-tg-status.is-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.ts-tg-status.is-loading::before {
    content: "";
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #3a3a3a;
    border-top-color: #aaaaaa;
    animation: ts-spin 0.75s linear infinite;
}

.ts-tg-status.is-loading::after {
    content: "Загрузка...";
    display: block;
    color: #aaaaaa;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
}

@keyframes ts-spin {
    to { transform: rotate(360deg); }
}



.ts-profile-panel {
    background: #2a2a2a;
    border-radius: 12px;
    margin: 0 0 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: ts-fade-up 0.4s ease-out both;
    animation-delay: 0.1s;
}

.ts-profile-panel__header {
    padding: 24px 26px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ts-profile-panel__top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ts-profile-panel__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #555555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a3a3a;
    box-sizing: border-box;
}

.ts-profile-panel__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.ts-profile-panel__avatar-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    line-height: 1;
}

.ts-profile-panel__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ts-profile-panel__label {
    color: #aaaaaa;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    line-height: 1.3;
}

.ts-profile-panel__name {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    word-wrap: break-word;
}

.ts-profile-panel__bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    color: #aaaaaa;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.ts-profile-panel__bell:hover {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}
.ts-profile-panel__bell--has-unread {
    color: #4a9fd4;
    border-color: rgba(0, 115, 170, 0.55);
    background: rgba(0, 115, 170, 0.12);
}

.ts-profile-panel__bell--has-unread:hover {
    color: #4a9fd4;
    border-color: rgba(0, 115, 170, 0.55);
    background: rgba(0, 115, 170, 0.12);
}
.ts-profile-panel__bell svg {
    display: block;
}
.ts-profile-panel__bell--has-unread svg {
    animation: ts-bell-ring 2.5s ease-in-out infinite;
    transform-origin: 50% 10%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}
.ts-profile-panel__bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #0073aa;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px #2a2a2a;
}

.ts-profile-panel__desc {
    margin: 0;
    color: #aaaaaa;
    font-size: 0.95rem;
    line-height: 1.65;
}

.ts-profile-panel__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 0 24px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    box-sizing: border-box;
}
.ts-profile-panel__toggle:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}
.ts-profile-panel__toggle:active {
    transform: translateY(1px);
}
.ts-profile-panel__toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
    transition: transform 0.3s ease;
}
.ts-profile-panel.is-open .ts-profile-panel__toggle svg {
    transform: rotate(180deg);
}

.ts-profile-panel__drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ts-profile-panel.is-open .ts-profile-panel__drawer {
    max-height: 600px;
}

.ts-profile-panel__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 26px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, color 0.2s;
}
.ts-profile-panel__item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #4a9fd4;
}
.ts-profile-panel__item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
}

.ts-profile-panel__buttons {
    padding: 20px 26px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ts-profile-panel__buttons .ts-btn {
    width: 100%;
    min-height: 52px;
    font-size: 0.95rem;
}

@media (max-width: 700px) {
    .ts-profile-panel__header {
        padding: 20px 20px 18px;
        gap: 14px;
    }
    .ts-profile-panel__item { padding: 14px 20px; }
    .ts-profile-panel__buttons {
        padding: 16px 20px 20px;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ts-profile-panel__toggle {
        padding: 0 20px;
        font-size: 0.92rem;
    }
    .ts-profile-panel__name {
        font-size: 1.05rem;
    }
}


.ts-user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #2a2a2a;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 20;
}
.ts-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    color: #aaaaaa;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
    margin-right: auto;
}
.ts-bell:hover {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}
.ts-bell--has-unread {
    color: #4a9fd4;
    border-color: rgba(0, 115, 170, 0.55);
    background: rgba(0, 115, 170, 0.12);
}

.ts-bell--has-unread:hover {
    color: #4a9fd4;
    border-color: rgba(0, 115, 170, 0.55);
    background: rgba(0, 115, 170, 0.12);
}
.ts-bell--has-unread svg {
    animation: ts-bell-ring 2.5s ease-in-out infinite;
    transform-origin: 50% 10%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}
@keyframes ts-bell-ring {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
    50% { transform: rotate(4deg); }
}
.ts-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #0073aa;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px #2a2a2a;
}


.ts-user-menu {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}
.ts-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: transparent;
    border: 2px solid #555555;
    border-radius: 4px;
    color: #e0e0e0;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    max-width: 100%;
    box-sizing: border-box;
}
.ts-user-trigger:hover,
.ts-user-menu.is-open .ts-user-trigger {
    background: #333333;
    border-color: #777777;
    color: #e0e0e0;
}
.ts-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a3a3a;
    box-sizing: border-box;
}
.ts-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.ts-user-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    user-select: none;
}
.ts-user-name {
    color: #aaaaaa;
    font-weight: 500;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    min-width: 0;
}
.ts-user-chevron {
    width: 16px;
    height: 16px;
    color: #aaaaaa;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.ts-user-menu.is-open .ts-user-chevron { transform: rotate(180deg); }

.ts-user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 3px;
    min-width: 200px;
    max-width: 260px;
    background: #2a2a2a;
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.6);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
}
.ts-user-menu.is-open .ts-user-dropdown {
    display: flex;
    animation: ts-dropdown-in 0.15s ease-out;
}
@keyframes ts-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ts-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.ts-user-dropdown-item:hover {
    background: #3a3a3a;
    color: #4a9fd4;
}
.ts-user-dropdown-item svg {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
}


.ts-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0 0 20px;
}
.ts-actions .ts-btn { min-height: 56px; font-size: 1rem; }


.ts-form { display: flex; flex-direction: column; gap: 18px; }
.ts-register-form {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 26px 28px;
}
.ts-field { display: flex; flex-direction: column; gap: 8px; }
.ts-field > span { font-size: 0.95rem; color: #e0e0e0; font-weight: 600; }
.ts-field input[type="text"] {
    background: #1e1e1e;
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 6px;
    padding: 12px 14px;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.ts-field input::placeholder { color: #777; }
.ts-field input:focus { border-color: #0073aa; box-shadow: 0 0 0 2px rgba(0,115,170,0.2); }

.ts-modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}
.ts-modal-buttons .ts-btn { width: 100%; }

.ts-new-ticket-back {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}
.ts-new-ticket-back .ts-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0 24px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    user-select: none;
    background: transparent;
    border: 2px solid #555555;
    color: #e0e0e0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ts-new-ticket-back .ts-btn-secondary:hover { background: #333333; border-color: #777777; color: #e0e0e0; }


.ts-empty { color: #aaaaaa; text-align: center; margin: 0 0 18px; }



.ts-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ts-ticket-item {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, background 0.2s;
}
.ts-ticket-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: #2e2e2e;
}

.ts-ticket-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ts-ticket-label {
    color: #aaaaaa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ts-ticket-value {
    color: #e0e0e0;
    word-wrap: break-word;
    word-break: break-word;
}

.ts-ticket-actions {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ts-reason-btn {
    width: auto !important;
    display: inline-flex !important;
    min-height: 48px;
    padding: 0 22px;
    font-size: 0.92rem;
}
.ts-reason-btn > svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
    display: block;
}


.ts-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ts-status-pending     { background: rgba(240,195,60,0.12); border-color: rgba(240,195,60,0.4); color: #f0c33c; }
.ts-status-in_progress { background: rgba(0,115,170,0.15);  border-color: rgba(0,115,170,0.5);  color: #4a9fd4; }
.ts-status-approved    { background: rgba(70,180,80,0.12);  border-color: rgba(70,180,80,0.4);  color: #6fd07a; }
.ts-status-rejected    { background: rgba(214,54,56,0.12);  border-color: rgba(214,54,56,0.4);  color: #f08080; }



.ts-notif-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    margin: 0;
}

.ts-notif-item {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0;
    transition: border-color 0.2s, background 0.2s;
}
.ts-notif-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: #2e2e2e;
}
.ts-notif-item:last-child { margin-bottom: 0; }


.ts-notif-item--new {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0;
}
.ts-notif-item--new:last-child {
    margin-bottom: 0;
}

.ts-notif-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.ts-notif-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}
.ts-notif-new {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(0, 115, 170, 0.18);
    border: 1px solid rgba(0, 115, 170, 0.55);
    color: #4a9fd4;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ts-notif-date {
    color: #888888;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.ts-notif-content {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
}
.ts-notif-content p { margin: 0 0 0.8em; }
.ts-notif-content p:last-child { margin-bottom: 0; }
.ts-notif-content a { color: #4a9fd4; text-decoration: none; }
.ts-notif-content a:hover { color: #7bb8e0; text-decoration: none; }


.ts-back-float {
    position: fixed;
    left: 50%;
    top: 90px;
    z-index: 4000;

    width: auto;
    min-width: 260px;
    max-width: calc(100% - 24px);
    height: 52px;
    min-height: 52px;
    padding: 0 24px;
    font-size: 0.95rem;
    border-radius: 30px;

    background: #2a2a2a;
    border: 2px solid #555555;
    color: #e0e0e0;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);

    transform: translateX(-50%) translateY(-90px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s,
                opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.ts-back-float:hover {
    background: #333333;
    border-color: #777777;
    color: #e0e0e0;
}
.ts-back-float.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@keyframes ts-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ts-page-head,
.ts-tg-login,
.ts-register-form,
.ts-user-bar,
.ts-card,
.ts-actions {
    animation: ts-fade-up 0.4s ease-out both;
}

.ts-page-head     { animation-delay: 0.1s; }
.ts-tg-login,
.ts-register-form { animation-delay: 0.15s; }
.ts-user-bar      { animation-delay: 0.1s; }
.ts-actions       { animation-delay: 0.2s; }
.ts-card          { animation-delay: 0.15s; }


.ts-ticket-item { animation: ts-fade-up 0.4s ease-out both; }
.ts-ticket-item:nth-child(1) { animation-delay: 0.20s; }
.ts-ticket-item:nth-child(2) { animation-delay: 0.26s; }
.ts-ticket-item:nth-child(3) { animation-delay: 0.32s; }
.ts-ticket-item:nth-child(4) { animation-delay: 0.38s; }
.ts-ticket-item:nth-child(5) { animation-delay: 0.44s; }
.ts-ticket-item:nth-child(6) { animation-delay: 0.50s; }
.ts-ticket-item:nth-child(7) { animation-delay: 0.56s; }
.ts-ticket-item:nth-child(8) { animation-delay: 0.62s; }
.ts-ticket-item:nth-child(n+9) { animation-delay: 0.68s; }

.ts-notif-item { animation: ts-fade-up 0.35s ease-out both; }
.ts-notif-item:nth-child(1) { animation-delay: 0.05s; }
.ts-notif-item:nth-child(2) { animation-delay: 0.10s; }
.ts-notif-item:nth-child(3) { animation-delay: 0.15s; }
.ts-notif-item:nth-child(4) { animation-delay: 0.20s; }
.ts-notif-item:nth-child(5) { animation-delay: 0.25s; }

.ts-modal-window { animation: ts-fade-up 0.25s ease-out; }

@media (prefers-reduced-motion: reduce) {
    .ts-page-head,
    .ts-tg-login,
    .ts-register-form,
    .ts-user-bar,
    .ts-card,
    .ts-actions,
    .ts-notif-item,
    .ts-ticket-item,
    .ts-modal-window {
        animation: none;
    }
}

@media (max-width: 800px) {
    .ts-actions,
    .ts-modal-buttons { grid-template-columns: 1fr; }
    .ts-btn { width: 100%; }
    .ts-reason-btn { width: auto !important; }

    .ts-virtual-page { padding-top: 18px; }

    .ts-page-head {
        padding: 22px;
        margin: 0 0 16px;
    }
    .ts-page-title { font-size: 1.4rem; }
    .ts-page-subtitle { font-size: 0.9rem; }
    .ts-page-note { font-size: 0.85rem; margin-top: 16px; padding-top: 14px; }
    .ts-page-head__back { margin-top: 22px; padding-top: 16px; }

    .ts-tg-login { padding: 22px 20px; }
    .ts-btn-tg { min-height: 52px; font-size: 0.95rem; }

    .ts-bell { width: 40px; height: 40px; }
    .ts-bell svg { width: 20px; height: 20px; }

    .ts-user-avatar { width: 34px; height: 34px; }
    .ts-user-name   { font-size: 0.9rem; max-width: 140px; }

    .ts-notif-title { font-size: 1.05rem; }
    .ts-notif-list  { gap: 12px; padding: 0; }
    .ts-notif-item  { padding: 16px 18px; }
    .ts-notif-item--new { padding: 16px 18px; }

    .ts-card-body { padding: 22px 18px; }

    .ts-back-float {
        top: 78px;
        min-width: 0;
        width: calc(100% - 24px);
        max-width: 360px;
        height: 50px;
        min-height: 50px;
        font-size: 0.92rem;
    }

    .ts-ticket-item { padding: 18px 20px; }
}

@media (max-width: 600px) {
    .ts-virtual-page { padding-top: 16px; }

    .ts-register-form { padding: 20px 18px; }
    .ts-page-head { padding: 20px 18px; border-radius: 10px; }
    .ts-page-title { font-size: 1.25rem; }
    .ts-page-subtitle { font-size: 0.85rem; }
    .ts-page-note { font-size: 0.82rem; }

    .ts-notice-overlay { padding: 14px; }
    .ts-notice--modal { padding: 22px 20px; }
    .ts-notice--modal .ts-notice__ok { min-height: 48px; }

    .ts-ticket-item { padding: 16px 18px; gap: 8px; }
    .ts-ticket-row { font-size: 0.92rem; }
    .ts-ticket-label { font-size: 0.75rem; }

    .ts-notif-list { gap: 12px; padding: 0; }
    .ts-notif-item { padding: 14px 16px; }
    .ts-notif-item--new { padding: 14px 16px; }
    .ts-notif-title { font-size: 1rem; }
}

@media (max-width: 480px) {
    .ts-virtual-page { padding-top: 14px; }

    .ts-page-head { padding: 18px 16px; margin: 0 0 14px; }
    .ts-page-title { font-size: 1.15rem; }
    .ts-page-subtitle { font-size: 0.82rem; }
    .ts-page-note { font-size: 0.8rem; margin-top: 14px; padding-top: 12px; }
    .ts-page-head__back { margin-top: 20px; padding-top: 14px; }

    .ts-user-name { max-width: 110px; }

    .ts-back-float { top: 74px; }
}