/* ============================================================================
   MGIoT — Authorizations (التفويضات) page · redesign on 2027 tokens
   Scope: #viewAuthorizations.  Loads after redesign-2027.
   ========================================================================== */

/* Create form — clean 2-column grid */
#viewAuthorizations .auth-form{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:14px !important;
}
#viewAuthorizations .auth-form .mg-field{ display:flex; flex-direction:column; gap:6px; }
#viewAuthorizations .auth-form .mg-field-full{ grid-column:1 / -1; }
@media (max-width:720px){ #viewAuthorizations .auth-form{ grid-template-columns:1fr; } }

#viewAuthorizations .mg-label{
  font-size:12px; font-weight:700; color:var(--r27-ink-mid);
}
#viewAuthorizations .auth-form .mg-input,
#viewAuthorizations .auth-form select.mg-input,
#viewAuthorizations .auth-form textarea.mg-input{
  border:1px solid var(--r27-line-2) !important; border-radius:11px !important;
  background:#fff !important; padding:10px 12px !important; font-family:inherit; font-size:14px;
  color:var(--r27-ink) !important;
  transition:border-color var(--r27-ease), box-shadow var(--r27-ease);
}
#viewAuthorizations .auth-form .mg-input:focus,
#viewAuthorizations .auth-form select.mg-input:focus,
#viewAuthorizations .auth-form textarea.mg-input:focus{
  border-color:var(--r27-brand) !important; box-shadow:0 0 0 4px rgba(15,77,150,.10) !important; outline:none;
}
#viewAuthorizations .auth-form textarea.mg-input{ resize:vertical; min-height:64px; }

/* Stats inside the create card */
#viewAuthorizations .mg-stat--primary::before{ background:var(--r27-accent) !important; }

/* List table */
#viewAuthorizations .mg-table-wrap{
  background:var(--r27-surface); border:1px solid var(--r27-line);
  border-radius:14px; box-shadow:var(--r27-sh); overflow:hidden; margin-top:6px;
}
#viewAuthorizations .mg-table{ width:100%; border-collapse:separate; border-spacing:0; }
#viewAuthorizations .mg-table thead th{
  background:var(--r27-surface-2); color:var(--r27-ink-faint);
  font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase;
  padding:12px 16px; border-bottom:1px solid var(--r27-line); text-align:start; white-space:nowrap;
}
#viewAuthorizations .mg-table tbody td{
  padding:12px 16px; border-bottom:1px solid var(--r27-line); font-size:13px; color:var(--r27-ink-mid); vertical-align:middle;
}
#viewAuthorizations .mg-table tbody tr:last-child td{ border-bottom:0; }
#viewAuthorizations .mg-table tbody tr:hover{ background:var(--r27-surface-2); }
#viewAuthorizations .mg-table td strong{ color:var(--r27-ink); font-weight:800; }
#viewAuthorizations .mg-table .mg-btn{
  border:1px solid var(--r27-line-2); background:#fff; color:var(--r27-ink-mid);
  border-radius:9px; font-weight:700; padding:5px 10px; margin-inline-end:4px;
}
#viewAuthorizations .mg-table .mg-btn--success{ background:var(--r27-green-bg); border-color:#BDE9CE; color:var(--r27-green); }
#viewAuthorizations .mg-table .mg-btn--danger{ background:var(--r27-red-bg); border-color:#F3C9C9; color:var(--r27-red); }
