﻿/* 1. Global App Background */
body {
  background-color: #ffffff;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
}

/* 2. Main Container (Centers the content) */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 20px 24px;
  text-align: center;
}

/* 3. Typography from Figma */
.login-page h1 {
  font-size: 24px;
  font-weight: 700;
  color: #101828;
  margin-top: 32px;
  margin-bottom: 8px;
}

.login-page .lead p {
  color: #667085;
  font-size: 14px;
  margin-bottom: 40px;
}

/* 4. Input Fields (The light gray boxes) */
.form-group {
  width: 100%;
  margin-bottom: 16px;
}

.form-control {
  background-color: #F9FAFB !important; /* The light gray background */
  border: none !important;
  border-radius: 12px !important; /* Smooth rounded corners */
  height: 56px;
  padding: 0 16px;
  font-size: 16px;
  width: 100%;
  box-shadow: none !important; /* Removes the blue Bootstrap glow */
}

/* 5. The Primary Login Button */
.btn-primary {
  background-color: #D92D20 !important; /* The specific Red from your image */
  border: none !important;
  border-radius: 12px !important;
  height: 56px;
  width: 100%;
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  margin-top: 24px;
}

/* 6. Link Styling (Forgot Password & Register) */
.forgot-password-link {
  display: block;
  text-align: right;
  width: 100%;
  color: #101828;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-top: 8px;
}

.register-section {
  margin-top: 40px;
  font-size: 14px;
  color: #667085;
}

.register-section a {
  color: #101828;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid #101828; /* The underline look in Figma */
}

/* Centering the mobile view */
.auth-body {
  background-color: #fff;
  margin: 0;
  display: flex;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden; 
 /* position: fixed; */
  position: absolute;
  width: 100%;
  min-height: 100vh;
}

.login-screen {
  width: 100%;
  max-width: 390px; /* iPhone width */
  padding: 80px 24px 20px 24px;
  text-align: center;
  padding-top: env(safe-area-inset-top, 60px);
}

/* Logo & Text */
.logo-wrap img { height: 64px; margin-bottom: 32px; }
.header-wrap h1 { font-size: 26px; font-weight: 700; color: #101828; margin: 0; }
.header-wrap p { color: #667085; font-size: 14px; margin-top: 8px; margin-bottom: 40px; }

/* Input fields */
.auth-input {
  width: 100%;
  height: 56px;
  background-color: #F9FAFB;
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

/* Password Eye Icon */
.input-container { position: relative; }
.eye-icon { position: absolute; right: 16px; top: 18px; width: 20px; opacity: 0.4; z-index: 10;
  cursor: pointer;}

/* Login Button */
.btn-red {
  width: 100%;
  height: 56px;
  background-color: #D92D20; 
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 18px;
  margin-top: 32px;
  cursor: pointer;
}

/* An anchor styled as the button needs the box and centring that a <button>
   gets from the UA stylesheet; without this it stays inline and ignores
   width/height. */
a.btn-red {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.forgot-link { text-align: right; margin-bottom: 24px; }
.forgot-link a { color: #101828; font-weight: 600; text-decoration: none; font-size: 14px; }

.register-text {
  margin-top: 32px;
  font-size: 14px;
  color: #101828; 
}

.register-text a {
  font-weight: 700;
  color: #101828;
  text-decoration: none;
  border-bottom: 1px solid #101828; 
  padding-bottom: 2px;
}

/* Darkens the background when the modal is active */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Dimmed background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* The Dialog Box */
.confirm-dialog {
  background-color: #ffffff;
  width: 85%;
  max-width: 320px;
  border-radius: 20px; /* Smooth rounded corners from screenshot */
  overflow: hidden;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.confirm-content {
  padding: 24px;
}

.confirm-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #101828;
  margin-bottom: 12px;
}

.confirm-content p {
  font-size: 14px;
  color: #667085;
  line-height: 1.5;
  margin: 0;
}

/* The "Ok" Button Section */
.confirm-footer {
  border-top: 1px solid #F2F4F7; /* Light divider line */
}

.btn-ok {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #101828;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-ok:hover {
  background-color: #F9FAFB;
  color: #101828;
}

/* Button hover/active states */
.btn-red:hover {
  background-color: #B42318;
}

.btn-red:active {
  background-color: #912018;
}

/* Input focus states for accessibility */
.auth-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #D92D20;
}

/* Validation summary styling to match design */
.login-screen .alert-danger {
  background-color: #FEF3F2;
  border: 1px solid #FECDCA;
  border-radius: 12px;
  color: #B42318;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}

.login-screen .alert-danger strong {
  color: #912018;
  font-weight: 600;
}

.login-screen .alert-danger .danger {
  margin-top: 4px;
  color: #B42318;
}

/* Back link styling */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 32px;
  padding: 10px 16px;
  background-color: #F2F4F7;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-link:hover {
  background-color: #E4E7EC;
  color: #101828;
}

.back-link svg {
  transition: transform 0.2s ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* Register form */
.register-form {
  display: flex;
  flex-direction: column;
}

.register-form .btn-red {
  margin-top: 32px;
}

/* Validation summary styling */
.validation-summary:not(:empty) {
  background-color: #FEF3F2;
  border: 1px solid #FECDCA;
  border-radius: 12px;
  color: #B42318;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 14px;
}

/* Field-level error styling */
.field-error {
  display: block;
  color: #B42318;
  font-size: 12px;
  margin-top: -12px;
  margin-bottom: 12px;
  text-align: left;
}

/* Adjust input-container for validation errors */
.input-container .field-error {
  margin-top: 4px;
  margin-bottom: 12px;
}

/* Ensure eye icon is always clickable */
.input-container {
  position: relative;
}

.input-container .eye-icon {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 20px;
  opacity: 0.4;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
}

/* Secondary/outline button */
.btn-outline {
  width: 100%;
  height: 56px;
  background-color: #ffffff;
  color: #344054;
  border: 1px solid #D0D5DD;
  border-radius: 12px;
  font-weight: 600;
  font-size: 18px;
  margin-top: 12px;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: #F9FAFB;
  border-color: #98A2B3;
}

.btn-outline:active {
  background-color: #F2F4F7;
}

/* Styled checkbox group */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: #F9FAFB;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #D92D20;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 14px;
  color: #344054;
  cursor: pointer;
  margin: 0;
}

/* Info card for scopes/permissions */
.info-card {
  background-color: #F9FAFB;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.info-card-header {
  background-color: #F2F4F7;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #344054;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-body {
  padding: 0;
}

.info-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #E4E7EC;
}

.info-card-item:last-child {
  border-bottom: none;
}

.info-card-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #D92D20;
  cursor: pointer;
  flex-shrink: 0;
}

.info-card-item label {
  font-size: 14px;
  color: #344054;
  cursor: pointer;
  margin: 0;
}

.info-card-item .scope-description {
  font-size: 12px;
  color: #667085;
  margin-top: 2px;
}

/* Loading spinner */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #F2F4F7;
  border-top-color: #D92D20;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 32px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success icon */
.success-icon {
  width: 64px;
  height: 64px;
  background-color: #ECFDF3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: #12B76A;
}

/* Error icon */
.error-icon {
  width: 64px;
  height: 64px;
  background-color: #FEF3F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.error-icon svg {
  width: 32px;
  height: 32px;
  color: #D92D20;
}

/* Alert/status message styling */
.status-message {
  background-color: #ECFDF3;
  border: 1px solid #A6F4C5;
  border-radius: 12px;
  color: #027A48;
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
}

.status-message.error {
  background-color: #FEF3F2;
  border-color: #FECDCA;
  color: #B42318;
}

/* Button group for side-by-side buttons */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.button-group .btn-red,
.button-group .btn-outline {
  flex: 1;
  margin-top: 0;
}

/* Client logo styling */
.client-logo {
  margin-bottom: 24px;
}

.client-logo img {
  max-width: 80px;
  max-height: 80px;
  border-radius: 12px;
}

/* Request ID/debug info styling */
.request-id {
  font-size: 12px;
  color: #667085;
  margin-top: 16px;
}

/* Binding message styling */
.binding-message {
  background-color: #EFF8FF;
  border: 1px solid #B2DDFF;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #175CD3;
  text-align: center;
}

.binding-message strong {
  color: #1849A9;
}

/* Table styling for management pages */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.styled-table thead {
  background-color: #F9FAFB;
}

.styled-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #344054;
  border-bottom: 1px solid #E4E7EC;
}

.styled-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #E4E7EC;
  color: #344054;
}

.styled-table tbody tr:hover {
  background-color: #F9FAFB;
}

/* Small button variant */
.btn-small {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 8px;
}

/* Danger button variant */
.btn-danger {
  background-color: #D92D20;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-danger:hover {
  background-color: #B42318;
}

/* Filter form styling */
.filter-form {
  background-color: #F9FAFB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-form .form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-form .form-row:last-child {
  margin-bottom: 0;
}

.filter-form label {
  font-size: 14px;
  font-weight: 500;
  color: #344054;
  min-width: 100px;
}

.filter-form input {
  flex: 1;
  height: 44px;
  background-color: #fff;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}

.filter-form input:focus {
  outline: none;
  border-color: #D92D20;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.1);
}

/* Grant card styling */
.grant-card {
  background-color: #F9FAFB;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.grant-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #F2F4F7;
}

.grant-card-header img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-right: 12px;
}

.grant-card-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #101828;
}

.grant-card-body {
  padding: 16px;
}

.grant-card-body .grant-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.grant-card-body .grant-item:last-child {
  margin-bottom: 0;
}

.grant-card-body .grant-item label {
  font-weight: 500;
  color: #667085;
}

.grant-card-body .grant-item span {
  color: #344054;
}

/* Pagination buttons */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  background-color: #F9FAFB;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #344054;
  text-decoration: none;
  cursor: pointer;
}

.pagination-btn:hover {
  background-color: #F2F4F7;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #667085;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Success message styling */
.success-message {
  background-color: #ECFDF3;
  border: 1px solid #A6F4C5;
  border-radius: 12px;
  color: #027A48;
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
}

/* Error message styling */
.error-message {
  background-color: #FEF3F2;
  border: 1px solid #FECDCA;
  border-radius: 12px;
  color: #B42318;
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
}

/* Resend form styling */
.resend-form {
  margin-top: 24px;
}

.resend-text {
  font-size: 14px;
  color: #667085;
  margin: 0;
}

/* Link button - looks like a link but is a button */
.link-button {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #101828;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: #D92D20;
}

.link-button:disabled {
  color: #98A2B3;
  cursor: not-allowed;
}

/* Anchor styled as primary button */
.btn-red-link {
  display: block;
  width: 100%;
  height: 56px;
  line-height: 56px;
  background-color: #D92D20;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.btn-red-link:hover {
  background-color: #B42318;
  color: #fff;
}

.btn-red-link:active {
  background-color: #912018;
}

/* Alert success styling (for 2FA code resent) */
.alert-success {
  background-color: #ECFDF3;
  border: 1px solid #A6F4C5;
  border-radius: 12px;
  color: #027A48;
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
}

/* Resend code section */
.resend-code {
  margin-top: 32px;
  text-align: center;
}

.resend-code p {
  font-size: 14px;
  color: #667085;
  margin: 0 0 8px 0;
}

.resend-code form {
  display: inline;
}

/* Link-styled button */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #D92D20;
  text-decoration: none;
  cursor: pointer;
}

.btn-link:hover {
  color: #B42318;
  text-decoration: underline;
}