/* CSS for Login Page - Dark Theme Version
  Updated to match the new design system.
*/

/* Import Google Fonts 
  Includes 'Open Sans' as requested and 'IBM Plex Sans Thai' from the original login.
*/
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* Root variables from the new dark theme design system.
*/
:root {
    --grey: #1e1e2e;
    --dark-grey: #9399b2;
    --light: #181825; /* Used for card backgrounds in this context */
    --dark: #f3f3f3;   /* Used for primary text in this context */
    --blue: #5193ff;
    --light-blue: #2eb6f5;
    --dark-blue: #72d7e9;
    --card-bg: #313244;
    --border-color: #45475a;
    --text-primary: #e6e6e6;
    --text-secondary: #a09c9c;
    --hover-bg: #45475a;
}

/* Body styling to center the login card vertically and horizontally.
  Background and font colors are updated to the dark theme.
*/
body {
    font-family: 'IBM Plex Sans Thai', 'Open Sans', sans-serif;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
  Login card styling updated with dark theme colors, border, and shadow.
  Border-radius is adjusted for consistency.
*/
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: linear-gradient(0deg, var(--light) 0%, var(--grey) 100%);
    border-radius: 12px; /* Consistent with new theme */
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1), 0 5px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

/*
  Header section within the login card.
*/
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .icon,
.login-header .bi-shield-lock-fill {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-weight: 700;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/*
  Form input styling to match the dark theme.
*/
.form-control {
    height: 50px;
    background: var(--card-bg); /* Darker input background */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 1.2rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-control:focus {
    background: var(--hover-bg);
    border-color: var(--blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(81, 147, 255, 0.25);
}

/*
  Password visibility toggle icon.
*/
.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

/*
  Primary button styling using gradients and shadows from the new theme.
*/
.btn-primary {
    width: 100%;
    height: 50px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--light-blue) 100%);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(81, 147, 255, 0.3);
    padding: .75rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--blue) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(81, 147, 255, 0.4);
}

/*
  Forgot password and other footer links.
*/
.forgot-password-link-container {
    font-size: 14px;
    font-weight: 400;
    text-align: right;
    margin-top: -10px;
    margin-bottom: 15px;
}

.forgot-password-link-container a,
.footer-link a {
    font-size: 14px;
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}
.footer-link a:hover {
    text-decoration: underline;
}

/*
  Loading overlay with a dark, semi-transparent background.
*/
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.8);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/*
  Hides the default password reveal icon in Edge and clear icon in IE.
*/
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}