:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #0ea5e9;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.08);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    --tbt-radius-lg: 18px;
    --tbt-radius-md: 12px;
    --tbt-gap: 16px;
}

body.bmc-productivity {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #0ea5e9;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.08);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
}

.tbt-page {
    padding-bottom: 2rem;
}

.tbt-shell {
    border: 1px solid var(--border);
    background: linear-gradient(165deg, var(--surface) 0%, var(--surface-muted) 100%);
    border-radius: var(--tbt-radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.tbt-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1rem;
}

.tbt-date-wrap label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.tbt-date-wrap input,
.tbt-form-card input,
.tbt-form-card select,
.tbt-form-card textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    border-radius: 10px;
    padding: 0.62rem 0.75rem;
}

.tbt-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tbt-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
}

.tbt-btn-primary {
    background: var(--primary);
    color: #fff;
}

.tbt-btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-main);
}

.tbt-btn-full {
    width: 100%;
}

.tbt-btn-small {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.tbt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--tbt-gap);
}

.tbt-form-card,
.tbt-schedule-card {
    border-radius: var(--tbt-radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 1rem;
}

.tbt-form-card h2,
.tbt-schedule-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.tbt-card-intro {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0.45rem 0 1rem;
}

.tbt-form-card label {
    display: block;
    font-weight: 600;
    margin: 0.6rem 0 0.35rem;
}

.tbt-time-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tbt-form-msg {
    min-height: 1.25rem;
    margin: 0.65rem 0;
    font-size: 0.88rem;
    color: var(--accent);
}

.tbt-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0.9rem;
}

.tbt-stats article {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem;
    text-align: center;
}

.tbt-stats span {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.tbt-stats p {
    margin: 0.1rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tbt-timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.tbt-empty {
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.tbt-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tbt-item {
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 0.7rem;
    background: var(--surface-muted);
}

.tbt-item-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.tbt-item-title {
    margin: 0;
    font-size: 0.98rem;
}

.tbt-item-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.tbt-chip {
    display: inline-block;
    font-size: 0.73rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.1rem 0.45rem;
    margin-right: 0.35rem;
}

.tbt-item button {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
}

.tbt-prose {
    margin-top: 1.5rem;
}

.tbt-prose h2 {
    margin-top: 1.4rem;
    font-size: 1.25rem;
}

.tbt-note {
    margin-top: 1rem;
    border-left: 4px solid var(--accent);
    padding: 0.7rem 0.9rem;
    background: var(--surface-muted);
    border-radius: 0 10px 10px 0;
}

.tbt-item[data-category="meeting"] {
    border-left-color: #ff9f1c;
}

.tbt-item[data-category="admin"] {
    border-left-color: #6c7a89;
}

.tbt-item[data-category="health"] {
    border-left-color: #2ec4b6;
}

.tbt-item[data-category="personal"] {
    border-left-color: #9d4edd;
}

.tbt-item[data-category="break"] {
    border-left-color: #adb5bd;
}

@media (min-width: 992px) {
    .tbt-toolbar {
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
    }

    .tbt-date-wrap {
        max-width: 230px;
        width: 100%;
    }

    .tbt-toolbar-actions {
        grid-template-columns: repeat(3, auto);
    }

    .tbt-grid {
        grid-template-columns: minmax(290px, 360px) 1fr;
    }
}

@media (max-width: 767px) {
    .tbt-toolbar-actions {
        grid-template-columns: 1fr;
    }
}
