/* 1. Global Document Layout Standardization */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --button-bg: #f0f0f0;
    --button-text: #1a1a1a;
    --border: #e0e0e0;
    --green: #c7efc4;
    --yellow: #f9fcd1;
    --blue: #c4e7fa;
    --red: #fac4c4;
    --gray: #c1c1c1;
    --text-muted: #696969;
}

body {
    font-family: "Noto Sans Khmer Variable", system-ui, sans-serif;
    background-color: var(--button-bg);
    color: var(--text-color);
    min-height: 100vh;
    
    /* System centering viewport engine */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* 2. Main Login Container Block Card Layout */
.login-container {
    width: 100%;
    max-width: 360px;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    
    /* Nudges the box upwards to balance viewport perspective layout */
    transform: translateY(-40px);
}

/* 3. Centered Brand Panel Logo Mechanics */
.brand {
    display: flex;
    flex-direction: row; /* Stacks the icon above text for solid centering */
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.brand svg {
    width: 64px;
    height: 64px;
    display: block;
}

.brand span {
    font-size: 50px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-color);
}

/* 4. Form Segment Layout Row Mechanics */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 5. Custom Input Field Row Groups (Matching search-toolbar styles) */
.custom-input-group {
    display: flex;
    align-items: stretch;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 6px;
    height: 38px; /* Slightly taller for easy interactions on mobile login screens */
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.group-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 14px;
    padding: 0 12px;
}

.group-field::placeholder {
    color: #48484a;
}

/* Focused glow wrapper rule */
.custom-input-group:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue);
}

/* 6. System Core Submission Buttons */
.primary-action-btn {
    width: 100%; /* Spans full length of your input fields */
    height: 38px;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.15s ease;
    border: 1px solid var(--border);
}

.primary-action-btn:hover {
    background-color: var(--bg-color);
}

/* 7. Native Alert Errors */
.login-alert {
    background-color: rgb(255, 141, 141);
    border: 1px solid red;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}