@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --tp-primary: #6c5ce7;
    --tp-primary-dark: #5543d6;
    --tp-primary-soft: #ede9fe;
    --tp-blue: #5b8dee;
    --tp-bg: #f8fafc;
    --tp-surface: #ffffff;
    --tp-border: #e2e8f0;
    --tp-text: #1e293b;
    --tp-muted: #64748b;
    --tp-success: #10b981;
    --tp-success-soft: #d1fae5;
    --tp-warning: #f59e0b;
    --tp-warning-soft: #fef3c7;
    --tp-danger: #f43f5e;
    --tp-danger-soft: #ffe4e6;
    --tp-radius: 16px;
    --tp-shadow: 0 10px 25px -5px rgba(108, 92, 231, 0.1), 0 8px 10px -6px rgba(108, 92, 231, 0.1);
    --tp-sidebar-w: 250px;
}

* {
    box-sizing: border-box;
}

body.therapist-body,
body.tp-body {
    margin: 0;
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--tp-bg);
    color: var(--tp-text);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.tp-app {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.tp-sidebar {
    width: var(--tp-sidebar-w);
    background: linear-gradient(180deg, #6c5ce7 0%, #5b4bd0 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1040;
    transition: transform .25s ease;
}

.tp-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    font-size: 1.3rem;
    font-weight: 700;
}

.tp-sidebar-brand i {
    font-size: 1.5rem;
}

.tp-nav {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-size: .95rem;
    transition: background .2s;
}

.tp-nav-item i {
    width: 22px;
    text-align: center;
}

.tp-nav-item:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.tp-nav-item.active {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-weight: 600;
}

.tp-sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

/* ---------- Main ---------- */
.tp-main {
    flex: 1;
    margin-right: var(--tp-sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tp-topbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--tp-border);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.tp-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.tp-topbar-sub {
    color: var(--tp-muted);
    font-size: .8rem;
}

.tp-date-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--tp-primary-soft);
    color: var(--tp-primary-dark);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 600;
}

.tp-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--tp-bg);
    color: var(--tp-text);
    font-size: 1.1rem;
    position: relative;
}

.tp-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    background: var(--tp-danger);
    color: #fff;
    border-radius: 20px;
    font-size: .65rem;
    padding: 1px 6px;
}

.tp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--tp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.tp-menu-btn {
    border: none;
    background: none;
    font-size: 1.2rem;
}

.tp-notif-menu {
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
}

.tp-content {
    padding: 24px;
    flex: 1;
}

/* ---------- Welcome ---------- */
.tp-welcome {
    background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-blue) 100%);
    border-radius: var(--tp-radius);
    padding: 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tp-greet-name {
    font-weight: 800;
}

.tp-welcome-greet h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
}

.tp-welcome-greet p {
    color: rgba(255, 255, 255, .85);
}

.tp-welcome-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tp-stat {
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    padding: 12px 18px;
    min-width: 90px;
    text-align: center;
}

.tp-stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
}

.tp-stat-label {
    font-size: .72rem;
    opacity: .9;
}

/* ---------- Cards ---------- */
.tp-card {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    overflow: hidden;
}

.tp-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--tp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.tp-card-body {
    padding: 20px;
}

.tp-card-meta {
    color: var(--tp-muted);
    font-size: .8rem;
}

/* ---------- Status badges ---------- */
.tp-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.tp-status--upcoming {
    background: var(--tp-primary-soft);
    color: var(--tp-primary-dark);
}

.tp-status--running {
    background: var(--tp-warning-soft);
    color: #b5761e;
}

.tp-status--done {
    background: var(--tp-success-soft);
    color: #1f9d6b;
}

.tp-status--cancelled {
    background: #eceff5;
    color: var(--tp-muted);
    text-decoration: line-through;
}

.tp-status--no-show {
    background: var(--tp-danger-soft);
    color: var(--tp-danger);
}

/* ---------- Tags ---------- */
.tp-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--tp-bg);
    color: var(--tp-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.tp-tag--spec {
    background: var(--tp-primary-soft);
    color: var(--tp-primary-dark);
}

/* ---------- Buttons ---------- */
.tp-btn {
    border: none;
    border-radius: 12px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: .9rem;
    transition: all .2s;
}

.tp-btn--primary {
    background: var(--tp-primary);
    color: #fff;
}

.tp-btn--primary:hover {
    background: var(--tp-primary-dark);
    color: #fff;
}

.tp-btn--soft {
    background: var(--tp-primary-soft);
    color: var(--tp-primary-dark);
}

.tp-btn--soft:hover {
    background: #ded8ff;
    color: var(--tp-primary-dark);
}

.tp-btn--ghost {
    background: transparent;
    color: var(--tp-muted);
    border: 1px solid var(--tp-border);
}

.tp-btn--success {
    background: var(--tp-success);
    color: #fff;
}

.tp-btn--success:hover {
    background: #27b480;
    color: #fff;
}

.tp-btn--danger {
    background: var(--tp-danger-soft);
    color: var(--tp-danger);
}

/* ---------- Session cards ---------- */
.tp-session-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: box-shadow .2s;
}

.tp-session-card:hover {
    box-shadow: 0 6px 18px rgba(108, 92, 231, .1);
}

.tp-session-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--tp-bg);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 64px;
}

.tp-session-time strong {
    font-size: 1.05rem;
}

.tp-session-time small {
    color: var(--tp-muted);
    font-size: .7rem;
}

.tp-session-duration {
    font-size: .68rem;
    color: var(--tp-primary-dark);
    margin-top: 2px;
}

.tp-session-info h4 {
    font-size: 1rem;
    margin: 0 0 6px;
}

.tp-session-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.tp-session-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---------- Empty states ---------- */
.tp-empty {
    text-align: center;
    color: var(--tp-muted);
    padding: 30px 10px;
}

.tp-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: .5;
}

.tp-empty p {
    margin: 0;
}

.tp-empty.tp-large i {
    font-size: 3rem;
}

.tp-empty.tp-large h4 {
    margin: 10px 0 4px;
    color: var(--tp-text);
}

/* ---------- Session hero / timer ---------- */
.tp-session-hero {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tp-session-hero-info h2 {
    margin: 0;
}

.tp-session-timer {
    background: var(--tp-primary-soft);
    border-radius: 14px;
    padding: 16px 24px;
    text-align: center;
    min-width: 170px;
}

.tp-timer-state {
    color: var(--tp-primary-dark);
    font-size: .8rem;
    font-weight: 600;
}

.tp-timer-count {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--tp-primary-dark);
    font-variant-numeric: tabular-nums;
}

/* ---------- Goals ---------- */
.tp-goal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.tp-goal.is-done .goal-text {
    text-decoration: line-through;
    color: var(--tp-muted);
}

.tp-goal .goal-text {
    flex: 1;
}

.tp-goal .goal-status {
    width: 130px;
}

/* ---------- Notes / form ---------- */
.tp-save-indicator {
    color: var(--tp-success);
    font-size: .8rem;
    font-weight: 600;
}

.note-field {
    border-radius: 12px;
    border-color: var(--tp-border);
}

.note-field:focus {
    border-color: var(--tp-primary);
    box-shadow: 0 0 0 .2rem rgba(108, 92, 231, .1);
}

/* ---------- Files / attachments ---------- */
.tp-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.tp-file i:first-child {
    color: var(--tp-primary);
    font-size: 1.2rem;
}

.tp-icon-btn-sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: var(--tp-bg);
    color: var(--tp-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-icon-btn--danger:hover {
    background: var(--tp-danger-soft);
    color: var(--tp-danger);
}

/* ---------- Check list ---------- */
.tp-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tp-check-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.tp-check-list li.ng {
    color: var(--tp-muted);
}

.tp-check-list li.ok {
    color: var(--tp-success);
    background: var(--tp-success-soft);
}

/* ---------- Child ---------- */
.tp-child-avatar {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tp-primary), var(--tp-blue));
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-child-avatar--lg {
    width: 64px;
    height: 64px;
    min-width: 64px;
    font-size: 1.6rem;
}

.tp-info-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--tp-border);
}

.tp-info-row>span {
    color: var(--tp-muted);
}

.tp-plan {
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.tp-goal-list {
    padding-right: 4px;
    list-style: none;
    margin: 0;
}

.tp-goal-list li {
    padding: 5px 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.tp-goal-list li.is-done {
    color: var(--tp-muted);
    text-decoration: line-through;
}

/* ---------- History ---------- */
.tp-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    margin-bottom: 8px;
}

.tp-history-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--tp-bg);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 90px;
}

.tp-history-date small {
    color: var(--tp-muted);
}

/* ---------- Progress ring ---------- */
.tp-progress-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(var(--tp-primary) calc(var(--p)*1%), #eef0f6 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-progress-ring .tp-progress-value {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--tp-primary-dark);
}

.tp-progress-ring small {
    font-size: .55rem;
    color: var(--tp-muted);
}

/* ---------- Availability ---------- */
.tp-av-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.tp-av-day {
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}

.tp-av-day-name {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: .85rem;
}

.tp-av-time {
    font-size: .8rem;
    color: var(--tp-primary-dark);
    background: var(--tp-primary-soft);
    border-radius: 8px;
    padding: 4px;
}

.tp-av-time.tp-av-off {
    background: var(--tp-bg);
    color: var(--tp-muted);
}

.tp-av-request {
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

/* ---------- Reports ---------- */
.tp-report-stat {
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.tp-print-head {
    border-bottom: 2px solid var(--tp-primary);
    padding-bottom: 14px;
}

.tp-print-notes blockquote {
    background: var(--tp-bg);
    border-right: 3px solid var(--tp-primary);
    padding: 10px 14px;
    border-radius: 8px;
}

.tp-print-actions {
    display: flex;
    gap: 10px;
}

/* ---------- Page head ---------- */
.tp-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    body.therapist-body,
    body.tp-body {
        padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .tp-sidebar {
        transform: translateX(100%);
    }

    .tp-main {
        margin-right: 0;
    }

    .tp-sidebar.open {
        transform: translateX(0);
    }

    .tp-welcome-stats {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .tp-content {
        padding: 12px;
    }

    .tp-session-card {
        flex-wrap: wrap;
        padding: 12px;
        border-radius: 14px;
    }

    .tp-session-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
    }

    .tp-topbar {
        padding: 10px 14px;
        height: 56px;
    }

    .tp-welcome {
        padding: 16px 14px;
        border-radius: 14px;
    }

    .tp-welcome-stats {
        width: 100%;
        gap: 8px;
    }

    .tp-stat {
        flex: 1 1 calc(50% - 8px);
        padding: 8px 10px;
        min-width: 0;
    }

    .tp-stat-num {
        font-size: 1.3rem;
    }

    .tp-stat-label {
        font-size: 0.72rem;
    }

    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px !important;
    }
}

/* --- Mobile Bottom Navigation for Therapist Portal --- */
.admin-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--tp-border);
    z-index: 1035;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(108, 92, 231, 0.08);
}

@media (max-width: 991px) {
    .admin-mobile-bottom-nav {
        display: flex;
    }
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--tp-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 4px;
    flex: 1;
    text-align: center;
    border-radius: 12px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link i {
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--tp-primary);
}

.mobile-nav-link:active {
    transform: scale(0.92);
}

.mobile-nav-link.active {
    color: var(--tp-primary);
    font-weight: 800;
}

.mobile-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    font-size: 0.62rem;
    padding: 0.25em 0.45em;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

/* =====================================================
   Live Hub - Current & Next Session Cards
   ===================================================== */
.tp-live-hub {
    margin-bottom: 1.75rem;
}

.tp-live-card {
    background: #ffffff;
    border-radius: 18px;
    border: 2px solid #e2e8f0;
    padding: 20px 22px;
    position: relative;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.tp-live-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -2px rgba(15, 23, 42, 0.05);
}

.tp-live-card--current {
    border-color: #10b981;
    background: linear-gradient(175deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.12), 0 8px 10px -6px rgba(16, 185, 129, 0.08);
}

.tp-live-card--next {
    border-color: #6366f1;
    background: linear-gradient(175deg, #ffffff 0%, #eef2ff 100%);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.12), 0 8px 10px -6px rgba(99, 102, 241, 0.08);
}

.tp-live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.tp-live-pill--running {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.tp-live-pill--next {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.tp-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: tpPulse 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes tpPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.tp-live-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

.tp-live-child-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.tp-live-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tp-live-avatar--emerald {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tp-live-avatar--indigo {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tp-live-child-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
}

.tp-live-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tp-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.tp-live-tag--room {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.tp-live-tag--spec {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.tp-live-handover-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
}

.tp-handover-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tp-handover-row i {
    font-size: 0.95rem;
    margin-top: 2px;
}

.tp-live-empty {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.tp-live-empty i {
    font-size: 2.4rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.tp-live-empty h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.tp-live-empty p {
    font-size: 0.85rem;
    margin: 0;
    max-width: 280px;
}

/* =====================================================
   Full-Day Shift Timeline & Enhanced Cards
   ===================================================== */
.tp-timeline-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 12px;
    position: relative;
    transition: all .2s ease;
    border-right: 5px solid #cbd5e1;
}

.tp-timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.tp-timeline-card--clinical {
    border-right-color: #10b981 !important;
}

.tp-timeline-card--office {
    border-right-color: #0284c7 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.tp-timeline-card--training {
    border-right-color: #8b5cf6 !important;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.tp-timeline-card--break {
    border-right-color: #f59e0b !important;
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.tp-timeline-card--prep {
    border-right-color: #6366f1 !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
}

.tp-timeline-card--wrapup {
    border-right-color: #64748b !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.tp-timeline-card.is-live-active {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35), 0 10px 25px rgba(16, 185, 129, 0.12) !important;
}

.tp-timeline-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 72px;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}

.tp-timeline-time strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.tp-timeline-time small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.tp-timeline-time .tp-timeline-duration {
    font-size: 0.68rem;
    color: #4f46e5;
    margin-top: 3px;
    font-weight: 700;
}

.tp-timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tp-timeline-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.tp-timeline-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.tp-timeline-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
}

.tp-timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tp-kind-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
}

.tp-kind-badge--clinical {
    background: #dcfce7;
    color: #166534;
}

.tp-kind-badge--office {
    background: #e0f2fe;
    color: #0369a1;
}

.tp-kind-badge--training {
    background: #ede9fe;
    color: #5b21b6;
}

.tp-kind-badge--break {
    background: #fef3c7;
    color: #92400e;
}

.tp-kind-badge--prep {
    background: #e0e7ff;
    color: #3730a3;
}

.tp-kind-badge--wrapup {
    background: #f1f5f9;
    color: #334155;
}

/* Shift Overview Card on Sidebar/Right */
.tp-shift-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 16px;
}

.tp-shift-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tp-shift-progress {
    height: 10px;
    border-radius: 9999px;
    display: flex;
    overflow: hidden;
    background: #e2e8f0;
    margin-bottom: 16px;
}

.tp-shift-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tp-shift-metric-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}

.tp-shift-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    display: block;
    line-height: 1.2;
}

.tp-shift-metric-lbl {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}
