/* Global India Bio-Plantech — internal operations app (login + staff console).
   Loaded after style.css, so it reuses the same design tokens. */

/* ---------------------------------------------------------------- login */
.auth-page { background: var(--forest-900); min-height: 100vh; }
.auth { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.auth__card {
  width: min(100%, 560px); background: var(--paper); border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow-l);
}
.auth__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-bottom: 1.6rem; }
.auth h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: .4rem; }
.auth__sub { font-size: 1rem; margin: 1.4rem 0 .7rem; }
.auth__hint { font-size: .93rem; color: var(--ink-3); }
.auth__submit { width: 100%; margin-top: 1.1rem; }
.auth__back { margin: 1.2rem 0 0; text-align: center; font-size: .9rem; }
.auth__back a { color: var(--ink-3); text-decoration: none; }
.auth__back a:hover { color: var(--leaf-600); }
.auth form .field { margin-bottom: .9rem; }
/* Helper text belongs under its input, not beside it. */
.field .form-note { display: block; margin-top: .3rem; }
.auth__msg {
  margin-top: .9rem; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem;
  background: #fdecea; border: 1px solid #f0bdb8; color: #b3261e;
}
.auth__msg--ok { background: #eaf5ee; border-color: #bcdcc8; color: #17603c; }
.auth__msg[hidden] { display: none; }

.rolepick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.2rem 0 1.4rem; }
@media (max-width: 460px) { .rolepick { grid-template-columns: 1fr; } }
.rolepick__btn {
  font: inherit; text-align: left; cursor: pointer; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  transition: border-color .16s ease, background .16s ease;
}
.rolepick__btn b { display: block; color: var(--forest); font-size: .95rem; }
.rolepick__btn span { display: block; font-size: .78rem; color: var(--ink-3); margin-top: .15rem; }
.rolepick__btn.is-active { border-color: var(--leaf); background: rgba(31,122,77,.06); }

/* ---------------------------------------------------------------- app shell */
.app-page { background: var(--cream); min-height: 100vh; }
.appbar {
  position: sticky; top: 0; z-index: 50; background: var(--forest); color: #fff;
  padding: .7rem 0; box-shadow: var(--shadow-s);
}
.appbar__row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.appbar .brand__name { color: #fff; font-size: 1rem; }
.appbar .brand__tag { color: #8fae9f; }
.appbar__who { margin-left: auto; font-size: .86rem; color: #cfe0d7; text-align: right; }
.appbar__who b { display: block; color: #fff; }
.appbar__out {
  font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  border-radius: 100px; padding: .4rem .9rem;
}
.appbar__out:hover { background: rgba(255,255,255,.22); }

.apptabs { background: var(--paper); border-bottom: 1px solid var(--line);
           position: sticky; top: 56px; z-index: 40; }
.apptabs__row { display: flex; gap: .2rem; overflow-x: auto; }
.apptab {
  font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: .85rem .9rem; color: var(--ink-2);
}
.apptab:hover { color: var(--forest); }
.apptab.is-active { color: var(--leaf-600); border-bottom-color: var(--leaf); }

.appmain { padding: clamp(1.2rem, 3vw, 2rem) 0 4rem; }
.appview[hidden] { display: none; }
.appview h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.appview__intro { color: var(--ink-3); font-size: .93rem; margin-bottom: 1.4rem; }

/* ---------------------------------------------------------------- stat tiles */
.tiles { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
         margin-bottom: 1.8rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.tile__label { font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
               color: var(--ink-3); }
.tile__value { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--forest);
               line-height: 1.1; margin-top: .3rem; }
.tile__note { font-size: .78rem; color: var(--ink-3); margin-top: .2rem; }
.tile--gold .tile__value { color: var(--harvest); }

/* ---------------------------------------------------------------- panels & tables */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
         padding: 1.2rem 1.3rem; margin-bottom: 1.4rem; }
.panel h3 { font-size: 1.05rem; margin-bottom: .9rem; }
.panel--form { background: var(--paper); }
.panel__foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }

.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
table.data th { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
table.data tbody tr:hover { background: var(--cream); }
table.data td.num, table.data th.num { text-align: right; }

.badge-pill { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .06em;
              text-transform: uppercase; padding: .18rem .55rem; border-radius: 100px; }
.badge-pill--completed { background: #e5f3ea; color: #17603c; }
.badge-pill--draft     { background: #fdf1dc; color: #8a5f10; }
.badge-pill--cancelled { background: #f3e6e5; color: #9b2f27; }

.empty-row { text-align: center; color: var(--ink-3); padding: 1.6rem !important; font-size: .9rem; }

/* ---------------------------------------------------------------- bill builder */
.lineitem { display: grid; gap: .5rem; align-items: end; margin-bottom: .6rem;
            grid-template-columns: 2.2fr .8fr .9fr auto; }
@media (max-width: 620px) { .lineitem { grid-template-columns: 1fr 1fr; } }
.lineitem .field { margin: 0; }
.lineitem__drop {
  border: 1px solid var(--line); background: var(--paper); color: var(--danger);
  border-radius: 10px; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.lineitem__drop:hover { border-color: var(--danger); }
.billtotal { font-family: var(--serif); font-size: 1.5rem; color: var(--forest); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 200;
  background: var(--forest); color: #fff; padding: .8rem 1.3rem; border-radius: 100px;
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-l); max-width: 92vw;
}
.toast--bad { background: var(--danger); }
.toast[hidden] { display: none; }

/* The staff area has no chat widget or marketing furniture. */
.app-page .cbot-fab, .app-page .wa-fab, .auth-page .cbot-fab, .auth-page .wa-fab { display: none; }
