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

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #fca311;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f3 100%);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-block;
    background: white;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.logo p {
    color: var(--gray-500);
    font-size: 1rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.card-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-header i {
    margin-right: 10px;
}

.card-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 12px 20px;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between icon and text */
    font-weight: 500;
    text-transform: none; /* Allow Thai text to display naturally */
}

.btn-primary i {
    font-size: 1.1rem;
    margin-right: 0; /* Remove any default margin */
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure the button works well with Thai text */
.btn-primary {
    font-family: 'Prompt', sans-serif;
    line-height: 1.4;
    padding: 12px 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.remember-me input {
    margin-right: 8px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-danger {
    background-color: rgba(247, 37, 133, 0.1);
    border: 1px solid rgba(247, 37, 133, 0.3);
    color: var(--danger);
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: var(--success);
}

.hidden {
    display: none;
}

.footer {
    margin-top: 30px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link i {
    margin-right: 8px;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-5px);
}

.form-footer {
    margin-top: 20px;
    text-align: center;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}