/* Material Design Overrides for Bootstrap 5 */
:root {
  --primary-color: #6200ee; /* Material Deep Purple 500 */
  --primary-variant: #3700b3;
  --secondary-color: #03dac6; /* Material Teal 200 */
  --surface-color: #ffffff;
  --background-color: #f2f4f5; /* User requested background */
  --error-color: #b00020;
  --success-color: #00c853; /* Material Green */
  --success-variant: #009624;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --shadow-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  --shadow-3: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  --fade-shadow: 0 0 50px -28px rgba(0,0,0,0.1); /* Proper fade shadow */
  --box-border: 1px solid #e1e4e8; /* Gray border */
}

body {
  background-color: var(--background-color);
  font-family: 'Lato', 'Roboto', 'Segoe UI', Tahoma, sans-serif;
  color: var(--text-primary);
}

/* Login/Signup Box Styling */
/* We target the specific containers used in login.html and signup.html */
.login-form, .signup-form, .signin-container .leftLogin, .signup-container {
  background-color: var(--surface-color);
  border: var(--box-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--fade-shadow) !important;
  padding: 0 !important;
  margin-bottom: 0 !important; /* Let the wrapper handle spacing */
  max-width: 100% !important;
  width: 100% !important;
}
.login-form form, .signup-form form, .signin-container .leftLogin form, .signup-container form {
  padding: 20px !important;
  max-width: 400px;
  margin: 0 auto;
  display: inherit;
}


/* Reset margins that might be in legacy CSS */
.signin-container {
  margin: 0 !important;
  max-width: 100% !important;
}

/* Material Inputs - Filled Style with refinement */
.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-control {
  border: 1px solid #ced4da; /* Slight border for better visibility */
  border-radius: 4px;
  background-color: #fcfcfc;
  padding: 12px 16px; /* Comfortable padding */
  height: 52px;
  box-shadow: none;
  font-size: 16px;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.form-control:focus {
  background-color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(98, 0, 238, 0.1); /* Soft focus ring */
  outline: none;
}

.form-control::placeholder {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Material Buttons */
.btn {
  position: relative;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0 24px;
  height: 48px; /* Taller button */
  border-radius: 4px;
  border: none;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(173deg, #312ec9 0%, #3b37ff 100%);
  color: white;
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(173deg, #2a27b5 0%, #322eff 100%);
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Success Button (used in Signup) */
.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover, .btn-success:focus {
  background-color: var(--success-variant);
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-variant);
  text-decoration: none;
}

/* Material Tabs (for 2FA) */
.towStepTabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 24px;
}

.towfaTabs li {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.875rem;
}

.towfaTabs li.active2FATab {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Error Messages */
.invalid-validation, .loginform-error-show {
  color: var(--error-color);
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  align-items: center;
}

.invalid-validation::before, .loginform-error-show::before {
  content: "error_outline";
  font-family: 'Material Icons';
  margin-right: 4px;
  font-size: 16px;
}

/* Heading Typography in Login Box */
.login-form h3, .signup-form h3 {
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  background: none !important;
  padding: 20px !important;
  font-size: 2rem;
}

.login-form h5, .signup-form h5 {
  font-weight: 400;
  color: #666;
  margin-bottom: 1rem;
}

/* Hide the "You are signed up as" green box if it looks ugly, or style it better */
h3[ng-show="loginFormIncomUsername"] {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
  padding: 1rem !important;
  border-radius: 4px;
  font-size: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* Divider for "Signup / Request Trial" links */
.login-form a[href="/signup"] {
  border: none !important;
  border-top: 1px solid #eee !important;
  margin-top: 2rem !important;
  padding-top: 1.5rem !important;
  color: #666;
  font-size: 0.9rem;
  text-align: center;
}

.login-form a[href="/signup"]:hover {
  color: var(--primary-color);
}
