@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Corporate Light Theme Palette */
    --primary-color: #3955a2;
    --primary-hover: #2d4485;
    --secondary-color: #1f2933;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #1f2933;
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #3955a2;
    --font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input,
textarea,
select,
button {
    font-family: inherit;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    font-size: 14px;
    /* Global default */
    font-weight: 400;
    /* Global default */
}

/* Enforce 14px 400 weight for Paragraphs, Tables, Buttons */
p,
table,
th,
td,
button,
.btn,
.btn-primary,
.btn-add,
.form-input,
.form-label,
.table-text {
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Auth Container & Card */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #f8f8f8;
}

.login-card {
    margin: auto;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 40px;
}

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

.login-header .brand-logo img {
    height: 22px;
    width: auto;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-header h1 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    /* Updated */
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--text-main);
    transition: all 0.2s;
    font-family: var(--font-family);
    accent-color: var(--primary-color);
}

.form-input:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    display: none;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.remember-me input {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    appearance: none;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.remember-me input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.forgot-password {
    color: var(--text-muted);
    text-decoration: none;
}

.forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Footer Links */
.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: var(--primary-color);
}