/* File: assets/css/frontend.css
 * Plugin: Tech Tracker
 * Version: 1.1.0
 *
 * Drop in replacement
 * - Keeps legacy tt-checkin-* styles (backward compatible)
 * - Adds new ttc-* UI system (top bar, cards, incidents, modals)
 */

/* -----------------------------
   Legacy (keep)
----------------------------- */

.tt-checkin-box{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  padding:12px;
}

.tt-muted{ opacity:.7; }

.tt-checkin-row{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}

.tt-checkin-input{
  max-width:120px;
  padding:6px 8px;
  border:1px solid #e5e5e5;
  border-radius:8px;
}

.tt-checkin-btn{
  padding:6px 10px;
  border:1px solid #d7d7d7;
  background:#f7f7f7;
  border-radius:8px;
  cursor:pointer;
}

.tt-checkin-btn-ghost{
  background:#fff;
}

#ttCheckinStatus.tt-ok{ color: green; opacity: 1; }
#ttCheckinStatus.tt-bad{ color: crimson; opacity: 1; }

/* -----------------------------
   New Technician Checkin UI (ttc-*)
----------------------------- */

.ttc-app{
  max-width: 980px;
  margin: 0 auto;
}

.ttc-card{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:12px;
  padding:14px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.ttc-topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border:1px solid #e5e5e5;
  border-radius:12px;
  padding: 12px;
  margin: 0 0 12px 0;
  display:flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.ttc-title{
  font-weight: 700;
}

.ttc-sub{
  font-size: 14px;
  margin-top: 4px;
  line-height: 1.35;
}

.ttc-dot{
  margin: 0 8px;
  opacity: .5;
}

.ttc-topbar-actions{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}

.ttc-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.ttc-label{
  font-size: 13px;
  opacity: .75;
}

.ttc-input{
  width: 160px;
  max-width: 100%;
  padding: 8px 10px;
  border:1px solid #e5e5e5;
  border-radius:10px;
}

.ttc-textarea{
  width: 100%;
  min-height: 90px;
  margin-top: 8px;
  padding: 10px 12px;
  border:1px solid #e5e5e5;
  border-radius:10px;
}

.ttc-actions-row{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}

.ttc-btn{
  padding: 9px 12px;
  border:1px solid #d7d7d7;
  background:#f7f7f7;
  border-radius:10px;
  cursor:pointer;
  line-height: 1.1;
}

.ttc-btn:hover{
  background:#f1f1f1;
}

.ttc-btn-primary{
  background:#111;
  color:#fff;
  border-color:#111;
}

.ttc-btn-primary:hover{
  opacity:.92;
}

.ttc-btn-ghost{
  background:#fff;
}

.ttc-spacer{
  flex: 1;
}

.ttc-mini{
  font-size: 14px;
}

.ttc-status{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fafafa;
}

.ttc-debug pre{
  margin: 8px 0 0 0;
  white-space: pre-wrap;
  font-size: 12px;
}

/* Layout */
.ttc-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 860px){
  .ttc-grid{
    grid-template-columns: 1fr;
  }
  .ttc-input{
    width: 100%;
  }
}

/* Incidents */
.ttc-section-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ttc-section-title{
  font-weight: 700;
}

.ttc-incidents{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.ttc-incident{
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.ttc-incident-top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ttc-incident-title{
  font-weight: 700;
}

.ttc-incident-meta{
  font-size: 13px;
  opacity: .8;
  margin-top: 4px;
}

/* Modals */
.ttc-modal-backdrop{
  position: fixed;
  left:0;
  top:0;
  right:0;
  bottom:0;
  background: rgba(0,0,0,.35);
  z-index: 1000;
}

.ttc-modal{
  position: fixed;
  left: 0;
  right: 0;
  top: 10vh;
  z-index: 1001;
  display:flex;
  justify-content: center;
  padding: 0 12px;
}

.ttc-modal-card{
  width: 100%;
  max-width: 560px;
  background:#fff;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  overflow:hidden;
}

.ttc-modal-head{
  padding: 12px;
  border-bottom: 1px solid #eee;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 8px;
}

.ttc-modal-title{
  font-weight: 800;
}

.ttc-modal-body{
  padding: 12px;
}

.ttc-quick-grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px){
  .ttc-quick-grid{
    grid-template-columns: 1fr;
  }
}

.ttc-alert{
  padding: 10px 12px;
  border: 1px solid #f0d2d2;
  background: #fff6f6;
  border-radius: 12px;
  margin-bottom: 10px;
}
