/* GBWA Red Alert – light theme only */
.gra-scope {
  --sf: #C97A1E; --br: #A6531A; --cr: #FFFDF7; --cr2: #FFF6E8; --tx: #3a2c1a; --ln: #EBCB97; --red: #C62828; --redbg: #FFF1F0;
  font-family: 'Noto Sans Telugu', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tx); line-height: 1.5; -webkit-tap-highlight-color: transparent;
}
.gra-scope *, .gra-scope *::before, .gra-scope *::after { box-sizing: border-box; }
body.gra-noscroll { overflow: hidden; }

#gra-app { max-width: 1040px; margin: 0 auto; padding: 14px; border-radius: 22px; background: linear-gradient(180deg, var(--cr2), var(--cr)); border: 2px solid var(--ln); }
.gra-scope .gra-top { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.gra-scope .gra-lang { display: flex; gap: 6px; }
.gra-scope .gra-lang button { border: 2px solid var(--sf); background: #fff; color: var(--br); font-weight: 800; font-size: 13px; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.gra-scope .gra-lang button.on { background: var(--sf); color: #fff; }

/* ---------- Red alert banner ---------- */
.gra-scope .gra-alert {
  position: relative; padding: 14px 52px 14px 16px; border-radius: 18px; background: var(--redbg);
  border: 2px solid #E57373; border-left: 8px solid var(--red); box-shadow: 0 6px 18px rgba(198, 40, 40, .12);
  animation: graPulse 2.4s ease-in-out 3;
}
.gra-scope .gra-h1 {
  margin: 0; font-size: clamp(17px, 3.6vw, 24px); font-weight: 800; color: var(--red); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35;
}
.gra-scope .gra-short { margin: 4px 0 8px; font-weight: 700; font-size: 14.5px; color: #5a2a1a; }
.gra-scope .gra-readmore { font-family: inherit; font-size: 14px; font-weight: 800; color: #fff; background: var(--red); border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.gra-scope .gra-alert-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #E57373; background: #fff; color: var(--red); font-weight: 800; cursor: pointer; }
.gra-scope .gra-showalert { font-family: inherit; font-weight: 800; font-size: 13px; color: var(--red); background: var(--redbg); border: 2px solid #E57373; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
@keyframes graPulse { 0%, 100% { box-shadow: 0 6px 18px rgba(198, 40, 40, .12); } 50% { box-shadow: 0 6px 26px rgba(198, 40, 40, .35); } }

/* ---------- Layout: info left, application right ---------- */
.gra-scope .gra-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 760px) { .gra-scope .gra-grid { grid-template-columns: 1fr; } .gra-scope .gra-nav { order: -1; } }
.gra-scope .gra-info { background: #fff; border: 2px solid var(--ln); border-radius: 18px; padding: 14px 16px; }
.gra-scope .gra-info h2 { margin: 0 0 8px; font-size: 18px; color: var(--br); font-weight: 800; }
.gra-scope .gra-info ul { margin: 0; padding-left: 18px; }
.gra-scope .gra-info li { margin-bottom: 8px; font-weight: 700; font-size: 14.5px; }
.gra-scope .gra-org { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ln); font-size: 13px; font-weight: 700; color: #6b4a1f; }
.gra-scope .gra-org a { color: var(--br); }
.gra-scope .gra-nav { display: flex; flex-direction: column; gap: 14px; }
.gra-scope .gra-navbtn {
  font-family: inherit; font-size: 18px; font-weight: 800; padding: 16px; border-radius: 18px; cursor: pointer; text-align: center;
  border: 2px solid var(--sf); background: #fff; color: var(--br); box-shadow: 0 5px 0 #E6B676; transition: transform .15s, box-shadow .15s;
  opacity: 0; animation: graIn .5s ease forwards;
}
.gra-scope .gra-navbtn:nth-child(2) { animation-delay: .12s; }
.gra-scope .gra-navbtn:nth-child(3) { animation-delay: .24s; }
.gra-scope .gra-navbtn.gra-main { background: linear-gradient(135deg, #E59A35, var(--sf) 55%, var(--br)); color: #fff; border-color: var(--br); box-shadow: 0 5px 0 #8A4214; }
.gra-scope .gra-navbtn.gra-ghost { background: var(--cr2); }
.gra-scope .gra-navbtn:hover { transform: translateY(-3px); }
.gra-scope .gra-navbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #E6B676; }
.gra-scope .gra-navbtn.gra-disabled { background: #EEE7DC; color: #8a7a66; border-color: #CFC3B0; box-shadow: none; cursor: not-allowed; font-size: 15px; }
@keyframes graIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Popups ---------- */
.gra-overlay { position: fixed; inset: 0; z-index: 999995; background: rgba(255, 236, 200, .85); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: graFade .2s ease; }
.gra-overlay + .gra-overlay { z-index: 999996; }
.gra-overlay + .gra-overlay + .gra-overlay { z-index: 999997; }
.gra-scope .gra-modal { width: 100%; max-width: 640px; max-height: 94vh; display: flex; flex-direction: column; background: var(--cr); border: 2px solid var(--sf); border-bottom: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(166, 83, 26, .25); animation: graUp .28s ease; }
.gra-overlay.gra-wide .gra-modal { max-width: 1150px; }
.gra-overlay.gra-alertpop .gra-modal { border-color: #E57373; max-width: 760px; }
.gra-overlay.gra-alertpop .gra-mhead { background: var(--redbg); }
.gra-overlay.gra-alertpop .gra-mhead h3 { color: var(--red); }
@media (min-width: 700px) { .gra-overlay { align-items: center; padding: 20px; } .gra-scope .gra-modal { border-radius: 24px; border-bottom: 2px solid var(--sf); max-height: 90vh; } .gra-overlay.gra-alertpop .gra-modal { border-bottom-color: #E57373; } }
.gra-scope .gra-mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 2px solid var(--ln); background: linear-gradient(90deg, #FFF1D6, var(--cr)); border-radius: 22px 22px 0 0; }
.gra-scope .gra-mhead h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--br); line-height: 1.3; }
.gra-scope .gra-x { border: 2px solid var(--sf); background: #fff; color: var(--br); width: 38px; height: 38px; border-radius: 50%; font-size: 17px; font-weight: 800; cursor: pointer; flex: 0 0 auto; }
.gra-scope .gra-mbody { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes graFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes graUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Alert full text */
.gra-scope .gra-alerttext p { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; }
.gra-scope .gra-alerttext h4 { margin: 4px 0 6px; font-size: 16.5px; font-weight: 800; color: var(--red); }
.gra-scope .gra-alerttext .gra-li { padding: 6px 10px; margin: 4px 0; background: var(--cr2); border-left: 4px solid var(--sf); border-radius: 8px; font-weight: 700; }
.gra-scope .gra-gap { height: 10px; }
.gra-scope .gra-contact { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--ln); font-weight: 800; }
.gra-scope .gra-contact a { color: var(--br); }

/* ---------- Form ---------- */
.gra-scope .gra-privacy { padding: 10px 12px; border-radius: 12px; background: #E8F5E9; border: 2px solid #9CCC9F; color: #1B5E20; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.gra-scope .gra-sh { margin: 16px 0 10px; font-size: 16px; color: var(--br); font-weight: 800; border-bottom: 2px solid var(--ln); padding-bottom: 6px; }
.gra-scope .gra-field { margin-bottom: 12px; }
.gra-scope .gra-field > label { display: block; font-size: 14px; font-weight: 800; color: var(--br); margin-bottom: 5px; }
.gra-scope .gra-in { width: 100%; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--tx); padding: 11px 12px; border: 2px solid var(--ln); border-radius: 12px; background: #fff; outline: none; }
.gra-scope .gra-in:focus { background: #FFF9C4; color: var(--tx); font-weight: 700; border-color: var(--sf); box-shadow: 0 0 0 3px rgba(201, 122, 30, .2); }
.gra-scope .gra-in::placeholder { color: #a8916e; font-weight: 600; }
.gra-scope .gra-ro { background: var(--cr2); color: var(--tx); }
.gra-scope textarea.gra-in { resize: vertical; }
.gra-scope .gra-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gra-scope .gra-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .gra-scope .gra-two, .gra-scope .gra-three { grid-template-columns: 1fr; } }
.gra-scope .gra-dobrow { display: flex; gap: 10px; align-items: center; }
.gra-scope .gra-dobrow .gra-in { flex: 1; }
.gra-scope .gra-age { font-weight: 800; color: #2E7D32; white-space: nowrap; }
.gra-scope .gra-age.on { background: #E8F5E9; border: 2px solid #9CCC9F; border-radius: 10px; padding: 8px 12px; }
.gra-scope .gra-pinmsg { font-size: 13px; font-weight: 800; color: #8a6532; min-height: 18px; margin-top: 3px; }
.gra-scope .gra-pinmsg.ok { color: #2E7D32; }
.gra-scope .gra-pinmsg.bad { color: var(--red); }
.gra-scope .gra-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gra-scope .gra-chip { font-family: inherit; font-size: 14.5px; font-weight: 800; color: var(--tx); padding: 9px 13px; border-radius: 999px; border: 2px solid var(--ln); background: #fff; cursor: pointer; }
.gra-scope .gra-chip.on { background: var(--sf); color: #fff; border-color: var(--br); }
.gra-scope .gra-file { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 14px; border: 2px dashed var(--sf); border-radius: 12px; background: #fff; font-weight: 800; color: var(--br); }
.gra-scope .gra-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gra-scope .gra-prev { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 700; }
.gra-scope .gra-prev img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ln); }
.gra-scope .gra-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; font-size: 14px; margin: 14px 0 6px; padding: 10px 12px; border-radius: 12px; background: #FFF9C4; border: 1px solid #F2C76B; }
.gra-scope .gra-check input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--sf); margin-top: 2px; }
.gra-scope .gra-err { color: var(--red); font-weight: 800; font-size: 14px; min-height: 20px; margin: 6px 0; }
.gra-scope .gra-primary, .gra-scope .gra-sec { display: block; width: 100%; text-align: center; text-decoration: none; font-family: inherit; cursor: pointer; font-size: 16.5px; font-weight: 800; padding: 13px; border-radius: 14px; margin-top: 8px; }
.gra-scope .gra-primary { color: #fff; border: 2px solid var(--br); background: linear-gradient(135deg, #E59A35, var(--sf) 55%, var(--br)); box-shadow: 0 4px 0 #8A4214; }
.gra-scope .gra-primary[disabled] { opacity: .65; }
.gra-scope .gra-sec { color: var(--br); border: 2px solid var(--sf); background: #fff; }
.gra-scope .gra-wa { background: linear-gradient(135deg, #43C463, #2E9E4C); border-color: #237A3A; box-shadow: 0 4px 0 #1C6630; }
.gra-scope .gra-muted { color: #8a7454; font-weight: 700; font-size: 14px; padding: 8px 0; text-align: center; }

.gra-scope .gra-success { text-align: center; }
.gra-scope .gra-okicon { font-size: 52px; }
.gra-scope .gra-success h3 { margin: 4px 0; font-size: 22px; color: var(--br); }
.gra-scope .gra-ref { font-size: 17px; font-weight: 700; margin: 6px 0; }
.gra-scope .gra-ref b { color: var(--br); font-size: 20px; }
.gra-scope .gra-okmsg { margin: 8px 0 12px; padding: 12px 14px; border-radius: 14px; background: #E8F5E9; border: 2px solid #9CCC9F; color: #1B5E20; font-weight: 800; }

/* ---------- Board ---------- */
.gra-scope .gra-boardnote { padding: 10px 12px; border-radius: 12px; background: #E3F2FD; border: 2px solid #90C2EE; color: #0D47A1; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.gra-scope .gra-bsearch { margin-bottom: 10px; }
.gra-scope .gra-bcard { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--ln); border-radius: 16px; background: #fff; margin-bottom: 10px; }
.gra-scope .gra-bicon { font-size: 28px; }
.gra-scope .gra-bmain { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
@media (max-width: 560px) { .gra-scope .gra-bcard { flex-wrap: wrap; } .gra-scope .gra-bmain { flex-basis: calc(100% - 52px); } .gra-scope .gra-bcard .gra-badge { margin-left: 52px; } }
.gra-scope .gra-bmain b { font-size: 16px; color: var(--br); }
.gra-scope .gra-bmain small { color: #8a6532; }
.gra-scope .gra-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid; text-align: center; }
.gra-scope .b-pen { background: #FFF8E1; color: #A86A00; border-color: #F2C76B; }
.gra-scope .b-ver { background: #E3F2FD; color: #1565C0; border-color: #90C2EE; }
.gra-scope .b-fwd { background: #F3E5F5; color: #7B1FA2; border-color: #CE93D8; }
.gra-scope .b-clo { background: #ECEFF1; color: #455A64; border-color: #B0BEC5; }
.gra-scope .b-rej { background: #FFEBEE; color: var(--red); border-color: #EF9A9A; }
.gra-scope .b-pub { background: #E8F5E9; color: #2E7D32; border-color: #9CCC9F; }

/* ---------- Admin ---------- */
.gra-scope .gra-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin-bottom: 12px; }
.gra-scope .gra-stat { border: 2px solid var(--ln); border-radius: 14px; padding: 8px; text-align: center; background: #fff; }
.gra-scope .gra-stat b { display: block; font-size: 22px; font-weight: 800; }
.gra-scope .gra-stat span { font-size: 12px; font-weight: 800; }
.gra-scope .gra-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.gra-scope .gra-tb { font-family: inherit; font-size: 13.5px; font-weight: 800; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--sf); background: #fff; color: var(--br); cursor: pointer; }
.gra-scope .gra-tb:hover { background: #FFF1D6; }
.gra-scope .gra-tb.is-live { background: #FFEBEE; border-color: #E57373; color: var(--red); }
.gra-scope .gra-tb.is-stopped { background: #E8F5E9; border-color: #81C784; color: #2E7D32; }
.gra-scope .gra-editapp { background: #FFF9C4; }
.gra-scope .gra-adminnote { font-size: 13px; font-weight: 700; color: #0D47A1; background: #E3F2FD; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.gra-scope .gra-filter { display: grid; grid-template-columns: 1fr 220px; gap: 8px; margin: 6px 0 10px; }
@media (max-width: 560px) { .gra-scope .gra-filter { grid-template-columns: 1fr; } }
.gra-scope .gra-tablewrap { overflow-x: auto; border: 2px solid var(--ln); border-radius: 14px; background: #fff; }
.gra-scope .gra-table { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 13.5px; }
.gra-scope .gra-table th { background: #FFF1D6; color: var(--br); font-weight: 800; text-align: left; padding: 9px 8px; border-bottom: 2px solid var(--ln); white-space: nowrap; }
.gra-scope .gra-table td { padding: 8px; border-bottom: 1px solid #F3E3C6; font-weight: 700; vertical-align: middle; }
.gra-scope .gra-table td small { color: #8a6532; }
.gra-scope .gra-table tr.sel td { background: #FFF9C4; }
.gra-scope .gra-table a { color: var(--br); }
.gra-scope .gra-table input[type=checkbox], .gra-scope .gra-all { width: 18px; height: 18px; accent-color: var(--sf); }
.gra-scope .gra-kv { border: 2px solid var(--ln); border-radius: 14px; padding: 10px 12px; background: #fff; margin-bottom: 10px; }
.gra-scope .gra-kv h4 { margin: 0 0 6px; color: var(--br); font-size: 15px; }
.gra-scope .gra-kv div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #F3E3C6; font-size: 14px; }
.gra-scope .gra-kv div:last-of-type { border-bottom: 0; }
.gra-scope .gra-kv span { color: #8a6532; font-weight: 700; }
.gra-scope .gra-kv b { text-align: right; }
.gra-scope .gra-desc { margin: 8px 0 0; padding: 8px 10px; background: var(--cr2); border-radius: 10px; font-weight: 600; white-space: pre-wrap; }
.gra-scope .gra-fileview img { max-width: 100%; border-radius: 12px; border: 2px solid var(--ln); margin-top: 10px; }
.gra-scope .gra-svtbl { width: 100%; border-collapse: collapse; }
.gra-scope .gra-svtbl th { text-align: left; font-size: 13px; color: var(--br); padding: 4px; }
.gra-scope .gra-svtbl td { padding: 4px; }
.gra-scope .gra-svtbl td:last-child { width: 46px; }
.gra-scope .gra-del { width: 38px; height: 38px; border-radius: 10px; border: 2px solid #EF9A9A; background: #FFEBEE; color: var(--red); font-weight: 800; cursor: pointer; }

/* ---------- Toast ---------- */
.gra-toast { position: fixed; left: 50%; bottom: 24px; z-index: 999999; transform: translate(-50%, 30px); opacity: 0; transition: all .3s; background: var(--cr); border: 2px solid var(--sf); color: var(--tx); font-weight: 800; padding: 12px 18px; border-radius: 14px; box-shadow: 0 8px 24px rgba(166, 83, 26, .25); max-width: 90vw; text-align: center; }
.gra-toast.gra-bad { border-color: #E57373; color: var(--red); background: #FFF5F5; }
.gra-toast.gra-show { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .gra-scope *, .gra-scope { animation: none !important; transition: none !important; }
  .gra-scope .gra-navbtn { opacity: 1; }
}
