/* GRA Agent Portal — front-end styles */
:root {
  --grp-green:   #006B3F;
  --grp-gold:    #FCD116;
  --grp-red:     #CE1126;
  --grp-bg:      #F3F4F6;
  --grp-card:    #FFFFFF;
  --grp-border:  #E5E7EB;
  --grp-text:    #111827;
  --grp-muted:   #6B7280;
  --grp-radius:  12px;
}

.grp-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--grp-text);
}

/* ── Login ─────────────────────────────────────────────────────── */
.grp-login-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.grp-login-card {
  width: 100%; max-width: 420px;
  background: var(--grp-card);
  border: 1px solid var(--grp-border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.grp-login-header { text-align: center; margin-bottom: 28px; }
.grp-logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--grp-green); color: var(--grp-gold);
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  margin-bottom: 14px;
}
.grp-logo-badge--sm { width: 40px; height: 40px; font-size: 13px; margin-bottom: 0; }
.grp-login-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--grp-text); }
.grp-login-sub   { font-size: 13px; color: var(--grp-muted); margin: 0; }
.grp-login-form  { display: flex; flex-direction: column; gap: 16px; }
.grp-login-footer { text-align: center; margin-top: 16px; font-size: 13px; }
.grp-login-footer a { color: var(--grp-green); text-decoration: none; }

/* ── Notices ────────────────────────────────────────────────────── */
.grp-notice {
  padding: 12px 16px; border-radius: 8px; font-size: 13px;
  margin-bottom: 16px; font-weight: 500;
}
.grp-notice--success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.grp-notice--error   { background: #FEE2E2; color: #7F1D1D; border: 1px solid #FCA5A5; }
.grp-notice--warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

/* ── Fields ─────────────────────────────────────────────────────── */
.grp-field {
  display: flex; flex-direction: column; gap: 5px;
  position: relative;
}
.grp-field label { font-size: 13px; font-weight: 600; color: #374151; }
.grp-field label span { color: var(--grp-red); }
.grp-field input, .grp-field select, .grp-field textarea {
  padding: 11px 14px; border: 1.5px solid var(--grp-border); border-radius: 8px;
  font-size: 15px; color: var(--grp-text); background: #fff;
  outline: none; width: 100%; box-sizing: border-box; transition: border-color .15s;
}
.grp-field input:focus, .grp-field select:focus, .grp-field textarea:focus {
  border-color: var(--grp-green);
}
.grp-field textarea { resize: vertical; min-height: 70px; }
.grp-eye {
  position: absolute; right: 12px; bottom: 10px;
  background: none; border: none; cursor: pointer; font-size: 16px; padding: 0;
}
.grp-field--full { grid-column: 1 / -1; }

/* ── Buttons ────────────────────────────────────────────────────── */
.grp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 2px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.grp-btn--primary { background: var(--grp-green); color: #fff; border-color: var(--grp-green); }
.grp-btn--primary:hover { background: #00562F; border-color: #00562F; }
.grp-btn--outline { background: transparent; color: var(--grp-green); border-color: var(--grp-green); }
.grp-btn--outline:hover { background: #F0FDF4; }
.grp-btn--full { width: 100%; }
.grp-btn--sm { padding: 7px 14px; font-size: 12px; }

/* ── Header ─────────────────────────────────────────────────────── */
.grp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--grp-green); border-radius: var(--grp-radius);
  margin-bottom: 16px; color: #fff;
}
.grp-header__left { display: flex; align-items: center; gap: 12px; }
.grp-header__name { font-size: 15px; font-weight: 700; margin: 0; color: #fff; }
.grp-header__role { font-size: 12px; margin: 0; color: rgba(255,255,255,.65); }

/* ── Tabs ───────────────────────────────────────────────────────── */
.grp-tabs {
  display: flex; gap: 4px; overflow-x: auto;
  background: var(--grp-card); border: 1px solid var(--grp-border);
  border-radius: var(--grp-radius); padding: 6px; margin-bottom: 16px;
  scrollbar-width: none;
}
.grp-tabs::-webkit-scrollbar { display: none; }
.grp-tab {
  flex: 1; min-width: fit-content; padding: 9px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--grp-muted);
  text-decoration: none; text-align: center; white-space: nowrap;
  transition: all .15s;
}
.grp-tab.active { background: var(--grp-green); color: #fff; }
.grp-tab:hover:not(.active) { background: var(--grp-bg); color: var(--grp-text); }

/* ── Content area ───────────────────────────────────────────────── */
.grp-content { padding-bottom: 48px; }

/* ── Dashboard stats ────────────────────────────────────────────── */
.grp-stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.grp-stat {
  background: var(--grp-card); border: 1px solid var(--grp-border);
  border-radius: var(--grp-radius); padding: 14px 10px;
  text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.grp-stat--warn .grp-stat__val { color: var(--grp-red); }
.grp-stat__val { font-size: 22px; font-weight: 800; color: var(--grp-green); line-height: 1; }
.grp-stat__lbl { font-size: 11px; color: var(--grp-muted); font-weight: 500; }

.grp-hero-collected {
  background: linear-gradient(135deg, var(--grp-green), #003D24);
  border-radius: var(--grp-radius); padding: 20px; text-align: center; margin-bottom: 16px;
}
.grp-hero__label  { color: rgba(255,255,255,.7); font-size: 13px; margin-bottom: 4px; }
.grp-hero__amount { color: var(--grp-gold); font-size: 32px; font-weight: 800; }

.grp-quick-btns  { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.grp-quick-btns .grp-btn { flex: 1; min-width: 140px; }

/* ── Tab headers ────────────────────────────────────────────────── */
.grp-tab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.grp-section-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--grp-text); }

/* ── Lists ──────────────────────────────────────────────────────── */
.grp-list { display: flex; flex-direction: column; gap: 8px; }
.grp-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--grp-card); border: 1px solid var(--grp-border);
  border-radius: 10px; padding: 14px; cursor: default;
}
.grp-list-item__main { flex: 1; overflow: hidden; }
.grp-list-item__main strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-list-item__sub { font-size: 12px; color: var(--grp-muted); margin-top: 2px; }
.grp-badge {
  font-size: 11px; background: #F3F4F6; color: #374151;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.grp-form { background: var(--grp-card); border: 1px solid var(--grp-border); border-radius: var(--grp-radius); padding: 20px; }
.grp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.grp-form-footer { display: flex; gap: 10px; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--grp-border); }

.grp-empty { color: var(--grp-muted); text-align: center; padding: 32px 0; font-size: 14px; }
.grp-empty a { color: var(--grp-green); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .grp-stat-row { grid-template-columns: repeat(2, 1fr); }
  .grp-form-grid { grid-template-columns: 1fr; }
  .grp-hero__amount { font-size: 26px; }
  .grp-tabs { justify-content: flex-start; }
}

/* v6.1.0 — central taxpayer search and mobile portal refinements */
.grp-section-sub {
  margin: -6px 0 12px;
  color: var(--grp-muted);
  font-size: 12px;
  line-height: 1.5;
}
.grp-tab-header--spaced { margin-top: 24px; }
.grp-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 20px;
  padding: 12px;
  background: var(--grp-card);
  border: 1px solid var(--grp-border);
  border-radius: var(--grp-radius);
}
.grp-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--grp-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.grp-search input[type="search"]:focus { border-color: var(--grp-green); outline: none; }
.grp-list-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.grp-mini-label {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  font-size: 10px;
  font-weight: 700;
}
.grp-mini-label--system { background: #F3F4F6; color: #4B5563; }
.grp-empty--boxed {
  background: var(--grp-card);
  border: 1px dashed var(--grp-border);
  border-radius: var(--grp-radius);
  padding: 24px 16px;
  margin-bottom: 18px;
}
.grp-selected-record {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #A7F3D0;
  border-radius: var(--grp-radius);
  background: #ECFDF5;
}
.grp-selected-record span { color: #047857; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.grp-selected-record strong { font-size: 15px; }
.grp-selected-record small { color: var(--grp-muted); }
.grp-selected-record a { color: var(--grp-green); font-size: 12px; font-weight: 600; margin-top: 3px; }

@media (max-width: 480px) {
  .grp-wrap { padding: 12px; }
  .grp-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .grp-tab { min-width: 0; padding: 10px 6px; font-size: 12px; }
  .grp-tab-header { align-items: flex-start; gap: 10px; }
  .grp-tab-header > div { min-width: 0; }
  .grp-search { align-items: stretch; flex-wrap: wrap; }
  .grp-search input[type="search"] { flex-basis: 100%; width: 100%; }
  .grp-search .grp-btn { flex: 1; }
  .grp-list-item--stack-mobile { align-items: flex-start; flex-direction: column; }
  .grp-list-actions { width: 100%; justify-content: flex-start; }
  .grp-list-actions .grp-btn { flex: 1; }
  .grp-header { padding: 13px 14px; }
}

/* Payment controls — v7.1.1 */
.grp-payment-actions{min-width:320px;display:flex;flex-direction:column;gap:8px;align-items:stretch}
.grp-payment-form{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:nowrap}
.grp-payment-amount{width:170px!important;min-width:170px;height:44px;border:1px solid #d7dfda;border-radius:9px;padding:9px 12px;background:#fff;font-size:15px}
.grp-payment-form .grp-btn{min-width:118px;white-space:nowrap}
@media(max-width:720px){.grp-payment-actions{min-width:0;width:100%}.grp-payment-form{justify-content:stretch;flex-wrap:wrap}.grp-payment-amount{width:100%!important;min-width:150px;flex:1 1 160px}.grp-payment-form .grp-btn{flex:1 1 120px}}

/* Property form control sizing — v7.2.2 */
.grp-field input[name="monthly_rent"],
.grp-field input[type="number"][name="monthly_rent"]{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:46px!important;
  min-height:46px!important;
  padding:11px 14px!important;
  box-sizing:border-box!important;
  font-size:15px!important;
}
