    :root {
      /* Dark mode (default) */
      --bg-color: #121212;
      --primary-color: #D32F2F; /* Red */
      --link-color: #D32F2F;
      --link-hover-color: #E57373; /* Lighter Red */
      --text-color: #F5F5F5; /* Light Grey */
      --secondary-text-color: rgba(255, 255, 255, 0.7); /* Lighter white for secondary text */
      --input-bg: rgba(255, 255, 255, 0.1);
      --input-border: rgba(255, 255, 255, 0.2);
      --input-text: #1A237E; /* Dark Blue (Indigo) */
      --input-placeholder: #424242; /* Darker grey for better contrast */
      --card-bg: rgba(255, 255, 255, 0.05);

      /* Message colors (Bootstrap defaults) */
      --message-success: #4CAF50; /* Green */
      --message-error: #F44336;   /* Red */
      --message-info: #2196F3;    /* Blue */
      --message-warning: #FFC107; /* Amber */

      /* Separator line color */
      --separator-line-color: rgba(255, 255, 255, 0.4);

      /* New signup button colors */
      --signup-button-bg: rgba(255, 255, 255, 0.15);
      --signup-button-border: rgba(255, 255, 255, 0.4);
      --signup-button-text: #F5F5F5;
      --signup-button-hover-bg: rgba(255, 255, 255, 0.25);
      --signup-button-hover-border: var(--primary-color);
      --signup-button-hover-text: var(--primary-color);

      /* Password toggle icon color (though not used in signup, kept for consistency if used elsewhere) */
      --password-toggle-color: #aaa;
      --password-toggle-hover-color: #fff;
    }

    /* Light mode */
    .light-mode {
      --bg-color: #ecf0f5;
      --text-color: #212121;
      --secondary-text-color: rgba(0, 0, 0, 0.7);
      --input-bg: rgba(0, 0, 0, 0.05);
      --input-border: rgba(0, 0, 0, 0.1);
      --input-text: #212121;
      --input-placeholder: #757575;
      --card-bg: rgba(255, 255, 255, 0.7);
      --separator-line-color: rgba(0, 0, 0, 0.2);
      --signup-button-bg: rgba(0, 0, 0, 0.05);
      --signup-button-border: rgba(0, 0, 0, 0.2);
      --signup-button-text: #212121;
      --signup-button-hover-bg: rgba(0, 0, 0, 0.1);
      --password-toggle-color: #666;
      --password-toggle-hover-color: #000;
    }

    /* Base Styles */
    @font-face {
      font-family: "cambria";
      src: local("cambria"), url("../fonts/cambria.ttf") format("truetype");
      font-display: swap;
    }

    html, body { /* Make html and body take full height for scrollability */
      height: 100%;
    }


    body {
      font-family: cambria, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
      background-color: var(--bg-color);
      color: var(--text-color);
      animation: fadeIn 1s ease-in-out;
      margin: 0;
      padding: 20px 0; /* Add some padding top/bottom for content if it scrolls */
      transition: background-color 0.3s ease, color 0.3s ease;
      min-height: 100vh;
      overflow-x: hidden;
      position: relative;
    }

    /* Grid background pattern with fade effect */
    body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: -2;
      background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      opacity: 0.8;
      mask: radial-gradient(ellipse at center, black 40%, transparent 80%);
      -webkit-mask: radial-gradient(ellipse at center, black 40%, transparent 80%);
    }

    /* Light mode grid - hide default and show custom */
    .light-mode body::before {
      display: none !important;
    }

    /* Light mode custom grid */
    .light-mode body::after {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: -2;
      background-image: 
        linear-gradient(#D32F2F 1px, transparent 1px),
        linear-gradient(90deg, #D32F2F 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      opacity: 0.5;
      mask: radial-gradient(ellipse at center, black 40%, transparent 80%);
      -webkit-mask: radial-gradient(ellipse at center, black 40%, transparent 80%);
    }

    /* Animated floating particles behind grid */
    .floating-particles {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -3;
      pointer-events: none;
      overflow: hidden;
    }

    .particle {
      position: absolute;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 50%;
      animation: float 20s infinite linear;
    }

    .particle:nth-child(1) {
      width: 8px;
      height: 8px;
      left: 10%;
      animation-delay: 0s;
      animation-duration: 15s;
    }

    .particle:nth-child(2) {
      width: 12px;
      height: 12px;
      left: 20%;
      animation-delay: 2s;
      animation-duration: 18s;
    }

    .particle:nth-child(3) {
      width: 6px;
      height: 6px;
      left: 30%;
      animation-delay: 5s;
      animation-duration: 22s;
    }

    .particle:nth-child(4) {
      width: 10px;
      height: 10px;
      left: 40%;
      animation-delay: 1s;
      animation-duration: 16s;
    }

    .particle:nth-child(5) {
      width: 14px;
      height: 14px;
      left: 50%;
      animation-delay: 7s;
      animation-duration: 20s;
    }

    .particle:nth-child(6) {
      width: 8px;
      height: 8px;
      left: 60%;
      animation-delay: 3s;
      animation-duration: 17s;
    }

    .particle:nth-child(7) {
      width: 16px;
      height: 16px;
      left: 70%;
      animation-delay: 6s;
      animation-duration: 19s;
    }

    .particle:nth-child(8) {
      width: 7px;
      height: 7px;
      left: 80%;
      animation-delay: 4s;
      animation-duration: 21s;
    }

    .particle:nth-child(9) {
      width: 11px;
      height: 11px;
      left: 90%;
      animation-delay: 8s;
      animation-duration: 14s;
    }

    .particle:nth-child(10) {
      width: 9px;
      height: 9px;
      left: 25%;
      animation-delay: 9s;
      animation-duration: 23s;
    }

    .particle:nth-child(11) {
      width: 13px;
      height: 13px;
      left: 35%;
      animation-delay: 2.5s;
      animation-duration: 16.5s;
    }

    .particle:nth-child(12) {
      width: 5px;
      height: 5px;
      left: 55%;
      animation-delay: 4.5s;
      animation-duration: 18.5s;
    }

    .particle:nth-child(13) {
      width: 15px;
      height: 15px;
      left: 75%;
      animation-delay: 6.5s;
      animation-duration: 20.5s;
    }

    .particle:nth-child(14) {
      width: 8px;
      height: 8px;
      left: 85%;
      animation-delay: 1.5s;
      animation-duration: 17.5s;
    }

    .particle:nth-child(15) {
      width: 12px;
      height: 12px;
      left: 15%;
      animation-delay: 8.5s;
      animation-duration: 19.5s;
    }

    @keyframes float {
      0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
      }
      10% {
        opacity: 1;
      }
      90% {
        opacity: 1;
      }
      100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
      }
    }

    /* Light mode particles - slightly more visible */
    .light-mode .particle {
      background: rgba(211, 47, 47, 0.15);
    }

    /* Watermark background - moved to different pseudo-element */
    .auth-card::after {
      content: "";
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='50' font-size='80' fill='%23ff000008'%3E💰%3C/text%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
      background-size: 60%;
      opacity: 0.02;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: -1;
      pointer-events: none;
    }

    /* Light mode watermark */
    .light-mode .auth-card::after {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='50' font-size='80' fill='%23c6282815'%3E💰%3C/text%3E%3C/svg%3E");
      opacity: 0.04;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* New wrapper for centering and scrollability */
    .auth-page-wrapper {
      min-height: 100%; /* Take full height of the body */
      display: flex;
      flex-direction: column; /* Stack content vertically */
      align-items: center; /* Center horizontally */
      justify-content: center; /* Center vertically if content is smaller than viewport */
      padding: 20px; /* Padding around the card, especially on smaller screens */
      box-sizing: border-box; /* Include padding in element's total width and height */
    }

    .auth-card {
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px); /* For Safari compatibility */
      background-color: var(--card-bg);
      border: none;
      border-radius: 16px;
      padding: 2.5rem;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
      width: 100%;
      max-width: 420px;
      animation: slideUp 1s ease-in-out;
      flex-shrink: 0; /* Prevent the card from shrinking if content is too large */
      margin: auto; /* For browsers that don't fully support flex-justify-center on overflow */
    }

    @keyframes slideUp {
      from { transform: translateY(40px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .logo-container {
      text-align: center;
      margin-bottom: 2rem;
    }

    .logo-icon {
      width: 20px;
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1rem;
      animation: logoFloat 3s ease-in-out infinite;
    }

    @keyframes logoFloat {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-5px); }
    }

    .logo-icon img {
      height: 70px;
      width: auto;
      object-fit: contain;
      display: block;
      margin: 0 auto;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
      transition: transform 0.3s ease-in-out;
    }

    .logo-icon img:hover {
      transform: scale(1.05);
    }

    .company-name {
      font-size: 2.2rem;
      font-weight: 700;
      text-align: center;
      margin-bottom: 0.5rem;
      background: linear-gradient(135deg, var(--primary-color), var(--link-hover-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .auth-page-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--text-color);
      text-align: center;
      margin-bottom: 1.5rem;
      margin-top: 1rem;
    }

    .form-label {
      font-weight: 600;
      color: #fff;
      margin-bottom: 0.5rem;
      font-size: 0.95rem;
    }

    .form-check-label {
      color: #fff;
      font-size: 0.9rem;
      font-weight: 500;
    }

    /* Light mode form text */
    .light-mode .form-label {
      color: #212121;
    }

    .light-mode .form-check-label {
      color: #212121;
    }

    .form-control {
      background-color: var(--input-bg);
      border: 1px solid var(--input-border);
      color: #fff !important; /* White text for dark mode */
      border-radius: 10px;
      transition: all 0.2s ease-in-out; /* Smooth transition for focus */
    }

    /* Light mode input text */
    .light-mode .form-control {
      color: #212121 !important; /* Dark text for light mode */
    }

    .form-control::placeholder {
      color: transparent;
    }
    .form-control::-webkit-input-placeholder { color: transparent; }
    .form-control:-moz-placeholder { color: transparent; opacity: 0; }
    .form-control::-moz-placeholder { color: transparent; opacity: 0; }
    .form-control:-ms-input-placeholder { color: transparent; }
    .form-control::-ms-input-placeholder { color: transparent; }


    .form-control:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.2);
      background-color: rgba(255, 255, 255, 0.2); /* Slightly lighter on focus */
      outline: none;
    }

    /* Important for inline password eye icon if used (not on signup.html currently) */
    .input-group .form-control {
        flex-grow: 1;
        width: auto;
        min-width: 0; /* Ensures it can shrink on smaller screens */
    }

    .input-group .input-group-text {
        flex-shrink: 0;
        /* Specific styles for the eye toggle button */
        background-color: var(--input-bg);
        border: 1px solid var(--input-border);
        border-left: none; /* Blend with the input field */
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        color: var(--password-toggle-color);
        cursor: pointer;
        padding: 0.375rem 0.75rem;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    .input-group .input-group-text:hover {
      color: var(--password-toggle-hover-color);
      background-color: rgba(255, 255, 255, 0.25); /* Slightly lighter on hover */
    }

    /* Adjust rounded corners for input-group elements */
    .input-group > .form-control:not(:last-child) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }


    .main-submit-btn {
      width: 100%;
      background: linear-gradient(135deg, var(--primary-color), var(--link-hover-color));
      border: none;
      color: #fff;
      padding: 0.6rem 1.75rem;
      font-weight: 700;
      border-radius: 10px;
      transition: all 0.3s ease;
      position: relative; /* For ripple effect */
      overflow: hidden; /* For ripple effect */
    }

    .main-submit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
    }

    .auth-links {
      color: var(--link-color);
      font-size: 0.85rem;
      text-decoration: none;
      transition: color 0.3s ease;
    }

    .auth-links:hover {
      color: var(--link-hover-color);
      text-decoration: underline;
    }

    .social-login-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.6rem;
      width: 100%;
      padding: 0.75rem 1.25rem;
      background-color: transparent;
      border: 2px solid rgba(255, 255, 255, 0.3);
      color: #fff;
      text-decoration: none;
      border-radius: 10px;
      font-weight: 600;
      font-size: 0.95rem;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .social-login-btn:hover {
      border-color: var(--primary-color);
      color: var(--primary-color);
      background-color: rgba(255, 255, 255, 0.05);
      transform: translateY(-1px);
    }

    /* Light mode social login button */
    .light-mode .social-login-btn {
      border: 2px solid rgba(0, 0, 0, 0.2);
      color: #212121;
      background-color: rgba(255, 255, 255, 0.8);
    }

    .light-mode .social-login-btn:hover {
      border-color: var(--primary-color);
      color: var(--primary-color);
      background-color: rgba(0, 0, 0, 0.05);
    }

    .social-login-btn i {
      font-size: 1.2rem;
    }

    /* Styles for general Django messages */
    .messages-container {
      margin-bottom: 1.5rem;
      text-align: center;
    }

    .alert {
      padding: 0.75rem 1.25rem;
      margin-bottom: 1rem;
      border: 1px solid transparent;
      border-radius: 0.5rem;
      animation: slideInFromTop 0.5s ease-out;
      opacity: 0;
      animation-fill-mode: forwards;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    @keyframes slideInFromTop {
      0% { transform: translateY(-20px); opacity: 0; }
      100% { transform: translateY(0); opacity: 1; }
    }

    .alert-success {
      color: #0F5132;
      background-color: #D1E7DD;
      border-color: #BADBCC;
    }

    .alert-error { /* Allauth errors often use 'error' tag */
      color: #842029;
      background-color: #F8D7DA;
      border-color: #F5C2C7;
    }

    .alert-info {
        color: #055160;
        background-color: #CCEEF7;
        border-color: #B6D4FE;
    }

    .alert-warning {
        color: #664D03;
        background-color: #FFF3CD;
        border-color: #FFECB5;
    }

    /* Styling for Django form field errors (e.g., specific validation error) */
    .form-error-message {
        color: var(--message-error); /* Uses the general error color */
        font-size: 0.875rem;
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
        text-align: left;
    }

    /* Custom class for secondary informational text */
    .secondary-text {
      color: var(--secondary-text-color);
      font-size: 0.95rem;
      line-height: 1.5;
    }

    /* Original Separator Line for "OR ACCESS WITH" (as requested, no changes) */
    .separator {
      display: flex;
      align-items: center;
      text-align: center;
      margin: 1.5rem 0;
      color: var(--text-color);
    }

    .separator::before,
    .separator::after {
      content: '';
      flex: 1;
      height: 1px;
      background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, var(--separator-line-color) 50%, rgba(255, 255, 255, 0) 100%);
      background-color: var(--separator-line-color);
    }

    .separator::before {
      margin-right: 0.75rem;
      background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, var(--separator-line-color) 100%);
    }

    .separator::after {
      margin-left: 0.75rem;
      background: linear-gradient(to left, rgba(255, 255, 255, 0) 0%, var(--separator-line-color) 100%);
    }

    /* Restyled Signup/Auth toggle section */
    .auth-toggle-section {
      margin-top: 2rem;
      text-align: center;
    }

    .auth-toggle-text {
      color: var(--text-color);
      font-size: 0.95rem;
      margin-bottom: 0.8rem;
    }

    .auth-toggle-button {
      display: inline-block;
      padding: 0.8rem 1.5rem;
      background-color: var(--signup-button-bg);
      border: 1px solid var(--signup-button-border);
      color: var(--signup-button-text);
      text-decoration: none;
      border-radius: 10px;
      font-weight: 600;
      font-size: 0.95rem;
      transition: all 0.3s ease;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .auth-toggle-button:hover {
      background-color: var(--signup-button-hover-bg);
      border-color: var(--signup-button-hover-border);
      color: var(--signup-button-hover-text);
      transform: translateY(-2px);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    }

    /* Theme Toggle */
    .theme-toggle {
      position: fixed;
      top: 2rem;
      right: 2rem;
      z-index: 1000;
      background: var(--card-bg);
      border: 1px solid var(--input-border);
      border-radius: 50%;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .theme-toggle:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    .theme-icon {
      font-size: 1.2rem;
      color: var(--text-color);
      transition: transform 0.5s ease;
    }

    /* Ripple effect for buttons (now global in base.html) */
    .ripple {
      position: absolute;
      border-radius: 50%;
      transform: scale(0);
      animation: ripple 0.6s linear;
      background-color: rgba(255, 255, 255, 0.7);
      opacity: 0;
      pointer-events: none; /* Allow clicks to pass through */
    }
    @keyframes ripple {
      to {
        transform: scale(4);
        opacity: 0;
      }
    }


    @media (max-width: 480px) {
      .auth-card {
        padding: 1.5rem;
      }

      .company-name {
        font-size: 1.5rem;
      }

      .logo-icon {
        width: 60px;
        height: 60px;
      }

      .logo-icon i {
        font-size: 2rem;
      }

      .auth-toggle-button {
          padding: 0.7rem 1.2rem;
          font-size: 0.9rem;
      }
      .auth-page-wrapper {
          padding: 10px; /* Reduce padding on very small screens */
      }
      
      .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
      }
      
      .theme-icon {
        font-size: 1rem;
      }
    }