.tm-wrap { max-width: 1000px; margin: 0 auto; font-family: inherit; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.tm-card { border: 1px solid #e5e5e5; border-radius: 10px; padding: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.tm-card h3 { margin: 0 0 6px; }
.tm-subject { color: #666; font-size: 14px; }
.tm-rate { font-weight: bold; }
.tm-rating { color: #d98c00; font-size: 14px; }
.tm-btn { display: inline-block; background: #CC1939; color: #fff; padding: 8px 16px; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; margin-top: 8px; font-size: 14px; }
.tm-btn:hover { background: #a8112d; color: #fff; }
.tm-search { display: flex; gap: 8px; margin-bottom: 8px; }
.tm-search input { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.tm-slots { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.tm-slot { border: 1px solid #eee; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.tm-form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.tm-form input, .tm-form textarea, .tm-form select { padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.tm-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.tm-table th, .tm-table td { border: 1px solid #eee; padding: 8px; text-align: right; }
#tm-book-msg, #tm-slot-msg, #tm-teacher-msg { margin-top: 8px; color: #CC1939; font-size: 14px; }

/* Portal layout */
.tm-portal-body { background: #F8F8F8; margin: 0; font-family: -apple-system, Tahoma, Arial, sans-serif; }
.tm-nav { background: #fff; border-bottom: 1px solid #eee; padding: 12px 20px; }
.tm-nav-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tm-logo { font-weight: bold; font-size: 18px; color: #CC1939; text-decoration: none; }
.tm-nav nav a { margin-inline-start: 14px; text-decoration: none; color: #333; font-size: 14px; }
.tm-nav nav a:hover { color: #CC1939; }
.tm-user { margin-inline-start: 14px; color: #888; font-size: 13px; }
.tm-main { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
.tm-card-box { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.tm-role-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.tm-role-toggle a { padding: 8px 16px; border-radius: 6px; background: #f2f2f2; text-decoration: none; color: #333; font-size: 14px; }
.tm-role-toggle a.active { background: #CC1939; color: #fff; }
.tm-err { color: #CC1939; background: #fdecec; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
