/* =====================================================================
   Tutor User Manager – Frontend CSS (ua)
   Форма входу + особистий кабінет
   ===================================================================== */

.tum-login-box *,
.tum-cabinet * {
    box-sizing: border-box;
}

/* =========================================================
   ФОРМА ВХОДУ
========================================================= */

.tum-login-box {
    max-width: 440px;
    margin: 0px auto;
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.10);
    padding: 44px 40px 36px;
}

.tum-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.tum-login-logo h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
}

/* Вже залогінений */
.tum-already-logged {
    text-align: center;
}

.tum-login-avatar {
    margin-bottom: 14px;
}

.tum-login-avatar img {
    border-radius: 50%;
    width: 64px !important;
    height: 64px !important;
}

.tum-login-greeting {
    font-size: 16px;
    color: #50575e;
    margin: 0 0 22px;
    line-height: 1.5;
}

/* Повідомлення про помилку */
.tum-login-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 22px;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Поля форми ── */

.tum-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tum-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tum-field-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A;
}

.tum-input-wrap {
    position: relative;
}

.tum-input-wrap input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    color: #1A1A1A;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}

.tum-input-wrap input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,.12);
}

.tum-input-wrap input.tum-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

/* Поле пароля з кнопкою показу */
.tum-pass-wrap input {
    padding-right: 48px;
}

.tum-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.tum-toggle-pass:hover {
    color: #007bff; 
}

.tum-field-hint {
font-size: 12px;
  margin: 0;
  text-align: center;
  color: #363535;
  font-weight: bold;
}

/* ── Кнопки ── */

.tum-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}

.tum-btn:active {
    transform: scale(.98);
}

.tum-btn-primary {
    background: #88b550;
    color: #fff !important;
   
    width: 100%;
}

.tum-btn-primary:hover {
    background: #2c2c2c;
  
    color: #fff !important;
}

.tum-btn-ghost {
    background: transparent;
    color: #50575e !important;
    border-color: #d1d5db;
    width: 100%;
    margin-top: 10px;
}

.tum-btn-ghost:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1A1A1A !important;
}

.tum-btn-submit {
    margin-top: 4px;
}

.tum-btn-micro {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    width: auto;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #374151 !important;
    margin-left: 8px;
    transition: background .15s, border-color .15s;
}

.tum-btn-micro:hover {
    background: #007bff;
    border-color: #007bff;
    color: #fff !important;
}

.tum-logout-link {
    font-size: 14px;
    padding: 10px 20px;
}

.tum-login-help {
    text-align: center;
    margin: 20px 0 0;
    font-size: 13px;
    color: #9ca3af;
}

.tum-login-help a {
   color: #b01a15;
    text-decoration: none;
}

/* =========================================================
   НАВІГАЦІЙНЕ МЕНЮ — пункти від плагіну
   Стилі наслідуються від теми (.main-menu),
   тут тільки специфічні перевизначення
========================================================= */

/* Кабінет — жодних додаткових іконок, просто текст */
.tum-menu-cabinet > a.tum-nav-cabinet,
.tum-menu-login > a.tum-nav-login {
    /* наслідує стилі .main-menu > li > a з теми */
}

/* Виділення активного пункту кабінету */
.tum-menu-cabinet > a.tum-nav-cabinet {
    color: #007bff;
}

/* =========================================================
   ОСОБИСТИЙ КАБІНЕТ — DASHBOARD
   Сучасний, адаптивний, крос-браузерний дашборд студента.
========================================================= */

.tum-dash,
.tum-dash * {
    box-sizing: border-box;
}

.tum-dash {
    --tum-bg: #f4f6f8;
    --tum-surface: #ffffff;
    --tum-border: #e7e9ee;
    --tum-text: #171a21;
    --tum-text-muted: #6b7280;
    --tum-text-faint: #9ca3af;
    --tum-primary: #88b550;
    --tum-primary-dark: #6f9a3c;
    --tum-primary-soft: #eef6e4;
    --tum-blue: #2563eb;
    --tum-blue-soft: #eef3ff;
    --tum-amber: #d97706;
    --tum-amber-soft: #fff8ec;
    --tum-purple: #7c3aed;
    --tum-purple-soft: #f4eefd;
    --tum-red: #dc2626;
    --tum-radius-lg: 20px;
    --tum-radius-md: 14px;
    --tum-radius-sm: 9px;
    --tum-shadow: 0 2px 18px rgba(17, 24, 39, .06);
    --tum-shadow-hover: 0 10px 30px rgba(17, 24, 39, .10);
    --tum-sidebar-w: 264px;
    --tum-transition: .18s cubic-bezier(.4, 0, .2, 1);

    position: relative;
    display: grid;
    grid-template-columns: var(--tum-sidebar-w) 1fr;
    gap: 24px;
    max-width: 1240px;
    margin: 32px auto 60px;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--tum-text);
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------
   Мобільна верхня панель (прихована на десктопі)
--------------------------------------------------------- */

.tum-dash-topbar {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-md);
    box-shadow: var(--tum-shadow);
    padding: 12px 16px;
}

.tum-dash-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tum-dash-topbar-avatar img {
    display: block;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
}

.tum-dash-topbar-name {
    font-weight: 700;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tum-dash-menu-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--tum-radius-sm);
    border: 1px solid var(--tum-border);
    background: var(--tum-bg);
    color: var(--tum-text);
    cursor: pointer;
    transition: background var(--tum-transition), color var(--tum-transition);
}

.tum-dash-menu-toggle:hover {
    background: var(--tum-primary-soft);
    color: var(--tum-primary-dark);
}

.tum-dash-overlay {
    display: none;
}

/* ---------------------------------------------------------
   Бокова панель
--------------------------------------------------------- */

.tum-dash-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-lg);
    box-shadow: var(--tum-shadow);
    padding: 26px 18px 18px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.tum-dash-profile {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--tum-border);
}

.tum-dash-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.tum-dash-avatar img {
    display: block;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50%;
    border: 3px solid var(--tum-primary-soft);
}

.tum-dash-profile-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.tum-dash-profile-login {
    margin: 0;
}

.tum-dash-profile-login code {
    background: var(--tum-bg);
    color: var(--tum-text-muted);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.tum-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tum-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: none;
    background: transparent;
    border-radius: var(--tum-radius-sm);
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    color: var(--tum-text-muted);
    cursor: pointer;
    text-align: left;
    transition: background var(--tum-transition), color var(--tum-transition);
}

.tum-nav-icon {
    flex-shrink: 0;
    opacity: .75;
}

.tum-nav-item span:not(.tum-nav-badge) {
    flex: 1;
}

.tum-nav-item:hover {
    background: var(--tum-bg);
    color: var(--tum-text);
}

.tum-nav-item.is-active {
    background: var(--tum-primary-soft);
    color: var(--tum-primary-dark);
}

.tum-nav-item.is-active .tum-nav-icon {
    opacity: 1;
}

.tum-nav-badge {
    background: var(--tum-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.4;
}

.tum-dash-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: var(--tum-radius-sm);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tum-red) !important;
    text-decoration: none !important;
    transition: background var(--tum-transition);
}

.tum-dash-logout:hover {
    background: #fef2f2;
}

/* ---------------------------------------------------------
   Основний контент
--------------------------------------------------------- */

.tum-dash-main {
    min-width: 0;
}

.tum-tab-panel {
    display: none;
    animation: tumFadeIn .25s ease;
}

.tum-tab-panel.is-active {
    display: block;
}

@keyframes tumFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tum-dash-welcome {
    margin-bottom: 22px;
}

.tum-dash-welcome h1 {
    margin: 0 0 4px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.tum-dash-welcome p {
    margin: 0;
    color: var(--tum-text-muted);
    font-size: 14.5px;
    text-transform: capitalize;
}

.tum-dash-section-head {
    margin-bottom: 20px;
}

.tum-dash-section-head h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.tum-dash-section-head p {
    margin: 0;
    color: var(--tum-text-muted);
    font-size: 14px;
}

/* ---- Банер терміну доступу ---- */

.tum-cab-expiry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    border-radius: var(--tum-radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    flex-wrap: wrap;
    line-height: 1.6;
}

.tum-expiry-ok       { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }
.tum-expiry-soon     { background: #fffbeb; border: 1.5px solid #fde68a; color: #92400e; }
.tum-expiry-critical { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }
.tum-expiry-expired  { background: #fef2f2; border: 1.5px solid #f87171; color: #991b1b; }

.tum-cab-expiry .tum-btn-ghost {
    margin-top: 0;
    margin-left: auto;
    width: auto;
    font-size: 13px;
    padding: 8px 14px;
}

/* ---- Статистичні картки ---- */

.tum-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.tum-stat-card {
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-md);
    box-shadow: var(--tum-shadow);
    padding: 20px;
    transition: box-shadow var(--tum-transition), transform var(--tum-transition);
}

.tum-stat-card:hover {
    box-shadow: var(--tum-shadow-hover);
    transform: translateY(-2px);
}

.tum-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    margin-bottom: 14px;
}

.tum-stat-icon-blue   { background: var(--tum-blue-soft);   color: var(--tum-blue); }
.tum-stat-icon-green  { background: var(--tum-primary-soft); color: var(--tum-primary-dark); }
.tum-stat-icon-amber  { background: var(--tum-amber-soft);  color: var(--tum-amber); }
.tum-stat-icon-purple { background: var(--tum-purple-soft); color: var(--tum-purple); }

.tum-stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.tum-stat-label {
    margin-top: 4px;
    font-size: 13px;
    color: var(--tum-text-muted);
    font-weight: 600;
}

/* ---- Сітка "огляду" (2 колонки) ---- */

.tum-overview-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 18px;
    align-items: start;
}

.tum-panel-card,
.tum-cab-card {
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-lg);
    box-shadow: var(--tum-shadow);
    padding: 24px;
}

.tum-cab-card-title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--tum-text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tum-border);
}

/* ---- DL у картці ---- */

.tum-cab-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 12px;
    margin: 0;
    font-size: 14px;
}

.tum-cab-dl dt {
    color: var(--tum-text-faint);
    font-weight: 600;
    align-self: center;
}

.tum-cab-dl dd {
    margin: 0;
    color: var(--tum-text);
    align-self: center;
    word-break: break-word;
}

.tum-cab-dl code {
    background: var(--tum-bg);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 13px;
}

.tum-pass-dots,
.tum-pass-value {
    font-size: 14px;
    vertical-align: middle;
}

/* ---- Категорії ---- */

.tum-cab-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tum-cat-pill {
    display: inline-block;
    background: var(--tum-blue-soft);
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
}

.tum-empty,
.tum-empty-state {
    color: var(--tum-text-faint);
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

/* ---- Прогрес-бар ---- */

.tum-progress-track {
    display: block;
    width: 100%;
    height: 8px;
    background: var(--tum-bg);
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 6px;
}

.tum-progress-fill {
    display: block;
    height: 100%;
    min-width: 3px;
    background: linear-gradient(90deg, var(--tum-primary), var(--tum-primary-dark));
    border-radius: 999px;
    transition: width .6s ease;
}

/* ---- Продовжити навчання ---- */

.tum-continue-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tum-continue-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--tum-radius-md);
    text-decoration: none !important;
    color: inherit;
    transition: background var(--tum-transition);
}

.tum-continue-item:hover {
    background: var(--tum-bg);
}

.tum-continue-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: var(--tum-primary-soft);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tum-continue-thumb-fallback {
    font-size: 20px;
    font-weight: 800;
    color: var(--tum-primary-dark);
    text-transform: uppercase;
}

.tum-continue-body {
    flex: 1;
    min-width: 0;
}

.tum-continue-title {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--tum-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.tum-continue-pct {
    font-size: 12px;
    color: var(--tum-text-muted);
    font-weight: 600;
}

.tum-continue-arrow {
    flex-shrink: 0;
    color: var(--tum-text-faint);
    transition: transform var(--tum-transition);
}

.tum-continue-item:hover .tum-continue-arrow {
    transform: translateX(3px);
    color: var(--tum-primary-dark);
}

/* ---- Найближче заняття ---- */

.tum-next-lesson {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tum-next-lesson-date {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border-radius: var(--tum-radius-sm);
    background: var(--tum-primary-soft);
    color: var(--tum-primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.tum-next-lesson-day {
    font-size: 20px;
    font-weight: 800;
}

.tum-next-lesson-month {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.tum-next-lesson-info p {
    margin: 0 0 3px;
    font-size: 13.5px;
}

.tum-next-lesson-group {
    font-weight: 700;
    color: var(--tum-text);
}

.tum-next-lesson-time {
    display: inline-block;
    background: var(--tum-blue-soft);
    color: #1d4ed8;
    border-radius: 6px;
    padding: 2px 9px;
    font-weight: 600;
    font-size: 12.5px !important;
}

.tum-next-lesson-addr {
    color: var(--tum-text-muted);
}

/* ---- Сітка курсів ---- */

.tum-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.tum-course-card {
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-lg);
    box-shadow: var(--tum-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--tum-transition), transform var(--tum-transition);
}

.tum-course-card:hover {
    box-shadow: var(--tum-shadow-hover);
    transform: translateY(-3px);
}

.tum-course-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--tum-primary-soft);
    background-size: cover;
    background-position: center;
    text-decoration: none !important;
}

.tum-course-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: var(--tum-primary-dark);
    text-transform: uppercase;
}

.tum-course-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tum-course-badge-completed  { background: rgba(22, 101, 52, .88); }
.tum-course-badge-inprogress { background: rgba(217, 119, 6, .88); }
.tum-course-badge-notstarted { background: rgba(107, 114, 128, .88); }

.tum-course-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tum-course-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tum-course-title a {
    color: var(--tum-text);
    text-decoration: none !important;
}

.tum-course-title a:hover {
    color: var(--tum-primary-dark);
}

.tum-course-meta {
    margin: 0;
    font-size: 12.5px;
    color: var(--tum-text-muted);
}

.tum-course-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}

.tum-course-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--tum-primary-dark);
}

.tum-btn-course {
    margin-left: 0 !important;
}

/* ---- Розклад: таймлайн ---- */

.tum-schedule-timeline {
    display: flex;
    flex-direction: column;
}

.tum-schedule-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.tum-schedule-row::before {
    content: "";
    position: absolute;
    left: 30px;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--tum-border);
    z-index: 0;
}

.tum-schedule-row:first-child::before { top: 50%; }
.tum-schedule-row:last-child::before  { bottom: 50%; }

.tum-schedule-date {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    line-height: 1.15;
}

.tum-schedule-day {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--tum-text);
}

.tum-schedule-month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tum-text-faint);
}

.tum-schedule-dot {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tum-primary);
    border: 3px solid var(--tum-primary-soft);
}

.tum-schedule-row.tum-past .tum-schedule-dot {
    background: var(--tum-text-faint);
    border-color: var(--tum-bg);
}

.tum-schedule-row.tum-today .tum-schedule-dot {
    background: var(--tum-red);
    border-color: #fee2e2;
}

.tum-schedule-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13.5px;
}

.tum-schedule-weekday {
    font-weight: 700;
    color: var(--tum-text);
    text-transform: capitalize;
}

.tum-schedule-row.tum-past {
    opacity: .5;
}

.tum-schedule-row.tum-today .tum-schedule-weekday {
    color: var(--tum-red);
}

.tum-cab-time-slot {
    display: inline-block;
    background: var(--tum-blue-soft);
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
}

/* ---- Панель-картки, що йдуть по 2 в рядок ---- */

.tum-panel-card + .tum-panel-card {
    margin-top: 18px;
}

/* ---- Заглушка (не залогінений) ---- */

.tum-cabinet-gate {
    text-align: center;
    padding: 60px 20px;
    color: var(--tum-text-muted, #6b7280);
}

.tum-cabinet-gate p {
    font-size: 16px;
    margin-bottom: 18px;
}

.tum-cabinet-gate .tum-btn {
    display: inline-flex;
    width: auto;
}

/* =========================================================
   АДАПТИВ ДАШБОРДУ
========================================================= */

@media (max-width: 1080px) {
    .tum-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .tum-overview-grid { grid-template-columns: 1fr; }
    .tum-account-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .tum-dash {
        grid-template-columns: 1fr;
        margin-top: 16px;
    }

    .tum-dash-topbar {
        display: flex;
    }

    .tum-dash-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        max-height: none;
        width: min(300px, 84vw);
        border-radius: 0;
        z-index: 1001;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }

    .tum-dash-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,.18);
    }

    .tum-dash-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 18, 23, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 1000;
    }

    .tum-dash-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .tum-dash { padding: 0 14px; }
    .tum-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tum-stat-card { padding: 16px; }
    .tum-stat-value { font-size: 22px; }
    .tum-panel-card, .tum-cab-card { padding: 18px; }
    .tum-cab-dl { grid-template-columns: 1fr; }
    .tum-cab-dl dt { margin-top: 6px; }
    .tum-cab-expiry { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tum-cab-expiry .tum-btn-ghost { margin-left: 0; width: 100%; }
    .tum-courses-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tum-dash-welcome h1 { font-size: 21px; }
}

@media (max-width: 420px) {
    .tum-courses-grid { grid-template-columns: 1fr; }
    .tum-next-lesson { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   ДАНІ АКАУНТА У "ОГЛЯД" — компактний блок на всю ширину
   Рядок 1 (3 кол.): дата реєстрації / логін / пароль
   Рядок 2 (2 кол.): телефон / Telegram
   Рядок 3: категорії навчання в один рядок
========================================================= */

.tum-panel-card.tum-account-card {
    margin-bottom: 22px;
}

.tum-account-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tum-account-card-title svg {
    color: var(--tum-primary-dark);
    flex-shrink: 0;
}

.tum-account-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.tum-account-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tum-account-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tum-account-grid-2.tum-account-grid-1 {
    grid-template-columns: 1fr;
}

.tum-account-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    background: var(--tum-bg);
    border-radius: var(--tum-radius-sm);
    min-width: 0;
}

.tum-account-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--tum-border);
    color: var(--tum-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tum-account-item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.tum-account-item-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tum-text-faint);
}

.tum-account-item-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tum-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tum-account-item-value code {
    background: #fff;
    border: 1px solid var(--tum-border);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 600;
}

.tum-account-item-value a {
    color: var(--tum-text);
    text-decoration: none;
}

.tum-account-item-value a:hover {
    color: var(--tum-primary-dark);
}

/* ---- Telegram-чіп у рядку 2 ---- */

.tum-telegram-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none !important;
}

.tum-telegram-chip-ok {
    color: var(--tum-primary-dark);
}

.tum-telegram-chip-connect {
    color: #229ed9 !important;
    cursor: pointer;
}

.tum-telegram-chip-connect:hover {
    text-decoration: underline !important;
}

/* ---- Рядок 3: категорії навчання, в один рядок з підписом ---- */

.tum-account-categories-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--tum-border);
}

.tum-account-categories-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--tum-text-muted);
    white-space: nowrap;
}

.tum-account-categories-label svg {
    color: var(--tum-primary-dark);
    flex-shrink: 0;
}

.tum-account-categories-row .tum-cab-categories {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.tum-account-categories-row p.tum-empty {
    margin: 0;
}

.tum-full-block {
    margin-bottom: 22px;
}

.tum-stat-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* =========================================================
   ЗАПИСИ ДО ІНСТРУКТОРА
========================================================= */

/* ---- Статус-беджі (спільні: курси/записи) ---- */

.tum-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.tum-status-upcoming  { background: var(--tum-blue-soft);   color: var(--tum-blue); }
.tum-status-ongoing   { background: var(--tum-amber-soft);  color: var(--tum-amber); }
.tum-status-past      { background: var(--tum-primary-soft); color: var(--tum-primary-dark); }
.tum-status-cancelled { background: #f3f4f6; color: var(--tum-text-muted); }

/* ---- Міні-список записів (Огляд) ---- */

.tum-mini-booking-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.tum-mini-booking {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--tum-border);
}

.tum-mini-booking:last-child {
    border-bottom: none;
}

.tum-mini-booking-date {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 13px;
    color: var(--tum-text);
    width: 42px;
}

.tum-mini-booking-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tum-mini-booking-inst {
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tum-mini-booking-countdown {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--tum-primary-dark);
    font-variant-numeric: tabular-nums;
}

.tum-goto-bookings {
    width: 100%;
}

/* ---- Повні картки записів (вкладка "Записи") ---- */

.tum-booking-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tum-booking-card {
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-lg);
    box-shadow: var(--tum-shadow);
    padding: 22px 24px;
}

.tum-booking-cancelled {
    opacity: .6;
}

.tum-booking-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tum-booking-head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tum-booking-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tum-btn-cancel-booking {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--tum-radius-sm);
    background: #fff;
    color: var(--tum-red) !important;
    border: 1.5px solid #fca5a5;
    font-size: 12.5px;
    font-weight: 700;
    width: auto;
    white-space: nowrap;
    transition: background var(--tum-transition), border-color var(--tum-transition), color var(--tum-transition);
}

.tum-btn-cancel-booking:hover {
    background: var(--tum-red);
    border-color: var(--tum-red);
    color: #fff !important;
}

.tum-btn-cancel-booking:disabled {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}

.tum-booking-card.tum-is-cancelling {
    opacity: .5;
    pointer-events: none;
}

.tum-booking-date {
    font-weight: 800;
    font-size: 15.5px;
}

.tum-booking-inst {
    font-size: 14px;
    color: var(--tum-text-muted);
    font-weight: 600;
}

.tum-booking-inst-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tum-inst-rating-value {
    font-size: 12px;
    color: var(--tum-text-faint);
    font-weight: 700;
}

.tum-booking-countdown {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--tum-primary-soft);
    color: var(--tum-primary-dark);
    border-radius: var(--tum-radius-sm);
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 14px;
}

.tum-countdown-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.tum-booking-ongoing-msg {
    background: var(--tum-amber-soft);
    color: var(--tum-amber);
}

.tum-booking-table {
    border: none !important;
    margin-bottom: 6px;
}

.tum-booking-table td {
    border: none !important;
    padding: 7px 4px !important;
    font-size: 13.5px;
    background: transparent !important;
}

.tum-booking-table .tum-label {
    color: var(--tum-text-faint);
    font-weight: 600;
    width: 150px;
}

/* ---- Блок відгуку/рейтингу ---- */

.tum-rating-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tum-border);
}

.tum-rating-title {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tum-text);
}

.tum-rating-readout {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.tum-rating-comment-view {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--tum-text-muted);
    line-height: 1.5;
    background: var(--tum-bg);
    border-radius: var(--tum-radius-sm);
    padding: 10px 12px;
}

.tum-rating-form {
    margin-top: 10px;
}

.tum-rating-form.tum-hidden {
    display: none;
}

.tum-rating-comment {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--tum-border);
    border-radius: var(--tum-radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    color: var(--tum-text);
    resize: vertical;
    outline: none;
    transition: border-color var(--tum-transition), box-shadow var(--tum-transition);
}

.tum-rating-comment:focus {
    border-color: var(--tum-primary);
    box-shadow: 0 0 0 3px rgba(136, 181, 80, .15);
}

.tum-rating-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.tum-rating-msg {
    font-size: 12.5px;
    font-weight: 600;
}

.tum-rating-msg.tum-msg-ok  { color: var(--tum-primary-dark); }
.tum-rating-msg.tum-msg-err { color: var(--tum-red); }

/* ---- Зірки рейтингу (статичні та інтерактивні) ---- */

.tum-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 0;
}

.tum-star {
    position: relative;
    display: inline-block;
}

.tum-stars-sm .tum-star { width: 15px; height: 15px; }
.tum-stars-md .tum-star { width: 20px; height: 20px; }
.tum-stars-lg .tum-star { width: 30px; height: 30px; }

.tum-star-bg,
.tum-star-fg {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

.tum-stars-sm .tum-star-bg,
.tum-stars-sm .tum-star-fg { width: 15px; height: 15px; }
.tum-stars-md .tum-star-bg,
.tum-stars-md .tum-star-fg { width: 20px; height: 20px; }
.tum-stars-lg .tum-star-bg,
.tum-stars-lg .tum-star-fg { width: 30px; height: 30px; }

.tum-star-bg {
    color: #e2e5ea;
}

.tum-star-fg-mask {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    display: block;
}

.tum-star-fg {
    color: #f5a623;
}

.tum-star-input {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.tum-star-input .tum-star {
    transition: transform .12s ease;
}

.tum-star-input .tum-star:hover {
    transform: scale(1.08);
}

/* =========================================================
   ЖИВИЙ ВІДЛІК ЧАСУ — плавне оновлення без "стрибків"
========================================================= */

[data-tum-countdown] .tum-countdown-value,
[data-tum-countdown].tum-mini-booking-countdown {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .tum-account-grid-3,
    .tum-account-grid-2 { grid-template-columns: 1fr; }
    .tum-account-categories-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tum-booking-card { padding: 18px; }
    .tum-booking-table .tum-label { width: 110px; }
    .tum-mini-booking { flex-wrap: wrap; }
    .tum-stars-lg .tum-star { width: 26px; height: 26px; }
    .tum-stars-lg .tum-star-bg,
    .tum-stars-lg .tum-star-fg { width: 26px; height: 26px; }
}

/* =========================================================
   ГЕНЕРИЧНИЙ ХЕЛПЕР
========================================================= */

.tum-hidden {
    display: none !important;
}

/* =========================================================
   АРХІВ ЗАПИСІВ (вкладка "Записи")
========================================================= */

.tum-archive-toggle {
    width: 100%;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 18px;
}

.tum-archive-chevron {
    transition: transform var(--tum-transition);
}

.tum-archive-toggle.is-open .tum-archive-chevron {
    transform: rotate(180deg);
}

.tum-booking-archive {
    opacity: .92;
}

.tum-booking-archive .tum-booking-card {
    background: var(--tum-bg);
}

/* =========================================================
   МОЇ ВІДГУКИ
========================================================= */

.tum-review-card {
    background: var(--tum-surface);
    border: 1px solid var(--tum-border);
    border-radius: var(--tum-radius-lg);
    box-shadow: var(--tum-shadow);
    padding: 22px 24px;
    margin-bottom: 16px;
}

.tum-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.tum-review-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tum-review-inst {
    font-weight: 700;
    font-size: 15px;
}

.tum-review-date {
    font-size: 12.5px;
    color: var(--tum-text-faint);
    font-weight: 600;
}

.tum-review-card .tum-rating-block {
    margin-top: 10px;
    padding-top: 14px;
}

/* ---- Кнопка "небезпечної" дії ---- */

.tum-btn-danger {
    background: transparent;
    color: var(--tum-red) !important;
    border-color: #fecaca;
}

.tum-btn-danger:hover {
    background: #fef2f2;
    border-color: var(--tum-red);
}

.tum-review-card.tum-is-removing {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
}

/* =========================================================
   БАНЕР "ЗАПИСАТИСЬ НА ПРАКТИЧНЕ ВОДІННЯ"
   Компактна плашка в стрічці "Огляду" (перед "Записи до інструктора"),
   такої ж ширини, як інші картки — не яскрава, не через весь дашборд.
========================================================= */

.tum-promo-compact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--tum-primary-soft);
    border: 1px solid #dcecc8;
    text-decoration: none !important;
    transition: border-color var(--tum-transition), box-shadow var(--tum-transition);
}

.tum-promo-compact:hover {
    border-color: var(--tum-primary);
    box-shadow: var(--tum-shadow);
}

.tum-promo-compact-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    color: var(--tum-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tum-promo-compact-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tum-promo-compact-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tum-text);
}

.tum-promo-compact-sub {
    font-size: 12px;
    color: var(--tum-text-muted);
}

.tum-promo-compact-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--tum-primary-dark);
    border: 1px solid var(--tum-border);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
    transition: background var(--tum-transition), color var(--tum-transition), border-color var(--tum-transition);
}

.tum-promo-compact:hover .tum-promo-compact-cta {
    background: var(--tum-primary);
    color: #fff;
    border-color: var(--tum-primary);
}

@media (max-width: 640px) {
    .tum-promo-compact {
        flex-wrap: wrap;
    }
    .tum-promo-compact-cta {
        width: 100%;
        justify-content: center;
    }
}
