/* TeachFlow UI bridge for the PHP app.
   Keeps the existing header/mobile nav behavior intact while shifting the
   page surfaces, cards, controls, and spacing toward the TeachFlow HTML style.
*/

.teachflow-ui {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 24%),
    linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
  color: #0f172a;
  --tf-card: rgba(255, 255, 255, 0.92);
  --tf-border: rgba(15, 23, 42, 0.08);
  --tf-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --tf-shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.12);
  --tf-blue: #2563eb;
  --tf-cyan: #0891b2;
  --tf-text: #0f172a;
  --tf-muted: #64748b;
}

.teachflow-ui #main-wrapper.show > .content-body,
.teachflow-ui .content-body {
  background:
    radial-gradient(900px 360px at 50% 0%, rgba(255, 255, 255, 0.72), transparent 65%),
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
}

.teachflow-ui .content-body .container-fluid {
  padding-left: 18px !important;
  padding-right: 18px !important;
  padding-top: 16px !important;
  padding-bottom: 18px !important;
}

.teachflow-ui .card,
.teachflow-ui .modal-content,
.teachflow-ui .dropdown-menu,
.teachflow-ui .profile-detail,
.teachflow-ui .notification-dropdown {
  background: var(--tf-card);
  border: 1px solid var(--tf-border);
  box-shadow: var(--tf-shadow);
  border-radius: 20px;
}

.teachflow-ui .card-header {
  background: transparent;
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.teachflow-ui .card,
.teachflow-ui .card-header,
.teachflow-ui .card-body {
  border-radius: 20px !important;
}

.teachflow-ui .card-body {
  color: var(--tf-text);
}

.teachflow-ui .btn {
  border-radius: 14px;
}

.teachflow-ui .btn-primary,
.teachflow-ui .btn-success,
.teachflow-ui .btn-warning,
.teachflow-ui .btn-info,
.teachflow-ui .btn-dark {
  border: 0;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.teachflow-ui .btn-primary {
  background: linear-gradient(135deg, var(--tf-blue) 0%, var(--tf-cyan) 100%);
}

.teachflow-ui .btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--tf-blue);
  background: rgba(37, 99, 235, 0.04);
}

.teachflow-ui .form-control,
.teachflow-ui .form-select,
.teachflow-ui .input-group-text {
  border-radius: 14px;
  border-color: #d8e1ee;
}

.teachflow-ui .form-control:focus,
.teachflow-ui .form-select:focus {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.teachflow-ui .badge {
  border-radius: 9999px;
  padding: 0.28rem 0.6rem;
}

.teachflow-ui .page-title,
.teachflow-ui h1,
.teachflow-ui h2,
.teachflow-ui h3,
.teachflow-ui h4,
.teachflow-ui h5,
.teachflow-ui h6 {
  color: var(--tf-text);
}

.teachflow-ui .section-intro p,
.teachflow-ui .text-muted,
.teachflow-ui .small,
.teachflow-ui .card-desc,
.teachflow-ui .stats-meta,
.teachflow-ui .dialog-desc {
  color: var(--tf-muted) !important;
}

.teachflow-ui .dashboard-hero {
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.24), transparent 28%),
    radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.18), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eff5ff 52%, #f8fbff 100%);
  border-radius: 28px;
  padding: 30px;
  color: #0f172a;
  box-shadow: var(--tf-shadow-strong);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--tf-border);
}

.teachflow-ui .dashboard-panel-card,
.teachflow-ui .stats-card,
.teachflow-ui .class-card {
  background: var(--tf-card);
  border: 1px solid rgba(37, 99, 235, 0.08) !important;
  box-shadow: var(--tf-shadow);
}

body[data-theme-version="dark"] .teachflow-ui .content-body .bg-white,
body[data-theme-version="dark"] .teachflow-ui .content-body .card,
body[data-theme-version="dark"] .teachflow-ui .content-body .rounded-xl,
body[data-theme-version="dark"] .teachflow-ui .content-body .rounded-2xl {
  background-color: #13203a;
  border-color: rgba(136, 158, 204, 0.24);
}

body[data-theme-version="dark"] .teachflow-ui .content-body .text-gray-900,
body[data-theme-version="dark"] .teachflow-ui .content-body .text-gray-800,
body[data-theme-version="dark"] .teachflow-ui .content-body .text-gray-700 {
  color: #eef4ff;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .text-gray-600,
body[data-theme-version="dark"] .teachflow-ui .content-body .text-gray-500 {
  color: #98add3;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .border-gray-100,
body[data-theme-version="dark"] .teachflow-ui .content-body .border-gray-200 {
  border-color: rgba(136, 158, 204, 0.24);
}

body[data-theme-version="dark"] .teachflow-ui .content-body .bg-white,
body[data-theme-version="dark"] .teachflow-ui .content-body .bg-white\/70,
body[data-theme-version="dark"] .teachflow-ui .content-body .shadow-sm,
body[data-theme-version="dark"] .teachflow-ui .content-body .shadow-md,
body[data-theme-version="dark"] .teachflow-ui .content-body .shadow-lg,
body[data-theme-version="dark"] .teachflow-ui .content-body .shadow-xl,
body[data-theme-version="dark"] .teachflow-ui .content-body .shadow-2xl {
  background-color: #13203a !important;
  color: #e6eeff;
  border-color: rgba(136, 158, 204, 0.24) !important;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .bg-gray-50,
body[data-theme-version="dark"] .teachflow-ui .content-body .bg-gray-100 {
  background-color: #0f1a30 !important;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .text-dark,
body[data-theme-version="dark"] .teachflow-ui .content-body .text-black {
  color: #eef4ff !important;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .border-gray-50 {
  border-color: rgba(136, 158, 204, 0.18) !important;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .quick-action-btn,
body[data-theme-version="dark"] .teachflow-ui .content-body .stat-card,
body[data-theme-version="dark"] .teachflow-ui .content-body .dashboard-panel-card,
body[data-theme-version="dark"] .teachflow-ui .content-body .stats-card,
body[data-theme-version="dark"] .teachflow-ui .content-body .class-card,
body[data-theme-version="dark"] .teachflow-ui .content-body .result-card,
body[data-theme-version="dark"] .teachflow-ui .content-body .inbox-item,
body[data-theme-version="dark"] .teachflow-ui .content-body .hero-panel,
body[data-theme-version="dark"] .teachflow-ui .content-body .home-quick-action {
  background: #13203a !important;
  color: #e6eeff !important;
  border-color: rgba(136, 158, 204, 0.24) !important;
  box-shadow: 0 18px 44px rgba(4, 11, 24, 0.42) !important;
}

body[data-theme-version="dark"] .teachflow-ui .content-body .quick-action-btn *,
body[data-theme-version="dark"] .teachflow-ui .content-body .stat-card *,
body[data-theme-version="dark"] .teachflow-ui .content-body .dashboard-panel-card *,
body[data-theme-version="dark"] .teachflow-ui .content-body .stats-card *,
body[data-theme-version="dark"] .teachflow-ui .content-body .class-card *,
body[data-theme-version="dark"] .teachflow-ui .content-body .result-card *,
body[data-theme-version="dark"] .teachflow-ui .content-body .inbox-item *,
body[data-theme-version="dark"] .teachflow-ui .content-body .hero-panel *,
body[data-theme-version="dark"] .teachflow-ui .content-body .home-quick-action * {
  color: inherit !important;
}

.teachflow-ui .stats-card,
.teachflow-ui .class-card {
  border-radius: 20px !important;
}

.teachflow-ui .class-card:hover,
.teachflow-ui .stats-card:hover,
.teachflow-ui .hover-elevate:hover,
.teachflow-ui .quick-action-btn:hover {
  transform: translateY(-2px);
}

.teachflow-ui .quick-action-btn {
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.teachflow-ui .home-quick-action {
  min-height: 132px;
  height: auto;
  overflow: visible;
}

.teachflow-ui .home-quick-action p {
  white-space: normal;
  line-height: 1.35;
}

.teachflow-ui .home-quick-action .w-8 {
  flex-shrink: 0;
}

.teachflow-ui .app-mobile-bottom-nav {
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.teachflow-ui .mobile-nav-item.active-blue {
  color: var(--tf-blue);
}

.teachflow-ui .table {
  color: var(--tf-text);
}

.teachflow-ui .table thead th {
  background: #f8fbff;
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.teachflow-ui .modal-header {
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.teachflow-ui .modal-footer {
  border-top-color: rgba(226, 232, 240, 0.9);
}

.teachflow-ui .alert {
  border-radius: 16px;
}

.teachflow-ui .sidebar-overlay,
.teachflow-ui .mobile-nav-panel-overlay {
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .teachflow-ui .content-body .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 12px !important;
    padding-bottom: 16px !important;
  }
}
