:root {
    --auth-bg-color: #f8fafc;
    --auth-container-bg: #ffffff;
    --auth-border-color: #e2e8f0;
    --auth-text-color: #334155;
    --auth-title-color: #1e293b;
    --auth-input-bg: #f1f5f9;
    --auth-input-border: #cbd5e1;
    --auth-primary: var(--primary-color, #1E88E5);
    --auth-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.page-system {
    background-color: var(--auth-bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.auth-box {
    background: var(--auth-container-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border-color);
    position: relative;
    overflow: hidden;
}

/* Top colored line */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--auth-primary), #43A047);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    max-height: 40px;
    margin-bottom: 20px;
}

.auth-title {
    color: var(--auth-title-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

.auth-alert {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    text-align: center;
}

.auth-alert.success {
    background-color: #dcfce7;
    color: #166534;
}

.auth-alert.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--auth-text-color);
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--auth-input-border);
    border-radius: 6px;
    background-color: var(--auth-input-bg);
    color: var(--auth-text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.auth-link {
    color: var(--auth-primary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

.captcha-box {
    background: #f8fafc;
    border: 1px solid var(--auth-border-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-display {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    color: #334155;
    font-size: 1rem;
    letter-spacing: 2px;
    user-select: none;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    background-color: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #64748b;
}

/* Register Page Specifics */
.register-container {
    max-width: 800px;
}

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .register-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.auth-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #000;
}

.auth-modal-title {
    margin-top: 0;
    color: var(--auth-primary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.auth-modal-body {
    max-height: 400px;
    overflow-y: auto;
    text-align: justify;
    padding-right: 15px;
    line-height: 1.6;
    margin: 20px 0;
    color: var(--auth-text-color);
}

.auth-modal-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}
