/* GovCare — Auth / Login Styles */

.gc-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--gc-bg) 0%, #e8eef3 50%, var(--gc-bg) 100%);
  font-family: var(--gc-font-ar);
}

.gc-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--gc-surface);
  border: 1px solid var(--gc-border-light);
  border-radius: var(--gc-radius-lg, 12px);
  padding: 32px 28px;
  box-shadow: var(--gc-shadow-lg);
}

.gc-auth-brand { text-align: center; margin-bottom: 28px; }
.gc-auth-logo {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gc-navy), #0d4a6e);
  display: flex; align-items: center; justify-content: center;
}
.gc-auth-logo i { width: 28px; height: 28px; color: var(--gc-gold, #C69A2E); }
.gc-auth-title { font-size: 22px; font-weight: 800; color: var(--gc-navy); margin: 0 0 4px; }
.gc-auth-subtitle { font-size: 13px; color: var(--gc-text-secondary); margin: 0; }

.gc-auth-form { display: flex; flex-direction: column; gap: 14px; }
.gc-auth-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--gc-text-secondary);
}
.gc-auth-input {
  padding: 11px 14px; border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius-sm); font-family: inherit; font-size: 14px;
  background: var(--gc-surface); color: var(--gc-text);
}
.gc-auth-input:focus { outline: 2px solid var(--gc-blue-soft); border-color: var(--gc-blue); }

.gc-auth-error {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--gc-critical-soft); color: var(--gc-critical);
  border-radius: var(--gc-radius-sm); font-size: 12px; font-weight: 600;
}
.gc-auth-error i { width: 16px; height: 16px; flex-shrink: 0; }

.gc-auth-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; padding: 12px; border: 0; border-radius: var(--gc-radius-sm);
  background: var(--gc-navy); color: #fff; font-family: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.gc-auth-submit:hover:not(:disabled) { opacity: 0.92; }
.gc-auth-submit:disabled { opacity: 0.6; cursor: wait; }
.gc-auth-submit i { width: 18px; height: 18px; }

.gc-auth-demo-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 16px; padding: 8px; border: 0; background: none;
  color: var(--gc-blue); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.gc-auth-demo-toggle i { width: 14px; height: 14px; }

.gc-auth-demo-list {
  margin-top: 10px; display: flex; flex-direction: column; gap: 6px;
  max-height: 320px; overflow-y: auto; padding-left: 2px;
}
.gc-auth-demo-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border: 1px solid var(--gc-border-light);
  border-radius: var(--gc-radius-sm); background: var(--gc-muted);
  cursor: pointer; font-family: inherit; text-align: right; width: 100%;
}
.gc-auth-demo-item:hover { background: var(--gc-blue-soft); border-color: var(--gc-blue); }
.gc-auth-demo-name { font-size: 13px; font-weight: 700; color: var(--gc-navy); }
.gc-auth-demo-hint { font-size: 11px; color: var(--gc-text-tertiary); font-family: var(--gc-font-en); direction: ltr; }
.gc-auth-demo-role { font-size: 10px; color: var(--gc-blue); font-weight: 600; }
.gc-auth-demo-note { font-size: 11px; color: var(--gc-text-tertiary); text-align: center; margin: 8px 0 0; }

.gc-auth-back {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px; font-size: 12px; color: var(--gc-text-tertiary);
  text-decoration: none; font-weight: 600;
}
.gc-auth-back:hover { color: var(--gc-blue); }
.gc-auth-back i { width: 14px; height: 14px; }

/* Session bar above portal */
.gc-auth-wrap { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.gc-auth-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px; background: var(--gc-navy); color: #fff;
  font-size: 12px; flex-shrink: 0; z-index: 100;
}
.gc-auth-bar-user { display: flex; align-items: center; gap: 8px; }
.gc-auth-bar-user i { width: 14px; height: 14px; opacity: 0.85; }
.gc-auth-bar-name { font-weight: 700; }
.gc-auth-bar-role {
  padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.15);
  font-size: 10px; margin-right: 4px;
}
.gc-auth-bar-logout {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,0.25); background: transparent;
  color: #fff; padding: 4px 10px; border-radius: 6px;
  font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.gc-auth-bar-logout:hover { background: rgba(255,255,255,0.1); }
.gc-auth-bar-logout i { width: 13px; height: 13px; }

.gc-auth-wrap > *:not(.gc-auth-bar) {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.op-body .gc-auth-wrap,
body.ca-body .gc-auth-wrap {
  height: 100vh;
}

.gc-data-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 48px 24px;
}
.gc-data-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.gc-data-loading-icon {
  width: 36px;
  height: 36px;
  color: var(--gc-blue);
  animation: gc-spin 1s linear infinite;
}
.gc-data-loading-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gc-text-secondary);
  font-family: var(--gc-font-ar);
}
@keyframes gc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
