:root {
  --maniyar-green: #0F6E56;
  --maniyar-green-light: #E1F5EE;
  --maniyar-amber: #BA7517;
  --maniyar-amber-light: #FAEEDA;
  --maniyar-red: #A32D2D;
  --maniyar-red-light: #FCEBEB;
  --border: #E4E4E4;
}
body {
  background: #EFEFEF;
  font-family: Tahoma, Arial, sans-serif;
  margin: 0;
}
.phone-shell {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
  background: #FAFAFA;
  box-shadow: 0 0 24px rgba(0,0,0,0.08);
}
.phone-topbar {
  background: var(--maniyar-green);
  color: white;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.phone-topbar .brand { font-weight: bold; font-size: 18px; }
.phone-topbar .topbar-user { font-size: 13px; }
.logout-link { color: #D6F0E8; margin-right: 10px; text-decoration: underline; }
.phone-content { padding: 16px; padding-bottom: 40px; }

.card-soft {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.avatar-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--maniyar-green-light);
  color: var(--maniyar-green);
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 15px; flex-shrink: 0;
}
.avatar-img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border);
}
.role-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: bold;
}
.role-MANAGER { background: var(--maniyar-green-light); color: var(--maniyar-green); }
.role-OBSERVER { background: var(--maniyar-amber-light); color: var(--maniyar-amber); }
.role-RECEIVER { background: #EEEDFE; color: #3C3489; }

.btn-maniyar {
  background: var(--maniyar-green); color: white; border: none; border-radius: 10px;
  padding: 10px 16px; font-weight: bold;
}
.btn-maniyar:hover { background: #0c5945; color: white; }
.btn-outline-maniyar {
  border: 1px solid var(--maniyar-green); color: var(--maniyar-green); border-radius: 10px;
  background: white; padding: 9px 16px; font-weight: bold;
}

.tab-nav {
  display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.tab-nav a {
  padding: 8px 12px; font-size: 13px; text-decoration: none; color: #777;
  border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0;
}
.tab-nav a.active { color: var(--maniyar-green); border-bottom-color: var(--maniyar-green); font-weight: bold; }

.empty-state { text-align: center; color: #999; padding: 30px 10px; font-size: 13px; }
.alert-error { background: var(--maniyar-red-light); color: var(--maniyar-red); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.alert-success { background: var(--maniyar-green-light); color: var(--maniyar-green); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.invitation-card { background: var(--maniyar-amber-light); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }

.priority-LOW { background: #EEF2F5; color: #56707F; }
.priority-NORMAL { background: var(--maniyar-green-light); color: var(--maniyar-green); }
.priority-HIGH { background: var(--maniyar-amber-light); color: var(--maniyar-amber); }
.priority-URGENT { background: var(--maniyar-red-light); color: var(--maniyar-red); }

.status-pill {
  font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: bold; display: inline-block;
}
.status-UNASSIGNED, .status-OPEN { background: #EEF2F5; color: #56707F; }
.status-ASSIGNED { background: var(--maniyar-amber-light); color: var(--maniyar-amber); }
.status-ACCEPTED, .status-CONVERTED_TO_TASK { background: #E6ECFB; color: #3457B2; }
.status-IN_PROGRESS { background: #E1F0FB; color: #1B6FA8; }
.status-REPORT_REQUIRED { background: var(--maniyar-amber-light); color: var(--maniyar-amber); }
.status-COMPLETED, .status-RESOLVED { background: var(--maniyar-green-light); color: var(--maniyar-green); }
.status-CANCELLED { background: #EFEFEF; color: #8A8A8A; }

.overdue-flag { color: var(--maniyar-red); font-size: 11px; font-weight: bold; }

/* ===== Modern UI additions ===== */
.phone-topbar { background: linear-gradient(135deg, var(--maniyar-green) 0%, #0c5945 100%); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.92); transition: background .15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.15); color: white; }

.card-soft {
  box-shadow: 0 1px 3px rgba(16,24,20,0.05);
  transition: box-shadow .15s ease, transform .15s ease;
}
a.card-link { display: block; color: inherit; text-decoration: none; }
a.card-link .card-soft:hover { box-shadow: 0 6px 18px rgba(15,110,86,0.12); transform: translateY(-1px); }

.btn-maniyar {
  background: linear-gradient(135deg, var(--maniyar-green) 0%, #0c5945 100%);
  box-shadow: 0 2px 8px rgba(15,110,86,0.25);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-maniyar:hover { filter: brightness(1.05); }

.hero-panel {
  background: linear-gradient(135deg, var(--maniyar-green) 0%, #12876a 100%);
  border-radius: 18px; padding: 18px; color: white; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.hero-panel::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18), transparent 55%);
}
.hero-panel .hero-title { font-size: 17px; font-weight: bold; display: flex; align-items: center; gap: 8px; position: relative; }
.hero-panel .hero-sub { font-size: 12px; opacity: 0.9; margin-top: 4px; position: relative; }

.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px; background: white; color: var(--maniyar-green);
  border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 12px; font-weight: bold;
  cursor: pointer;
}

.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: bold;
  padding: 4px 10px; border-radius: 20px; background: var(--maniyar-green-light); color: var(--maniyar-green);
  margin: 0 4px 4px 0;
}
.chip-muted { background: #F1F1F1; color: #6B6B6B; }

.status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: bold; }
.status-dot.on { color: var(--maniyar-green); }
.status-dot.off { color: #A0A0A0; }

.rating-pill {
  display: inline-flex; align-items: center; gap: 4px; background: var(--maniyar-amber-light);
  color: var(--maniyar-amber); border-radius: 10px; padding: 3px 9px; font-weight: bold; font-size: 13px;
}

.avatar-ring {
  border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, var(--maniyar-green), #6FCBAE);
}
.avatar-ring > .avatar-circle, .avatar-ring > .avatar-img { border: 2px solid white; }

.icon-tile {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--maniyar-green-light); color: var(--maniyar-green);
  display: flex; align-items: center; justify-content: center;
}

.section-title {
  display: flex; align-items: center; gap: 7px; font-weight: bold; font-size: 14px; color: #2B2B2B;
}

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state .icon-tile { width: 52px; height: 52px; border-radius: 16px; }

.status-flag { display: inline-flex; align-items: center; gap: 5px; font-weight: bold; }
.status-flag.flag-critical { color: var(--maniyar-red); }
.status-flag.flag-warning { color: var(--maniyar-amber); }
.status-flag.flag-good { color: var(--maniyar-green); }

.stat-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-strip .chip { margin: 0; }

.role-icon-tile {
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
