/* =========================================================
   TechGeeks — Shared Module Layout
   Loaded after app.css and before responsive_utils.css / pwa.css
   ========================================================= */

/* Page title row */
.tg-title-row,
.module-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.tg-title-actions,
.tg-actions-top,
.module-title-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Page subtitle */
.tg-page-subtitle,
.module-page-subtitle{
  font-size:13px;
  margin-top:4px;
  color:var(--muted);
}

/* Section card */
.tg-section-card,
.module-section-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:14px;
  min-width:0;
}

/* Section heading */
.tg-section-head,
.module-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.tg-section-title,
.module-section-title{
  font-size:15px;
  font-weight:900;
  color:var(--text);
  margin:0;
}

.tg-section-subtitle,
.module-section-subtitle{
  font-size:13px;
  color:var(--muted);
  margin-top:4px;
}

/* Dashboard/card grids */
.tg-dashboard-grid,
.module-dashboard-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.tg-dashboard-card,
.module-dashboard-card{
  display:block;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  min-width:0;
  box-shadow:var(--shadow-sm);
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.tg-dashboard-card:hover,
.module-dashboard-card:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
  border-color:var(--border-strong);
}

/* Filter cards */
.tg-filter-card,
.module-filter-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:14px;
  min-width:0;
}

/* Empty rows/states */
.tg-empty-row,
.module-empty-row{
  padding:14px !important;
  color:var(--muted);
  text-align:center;
}

.tg-empty-state,
.module-empty-state{
  padding:24px 14px;
  color:var(--muted);
  text-align:center;
}

/* Sticky form action bar */
.tg-sticky-actions,
.module-sticky-actions{
  position:sticky;
  bottom:0;
  z-index:30;
  padding-top:12px;
  margin-top:12px;
  background:rgba(244,246,249,.92);
  backdrop-filter:blur(8px);
  border-top:1px solid var(--border);
}

/* Mobile / PWA */
@media (max-width:920px), (orientation:landscape) and (max-height:520px){

  .tg-title-row,
  .module-title-row{
    gap:8px;
  }

  .tg-title-actions,
  .tg-actions-top,
  .module-title-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
  }

  .tg-title-actions .btn,
  .tg-actions-top .btn,
  .module-title-actions .btn{
    width:100%;
    justify-content:center;
  }

  .tg-section-card,
  .module-section-card,
  .tg-filter-card,
  .module-filter-card{
    padding:12px;
    border-radius:16px;
    margin-bottom:12px;
  }

  .tg-section-head,
  .module-section-head{
    gap:8px;
  }

  .tg-dashboard-grid,
  .module-dashboard-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
}

@media (max-width:520px){

  .tg-title-actions,
  .tg-actions-top,
  .module-title-actions{
    grid-template-columns:1fr;
  }
}