
:root{
  --ttm-red:#d71920;
  --ttm-red-dark:#8f0b0f;
  --ttm-dark:#151922;
  --ttm-text:#222831;
  --ttm-muted:#667085;
  --ttm-line:#e6e8ec;
  --ttm-bg:#f5f6f8;
  --ttm-green:#25d366;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  font-size:16px;
  line-height:1.5;
  color:var(--ttm-text);
  background:var(--ttm-bg);
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}

.topbar{
  position:sticky;
  top:0;
  z-index:100;
  background:linear-gradient(135deg,var(--ttm-red),var(--ttm-red-dark));
  box-shadow:0 4px 18px rgba(0,0,0,.18);
}
.topbar .inner{
  max-width:1200px;
  margin:0 auto;
  min-height:88px;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.logo-wrap{
  width:172px;
  height:58px;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.brand-logo{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.brand-text{
  min-width:0;
}
.brand-text h1{
  margin:0;
  color:#fff;
  font-size:1.15rem;
  line-height:1.15;
}
.brand-text small{
  color:#ffe9e9;
  display:block;
  margin-top:4px;
  font-size:.88rem;
}
.actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.btn,button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.topbar .btn{
  color:#fff;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.28);
}
.topbar .btn:hover{background:rgba(255,255,255,.2)}
.topbar .btn.primary{
  background:#fff;
  color:var(--ttm-red-dark);
}

.container{
  width:min(1120px,calc(100% - 32px));
  margin:28px auto;
}
.card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:22px;
  margin-bottom:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
}
.hero{
  padding:34px;
  border-radius:20px;
  background:linear-gradient(135deg,var(--ttm-red),var(--ttm-red-dark));
  color:#fff;
  box-shadow:0 18px 44px rgba(143,11,15,.22);
}
.hero h2{
  margin:0 0 10px;
  font-size:clamp(1.55rem,2.5vw,2.2rem);
}
.hero p{
  margin:0;
  max-width:760px;
  color:#ffecec;
}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}
.hero-actions .btn{
  background:#fff;
  color:var(--ttm-red-dark);
}
.hero-actions .btn.outline{
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.6);
}

.portal-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:18px 0;
}
.portal-card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:15px;
  padding:18px;
}
.portal-card .icon{font-size:1.7rem}
.portal-card h3{margin:10px 0 6px}
.portal-card p{margin:0 0 14px;color:var(--ttm-muted)}
.portal-card .btn{background:var(--ttm-red);color:#fff}

.service-shell{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 34px rgba(0,0,0,.07);
}
.service-hero{
  padding:24px 28px;
  background:linear-gradient(135deg,#fff,#fff4f4);
  border-bottom:1px solid #f0dada;
}
.service-hero h2{margin:0 0 7px}
.service-hero p{margin:0;color:var(--ttm-muted)}
.service-body{padding:28px}
.section-title{
  margin:0 0 16px;
  font-size:1.05rem;
  padding-bottom:9px;
  border-bottom:2px solid #f3d4d4;
}
.form-grid,.row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px 18px;
}
.form-full{grid-column:1/-1}
label{
  display:block;
  margin:0 0 7px;
  font-weight:800;
}
.required{color:var(--ttm-red)}
input,select,textarea{
  width:100%;
  min-height:46px;
  padding:12px 13px;
  border:1px solid #d4d9df;
  border-radius:10px;
  background:#fff;
  color:var(--ttm-text);
  font:inherit;
}
textarea{
  min-height:138px;
  resize:vertical;
}
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:var(--ttm-red);
  box-shadow:0 0 0 3px rgba(215,25,32,.1);
}
.upload-box{
  border:2px dashed #e4bcbc;
  background:#fffafa;
  padding:16px;
  border-radius:12px;
}
.helper,.note{
  color:var(--ttm-muted);
  font-size:.88rem;
}
.submit-row{margin-top:20px}
.submit-row button{
  width:100%;
  background:linear-gradient(135deg,var(--ttm-red),var(--ttm-red-dark));
  color:#fff;
}

.track-choice{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.track-panel{
  border:1px solid var(--ttm-line);
  border-radius:14px;
  padding:18px;
  background:#fff;
}
.track-panel h3{margin-top:0}

.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{
  text-align:left;
  padding:12px;
  border-bottom:1px solid var(--ttm-line);
  vertical-align:top;
}
th{background:#f8fafc}
.badge{
  display:inline-block;
  padding:5px 9px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:800;
}
.badge.pending{background:#fef3c7;color:#92400e}
.badge.assigned{background:#dbeafe;color:#1e40af}
.badge.in_progress{background:#e0e7ff;color:#3730a3}
.badge.completed{background:#dcfce7;color:#166534}
.badge.cancelled{background:#fee2e2;color:#991b1b}
.alert{
  padding:13px 15px;
  border-radius:10px;
  margin-bottom:14px;
}
.alert.success{background:#dcfce7;color:#166534}
.alert.error{background:#fee2e2;color:#991b1b}
.btn.red,button{background:var(--ttm-red);color:#fff}
.btn.secondary{background:#4b5563;color:#fff}
.btn.green{background:#15803d;color:#fff}

.footer{
  background:var(--ttm-dark);
  color:#d1d5db;
  margin-top:36px;
}
.footer-inner{
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  padding:30px 0;
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:26px;
}
.footer h3,.footer a{color:#fff}
.whatsapp-float{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:120;
  background:var(--ttm-green);
  color:#fff;
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
  box-shadow:0 8px 24px rgba(0,0,0,.24);
}

@media(max-width:960px){
  .topbar .inner{align-items:flex-start;flex-direction:column}
  .actions{justify-content:flex-start}
  .portal-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .container{width:min(100% - 20px,1120px);margin:16px auto}
  .logo-wrap{width:145px;height:50px}
  .brand-text h1{font-size:1rem}
  .portal-cards,.form-grid,.row,.track-choice,.footer-inner{grid-template-columns:1fr}
  .form-full{grid-column:auto}
  .hero{padding:24px 18px}
  .service-body,.service-hero{padding:20px 16px}
  .actions{width:100%}
  .topbar .btn{flex:1 1 auto}
  .whatsapp-float{right:12px;bottom:12px}
}


/* V1.4 Active menu and breadcrumb */
.topbar .btn.active{
  background:#fff;
  color:var(--ttm-red-dark);
  border-color:#fff;
  box-shadow:0 0 0 3px rgba(255,255,255,.18),0 7px 18px rgba(0,0,0,.16);
}
.topbar .btn:not(.active):hover{
  transform:translateY(-1px);
}
.breadcrumb-bar{
  background:#fff;
  border-bottom:1px solid var(--ttm-line);
  box-shadow:0 3px 12px rgba(0,0,0,.03);
}
.breadcrumb-inner{
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  padding:11px 0;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--ttm-muted);
  font-size:.92rem;
}
.breadcrumb-inner a{
  color:var(--ttm-red-dark);
  font-weight:800;
}
.breadcrumb-separator{
  color:#9ca3af;
}

/* V1.4 Admin dashboard statistic cards */
.admin-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:18px;
}
.admin-stat-card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:20px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
  position:relative;
  overflow:hidden;
}
.admin-stat-card::after{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:5px;
  background:#9ca3af;
}
.admin-stat-card.pending::after{background:#f59e0b}
.admin-stat-card.assigned::after{background:#3b82f6}
.admin-stat-card.in_progress::after{background:#6366f1}
.admin-stat-card.completed::after{background:#16a34a}
.admin-stat-label{
  color:var(--ttm-muted);
  font-weight:800;
  margin-bottom:8px;
}
.admin-stat-number{
  font-size:2.15rem;
  font-weight:900;
  line-height:1;
}
.admin-stat-icon{
  position:absolute;
  right:17px;
  top:16px;
  font-size:1.55rem;
}
@media(max-width:900px){
  .admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .admin-stat-grid{grid-template-columns:1fr}
}


/* V2.0 Operations */
.timeline{position:relative;margin:18px 0;padding-left:28px}
.timeline::before{content:"";position:absolute;left:9px;top:4px;bottom:4px;width:2px;background:#e5e7eb}
.timeline-item{position:relative;margin-bottom:18px}
.timeline-item::before{content:"";position:absolute;left:-24px;top:4px;width:12px;height:12px;border-radius:50%;background:#d71920;box-shadow:0 0 0 4px #fee2e2}
.timeline-item h4{margin:0 0 4px}.timeline-item small{color:#6b7280}.timeline-item p{margin:5px 0 0}
.metric-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px}
.metric-card{background:#fff;border:1px solid var(--ttm-line);border-radius:16px;padding:18px;box-shadow:0 8px 20px rgba(0,0,0,.04)}
.metric-card span{color:var(--ttm-muted);font-weight:700}.metric-card strong{display:block;font-size:1.8rem;margin-top:7px}
.rating-row{display:flex;gap:8px;flex-wrap:wrap}.rating-row label{font-weight:normal}.rating-row input{width:auto;min-height:auto}
@media(max-width:1000px){.metric-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.metric-grid{grid-template-columns:1fr}}


/* V2.1 Dashboard and Feedback Marketing */
.dashboard-kpi-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:0 0 18px !important;
}
.dashboard-kpi{
  display:block !important;
  min-height:118px;
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}
.dashboard-kpi .kpi-label{
  display:block;
  color:var(--ttm-muted);
  font-weight:800;
  font-size:.92rem;
}
.dashboard-kpi .kpi-value{
  display:block;
  margin-top:10px;
  font-size:2rem;
  font-weight:900;
  line-height:1.1;
}
.dashboard-kpi .kpi-note{
  display:block;
  margin-top:5px;
  color:var(--ttm-muted);
  font-size:.82rem;
}

.feedback-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.feedback-summary-card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}
.feedback-summary-card span{color:var(--ttm-muted);font-weight:800}
.feedback-summary-card strong{display:block;font-size:1.85rem;margin-top:7px}

.stars{
  color:#f59e0b;
  letter-spacing:2px;
  white-space:nowrap;
}
.rating-bars{display:grid;gap:9px}
.rating-bar-row{
  display:grid;
  grid-template-columns:78px 1fr 56px;
  align-items:center;
  gap:10px;
}
.rating-bar{
  height:10px;
  background:#eef0f3;
  border-radius:999px;
  overflow:hidden;
}
.rating-bar-fill{
  height:100%;
  background:linear-gradient(90deg,#f59e0b,#fbbf24);
  border-radius:999px;
}

.feedback-comment{
  max-width:430px;
  white-space:normal;
  line-height:1.45;
}
.marketing-status{
  display:inline-block;
  border-radius:999px;
  padding:5px 9px;
  font-size:.8rem;
  font-weight:800;
}
.marketing-status.approved{background:#dcfce7;color:#166534}
.marketing-status.pending{background:#fef3c7;color:#92400e}
.marketing-status.no-consent{background:#f3f4f6;color:#4b5563}

.testimonial-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.testimonial-card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:20px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}
.testimonial-card blockquote{
  margin:12px 0;
  font-size:1.02rem;
  line-height:1.6;
}
.testimonial-card .customer{
  color:var(--ttm-muted);
  font-weight:800;
}
.consent-box{
  border:1px solid #dfe3e8;
  border-radius:12px;
  background:#f9fafb;
  padding:14px;
}
.consent-box input{width:auto;min-height:auto}

@media(max-width:1050px){
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .feedback-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .testimonial-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  .dashboard-kpi-grid,
  .feedback-summary-grid,
  .testimonial-grid{grid-template-columns:1fr !important}
  .rating-bar-row{grid-template-columns:70px 1fr 45px}
}


/* V2.1.2 Public Customer Reviews */
.review-history-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:18px 0;
}
.review-summary-card{
  background:#fff;
  border:1px solid var(--ttm-line);
  border-radius:16px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
  text-align:center;
}
.review-summary-card strong{
  display:block;
  font-size:1.85rem;
  margin-top:6px;
}
.review-summary-card span{
  color:var(--ttm-muted);
  font-weight:800;
}
.review-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--ttm-muted);
  font-size:.86rem;
  margin-top:10px;
}
.review-badge{
  display:inline-block;
  background:#f3f4f6;
  color:#374151;
  padding:5px 8px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:800;
}
@media(max-width:700px){
  .review-history-summary{grid-template-columns:1fr}
}
