/* n450s auth pages - styles matching n450s_frontend */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* ============================================================
   BASE STYLES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}

a {
  color: inherit;
}

/* ============================================================
   LOGIN PAGE (Orange Theme)
   ============================================================ */
.login-page {
  min-height: 100vh;
}

.login-full-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
}

@media (max-width: 600px) {
  .login-full-container {
    display: flex;
    flex-direction: column;
  }
}

.login-container {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 40px;
  min-height: 100vh;
  background-color: #fdbe7c;
}

@media (max-width: 600px) {
  .login-container {
    padding: 25px;
  }
}

.login-image-container {
  display: flex;
  flex-direction: column;
  text-align: right;
  min-height: 100vh;
  background-color: #fdbe7c;
}

.login-image {
  width: 50%;
  margin-top: 10px;
  margin-left: 20px;
  opacity: 0.2;
}

.login-submit {
  border: 1px solid;
  padding: 5px 15px;
  background-color: #f4ab47;
  box-shadow: 2px 2px 4px rgba(46, 45, 45, 0.365);
  margin: 10px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.login-submit:hover {
  background-color: #f7dc70;
  padding: 6px 16px;
}

@media (max-width: 600px) {
  .login-submit {
    height: 50px;
    width: 30%;
  }
}

/* ============================================================
   SIGNUP PAGE (Blue Theme)
   ============================================================ */
.signup-page {
  min-height: 100vh;
}

.signup-full-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 600px) {
  .signup-full-container {
    display: flex;
    flex-direction: column;
  }
}

.signup-container {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 40px;
  min-height: 100vh;
  background-color: #8be0f5;
}

.signup-image-container {
  display: flex;
  flex-direction: column;
  text-align: right;
  min-height: 100vh;
  background-color: #8be0f5;
}

.signup-image {
  width: 50%;
  margin-top: 10px;
  margin-left: 20px;
  opacity: 0.3;
  justify-self: center;
}

.signup-submit {
  border: 1px solid;
  padding: 5px 15px;
  background-color: #66d6f5;
  box-shadow: 2px 2px 4px rgba(72, 72, 72, 0.344);
  margin: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.signup-submit:hover {
  background-color: #47c2f6;
  padding: 6px 16px;
}

@media (max-width: 600px) {
  .signup-submit {
    height: 50px;
    width: 30%;
  }
}

/* ============================================================
   SHARED FORM STYLES
   ============================================================ */
.auth-form {
  max-width: 500px;
}

.auth-form label {
  display: block;
}

.styled-input {
  zoom: 1;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid;
  padding: 5px;
  width: 20rem;
  box-shadow: inset 2px 2px 2px rgba(53, 53, 53, 0.401);
  margin: 10px;
  transition: 0.2s;
}

.styled-input::placeholder {
  color: gray;
  font-family: inherit;
}

.styled-input:hover,
.styled-input:focus {
  padding: 7px;
  outline: none;
}

@media (max-width: 600px) {
  .styled-input {
    width: 85%;
    max-width: none;
  }
}

.form-group {
  margin-bottom: 15px;
}

.form-group-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .form-group-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group-row .form-group {
    margin-bottom: 15px;
  }
}

.password-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  color: #555;
}

.password-toggle:hover {
  color: #000;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */
.back-button {
  display: inline-block;
  font-size: 20px;
  color: #000;
  text-decoration: none;
  transition: font-size 0.1s;
  cursor: pointer;
  margin-bottom: 20px;
}

.back-button:hover {
  color: #555;
  font-size: 22px;
}

/* ============================================================
   HEADERS
   ============================================================ */
.page-title {
  float: right;
  font-size: 1.75rem;
  margin-bottom: 20px;
}

/* ============================================================
   ERROR & INFO MESSAGES
   ============================================================ */
.error-message {
  color: #e40000;
  font-size: 0.9rem;
  margin: 10px 0;
}

.success-message {
  color: #2e7d32;
  font-size: 0.9rem;
  margin: 10px 0;
}

.info-message {
  color: #525252;
  font-size: 0.9rem;
  margin: 10px 0;
}

/* ============================================================
   TABS (Login mode: username/email)
   ============================================================ */
.tabs-container {
  margin: 10px 0;
}

.tabs-list {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background-color: #f5a54a;
  border: 1px solid #000;
  box-shadow: 2px 2px rgba(0, 0, 0, 0.5);
  padding: 4px;
  width: fit-content;
}

.tab-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 3px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-trigger.active {
  background-color: #fdbe7c;
  font-weight: 600;
  border-color: #000;
  transform: translate(1px, 1px);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-trigger:hover:not(.active) {
  background-color: rgba(253, 190, 124, 0.5);
}

.tab-content {
  display: none;
  margin-top: 10px;
}

.tab-content.active {
  display: block;
}

/* ============================================================
   SIGNUP TABS (Blue theme)
   ============================================================ */
.signup-page .tabs-list {
  background-color: #5bcae8;
}

.signup-page .tab-trigger.active {
  background-color: #8be0f5;
}

/* ============================================================
   MODE SWITCH LINK (use email / use username)
   ============================================================ */
.label-with-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.label-with-link .mode-switch-link {
  margin: 0;
  white-space: nowrap;
}

.mode-switch-link {
  font-size: 0.85rem;
  color: #525252;
  text-decoration: underline;
  cursor: pointer;
}

.mode-switch-link:hover {
  color: #000;
}

/* ============================================================
   LINKS
   ============================================================ */
.auth-links {
  margin-top: 20px;
}

.auth-links div {
  font-size: 0.9rem;
  font-weight: 600;
  color: #525252;
  margin: 4px 0;
}

.auth-links a {
  color: #0066cc;
  text-decoration: underline;
}

.auth-links a:hover {
  color: #004499;
}

/* ============================================================
   CONSENT PAGE (Dark Theme - matches oauthConsent.css)
   ============================================================ */
.consent-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

.consent-card {
  background: #1a1a2e;
  border-radius: 16px;
  border: 1px solid #333;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  color: #fff;
}

.n450s-logo-container {
  text-align: center;
  margin-bottom: 32px;
}

.n450s-logo {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.consent-header {
  text-align: center;
  margin-bottom: 32px;
}

.client-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 20px;
  object-fit: cover;
}

.consent-header h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.client-name {
  color: #ff6b35;
}

.client-description {
  color: #888;
  margin: 12px 0 0;
  font-size: 14px;
}

.consent-scopes {
  background: #0f0f1a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.consent-scopes h3 {
  font-size: 14px;
  color: #888;
  margin: 0 0 16px;
  font-weight: 500;
}

.consent-scopes ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.consent-scopes li {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #222;
}

.consent-scopes li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.scope-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.scope-desc {
  font-size: 13px;
  color: #666;
}

.consent-warning {
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.consent-warning p {
  margin: 0;
  font-size: 13px;
  color: #ff9500;
}

.consent-actions {
  display: flex;
  gap: 12px;
}

.approve-btn,
.deny-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.approve-btn {
  background: #ff6b35;
  color: #fff;
  border: none;
}

.approve-btn:hover:not(:disabled) {
  background: #ff8254;
}

.approve-btn:disabled,
.deny-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.deny-btn {
  background: transparent;
  color: #888;
  border: 1px solid #444;
}

.deny-btn:hover:not(:disabled) {
  border-color: #ff3b30;
  color: #ff3b30;
}

.consent-footer {
  margin-top: 24px;
  text-align: center;
}

.consent-footer p {
  font-size: 12px;
  color: #555;
  margin: 0;
}

.consent-footer code {
  background: #0f0f1a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ============================================================
   CONSENT LOADING & ERROR STATES
   ============================================================ */
.consent-loading,
.consent-error {
  text-align: center;
  color: #fff;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #333;
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.consent-error h2 {
  color: #ff3b30;
  margin-bottom: 12px;
}

.consent-error button {
  background: #333;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.consent-error button:hover {
  background: #444;
}

.consent-error button.primary-btn {
  background: #ff6b35;
}

.consent-error button.primary-btn:hover {
  background: #ff8254;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

/* ============================================================
   LOGGED IN USER INFO (for consent page)
   ============================================================ */
.logged-in-as {
  text-align: center;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.logged-in-as p {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.logged-in-as .username {
  color: #fff;
  font-weight: 600;
}

.logged-in-as a {
  color: #ff6b35;
  font-size: 12px;
}

/* ============================================================
   FORGOT/RESET PASSWORD PAGES (Orange Theme)
   ============================================================ */
.forgot-password-page,
.reset-password-page {
  min-height: 100vh;
}

.forgot-password-container,
.reset-password-container {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 40px;
  min-height: 100vh;
  background-color: #fdbe7c;
}

/* ============================================================
   MFA SECTION
   ============================================================ */
.mfa-section {
  margin-top: 20px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.mfa-section h3 {
  margin-bottom: 15px;
  font-size: 1rem;
}

.mfa-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mfa-method-btn {
  padding: 10px 15px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.mfa-method-btn:hover {
  background: #f0f0f0;
}

.mfa-method-btn.active {
  background: #fdbe7c;
  font-weight: 600;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Font Awesome icons (loaded via CDN in templates) */
.fa {
  margin-right: 5px;
}